From 743c1d2baad50c3a71ea3548fc33f3e1b190816b Mon Sep 17 00:00:00 2001 From: BobSong <605277374@qq.com> Date: Sun, 27 Jul 2025 12:34:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Excel/Server/SceneConfig.xlsx | Bin 18747 -> 16935 bytes Config/Excel/Server/~$MachineConfig.xlsx | Bin 0 -> 165 bytes Config/Excel/Server/~$ProcessConfig.xlsx | Bin 0 -> 165 bytes Config/Excel/Server/~$SceneConfig.xlsx | Bin 0 -> 165 bytes Config/Excel/Server/~$WorldConfig.xlsx | Bin 0 -> 165 bytes .../NetworkProtocol/Inner/InnerMessage.proto | 2 +- Entity/Chat/ChatComponent.cs | 7 + .../{Model/RouteMessage => Chat}/ChatUnit.cs | 0 Entity/Entity.csproj | 2 + Entity/Game/Container/Container.cs | 46 + Entity/Game/Container/ContainerComponent.cs | 23 + Entity/Game/Entity/Currency.cs | 16 - Entity/Game/Entity/DayFlags.cs | 5 - Entity/Game/Entity/GamingInfo.cs | 21 - Entity/Game/Entity/Guide.cs | 26 - Entity/Game/Entity/MapMatter.cs | 7 - Entity/Game/Entity/Mission.cs | 7 - Entity/Game/Entity/Player.cs | 11 - Entity/Game/Entity/Skill.cs | 7 - Entity/Game/Entity/UserInfo.cs | 62 - Entity/Game/{Entity => Item}/Item.cs | 16 +- .../ActivityInfo.cs => Item/ItemComponent.cs} | 3 +- .../BasicInfo.cs => Role/Child/RoleBasic.cs} | 8 +- Entity/Game/Role/Child/RoleCurrency.cs | 15 + Entity/Game/Role/Child/RoleDayFlags.cs | 11 + .../Child/RoleStatistics.cs} | 11 +- Entity/Game/Role/Role.cs | 8 + Entity/Game/Role/RoleComAttribute.cs | 10 + Entity/Game/Role/RoleManagerComponent.cs | 8 + .../Gate/Entity/{GameAccount.cs => Player.cs} | 4 +- ...lagComponent.cs => PlayerFlagComponent.cs} | 6 +- Entity/Gate/GameAccountManageComponent.cs | 8 - Entity/Gate/PlayerManageComponent.cs | 8 + .../Generate/NetworkProtocol/InnerMessage.cs | 2 - Entity/Model/Addressable/Unit.cs | 8 - Hotfix/Hotfix.csproj | 2 +- .../G2M_RequestAddressableIdHandler.cs | 22 - .../G2M_CreateSubSceneRequestHandler.cs | 17 - .../G2SubScene_AddressableIdRequestHandler.cs | 21 - .../SubScene/G2SubScene_SentMessageHandler.cs | 13 - Hotfix/OnSceneCreate_Init.cs | 2 +- .../Handler/C2A_LoginRequestHandler.cs | 1 + .../Outer/Game/Container/ContainerSystem.cs | 86 + .../Outer/C2G_GetAccountInfoRequestHandler.cs | 4 +- .../Handler/Outer/C2G_LoginRequestHandler.cs | 14 +- .../GameAccountManageComponentSystem.cs | 49 - .../PlayerDestroySystem.cs} | 4 +- .../PlayerFactory.cs} | 10 +- .../PlayerFlagComponentSystem.cs} | 6 +- .../PlayerHelper.cs} | 16 +- .../System/PlayerManageComponentSystem.cs | 49 + Server.sln | 6 + Server.sln.DotSettings | 2 + ThirdParty/ThirdParty.csproj | 14 + ...ppEagerStaticClassConstructionAttribute.cs | 13 + .../Unity.Mathematics/affine_transform.cs | 322 + ThirdParty/Unity.Mathematics/bool2.gen.cs | 626 ++ ThirdParty/Unity.Mathematics/bool2x2.gen.cs | 292 + ThirdParty/Unity.Mathematics/bool2x3.gen.cs | 306 + ThirdParty/Unity.Mathematics/bool2x4.gen.cs | 320 + ThirdParty/Unity.Mathematics/bool3.gen.cs | 1497 ++++ ThirdParty/Unity.Mathematics/bool3x2.gen.cs | 299 + ThirdParty/Unity.Mathematics/bool3x3.gen.cs | 315 + ThirdParty/Unity.Mathematics/bool3x4.gen.cs | 331 + ThirdParty/Unity.Mathematics/bool4.gen.cs | 3662 +++++++++ ThirdParty/Unity.Mathematics/bool4x2.gen.cs | 306 + ThirdParty/Unity.Mathematics/bool4x3.gen.cs | 324 + ThirdParty/Unity.Mathematics/bool4x4.gen.cs | 342 + ThirdParty/Unity.Mathematics/double2.gen.cs | 998 +++ ThirdParty/Unity.Mathematics/double2x2.gen.cs | 658 ++ ThirdParty/Unity.Mathematics/double2x3.gen.cs | 647 ++ ThirdParty/Unity.Mathematics/double2x4.gen.cs | 669 ++ ThirdParty/Unity.Mathematics/double3.gen.cs | 1878 +++++ ThirdParty/Unity.Mathematics/double3x2.gen.cs | 632 ++ ThirdParty/Unity.Mathematics/double3x3.gen.cs | 697 ++ ThirdParty/Unity.Mathematics/double3x4.gen.cs | 699 ++ ThirdParty/Unity.Mathematics/double4.gen.cs | 4052 +++++++++ ThirdParty/Unity.Mathematics/double4x2.gen.cs | 639 ++ ThirdParty/Unity.Mathematics/double4x3.gen.cs | 665 ++ ThirdParty/Unity.Mathematics/double4x4.gen.cs | 824 ++ ThirdParty/Unity.Mathematics/float2.gen.cs | 998 +++ ThirdParty/Unity.Mathematics/float2x2.gen.cs | 658 ++ ThirdParty/Unity.Mathematics/float2x3.gen.cs | 647 ++ ThirdParty/Unity.Mathematics/float2x4.gen.cs | 669 ++ ThirdParty/Unity.Mathematics/float3.gen.cs | 1878 +++++ ThirdParty/Unity.Mathematics/float3x2.gen.cs | 632 ++ ThirdParty/Unity.Mathematics/float3x3.gen.cs | 697 ++ ThirdParty/Unity.Mathematics/float3x4.gen.cs | 699 ++ ThirdParty/Unity.Mathematics/float4.gen.cs | 4052 +++++++++ ThirdParty/Unity.Mathematics/float4x2.gen.cs | 639 ++ ThirdParty/Unity.Mathematics/float4x3.gen.cs | 665 ++ ThirdParty/Unity.Mathematics/float4x4.gen.cs | 824 ++ ThirdParty/Unity.Mathematics/half.cs | 170 + ThirdParty/Unity.Mathematics/half2.gen.cs | 569 ++ ThirdParty/Unity.Mathematics/half3.gen.cs | 1439 ++++ ThirdParty/Unity.Mathematics/half4.gen.cs | 3603 ++++++++ ThirdParty/Unity.Mathematics/int2.gen.cs | 1043 +++ ThirdParty/Unity.Mathematics/int2x2.gen.cs | 729 ++ ThirdParty/Unity.Mathematics/int2x3.gen.cs | 734 ++ ThirdParty/Unity.Mathematics/int2x4.gen.cs | 756 ++ ThirdParty/Unity.Mathematics/int3.gen.cs | 1921 +++++ ThirdParty/Unity.Mathematics/int3x2.gen.cs | 719 ++ ThirdParty/Unity.Mathematics/int3x3.gen.cs | 763 ++ ThirdParty/Unity.Mathematics/int3x4.gen.cs | 767 ++ ThirdParty/Unity.Mathematics/int4.gen.cs | 4093 ++++++++++ ThirdParty/Unity.Mathematics/int4x2.gen.cs | 726 ++ ThirdParty/Unity.Mathematics/int4x3.gen.cs | 752 ++ ThirdParty/Unity.Mathematics/int4x4.gen.cs | 799 ++ ThirdParty/Unity.Mathematics/math.cs | 7261 +++++++++++++++++ ThirdParty/Unity.Mathematics/matrix.cs | 1115 +++ ThirdParty/Unity.Mathematics/matrix.gen.cs | 2409 ++++++ ThirdParty/Unity.Mathematics/quaternion.cs | 788 ++ ThirdParty/Unity.Mathematics/random.cs | 733 ++ .../Unity.Mathematics/rigid_transform.cs | 415 + ThirdParty/Unity.Mathematics/svd.cs | 170 + ThirdParty/Unity.Mathematics/uint2.gen.cs | 1043 +++ ThirdParty/Unity.Mathematics/uint2x2.gen.cs | 715 ++ ThirdParty/Unity.Mathematics/uint2x3.gen.cs | 734 ++ ThirdParty/Unity.Mathematics/uint2x4.gen.cs | 756 ++ ThirdParty/Unity.Mathematics/uint3.gen.cs | 1921 +++++ ThirdParty/Unity.Mathematics/uint3x2.gen.cs | 719 ++ ThirdParty/Unity.Mathematics/uint3x3.gen.cs | 746 ++ ThirdParty/Unity.Mathematics/uint3x4.gen.cs | 767 ++ ThirdParty/Unity.Mathematics/uint4.gen.cs | 4093 ++++++++++ ThirdParty/Unity.Mathematics/uint4x2.gen.cs | 726 ++ ThirdParty/Unity.Mathematics/uint4x3.gen.cs | 752 ++ ThirdParty/Unity.Mathematics/uint4x4.gen.cs | 781 ++ .../ConfigTable/CommandLine.dll | Bin .../ConfigTable/EPPlus.Interfaces.dll | Bin .../ConfigTable/EPPlus.System.Drawing.dll | Bin Tools/{Exporter => }/ConfigTable/EPPlus.dll | Bin .../ConfigTable/ExporterSettings.json | 0 .../ConfigTable/Fantasy.Tools.ConfigTable | Bin .../Fantasy.Tools.ConfigTable.deps.json | 0 .../ConfigTable/Fantasy.Tools.ConfigTable.dll | Bin .../ConfigTable/Fantasy.Tools.ConfigTable.pdb | Bin ...ntasy.Tools.ConfigTable.runtimeconfig.json | 0 .../Microsoft.CodeAnalysis.CSharp.dll | Bin .../ConfigTable/Microsoft.CodeAnalysis.dll | Bin ....Extensions.Configuration.Abstractions.dll | Bin ...xtensions.Configuration.FileExtensions.dll | Bin ...icrosoft.Extensions.Configuration.Json.dll | Bin .../Microsoft.Extensions.Configuration.dll | Bin ....Extensions.FileProviders.Abstractions.dll | Bin ...soft.Extensions.FileProviders.Physical.dll | Bin ...icrosoft.Extensions.FileSystemGlobbing.dll | Bin .../Microsoft.Extensions.Primitives.dll | Bin .../Microsoft.IO.RecyclableMemoryStream.dll | Bin .../Microsoft.Win32.SystemEvents.dll | Bin .../ConfigTable/Newtonsoft.Json.dll | Bin Tools/{Exporter => }/ConfigTable/Run.bat | 0 Tools/{Exporter => }/ConfigTable/Run.sh | 0 .../System.Collections.Immutable.dll | Bin .../ConfigTable/System.Drawing.Common.dll | Bin .../ConfigTable/System.IO.Pipelines.dll | Bin .../System.Reflection.Metadata.dll | Bin .../System.Security.Cryptography.Pkcs.dll | Bin .../System.Security.Cryptography.Xml.dll | Bin .../System.Text.Encoding.CodePages.dll | Bin .../ConfigTable/System.Text.Encodings.Web.dll | Bin .../ConfigTable/System.Text.Json.dll | Bin .../ConfigTable/protobuf-net.Core.dll | Bin .../ConfigTable/protobuf-net.dll | Bin .../lib/net8.0/System.Text.Encodings.Web.dll | Bin .../net7.0/Microsoft.Win32.SystemEvents.dll | Bin .../win/lib/net7.0/System.Drawing.Common.dll | Bin .../System.Security.Cryptography.Pkcs.dll | Bin .../System.Security.Cryptography.Pkcs.dll | Bin .../net9.0/System.Text.Encoding.CodePages.dll | Bin .../Exporter/NetworkProtocol/CommandLine.dll | Bin 225280 -> 0 bytes .../NetworkProtocol/ExporterSettings.json | 29 - .../Fantasy.Tools.NetworkProtocol | Bin 123264 -> 0 bytes .../Fantasy.Tools.NetworkProtocol.deps.json | 264 - .../Fantasy.Tools.NetworkProtocol.dll | Bin 51200 -> 0 bytes .../Fantasy.Tools.NetworkProtocol.pdb | Bin 25840 -> 0 bytes ...y.Tools.NetworkProtocol.runtimeconfig.json | 12 - ....Extensions.Configuration.Abstractions.dll | Bin 28424 -> 0 bytes ...xtensions.Configuration.FileExtensions.dll | Bin 28432 -> 0 bytes ...icrosoft.Extensions.Configuration.Json.dll | Bin 27400 -> 0 bytes .../Microsoft.Extensions.Configuration.dll | Bin 44328 -> 0 bytes ....Extensions.FileProviders.Abstractions.dll | Bin 22832 -> 0 bytes ...soft.Extensions.FileProviders.Physical.dll | Bin 45336 -> 0 bytes ...icrosoft.Extensions.FileSystemGlobbing.dll | Bin 45832 -> 0 bytes .../Microsoft.Extensions.Primitives.dll | Bin 44336 -> 0 bytes .../NetworkProtocol/Newtonsoft.Json.dll | Bin 712464 -> 0 bytes Tools/Exporter/NetworkProtocol/Run.bat | 23 - Tools/Exporter/NetworkProtocol/Run.sh | 24 - .../NetworkProtocol/System.IO.Pipelines.dll | Bin 77616 -> 0 bytes .../System.Text.Encodings.Web.dll | Bin 70968 -> 0 bytes .../NetworkProtocol/System.Text.Json.dll | Bin 643848 -> 0 bytes .../lib/net8.0/System.Text.Encodings.Web.dll | Bin 70936 -> 0 bytes .../Fantasy.Tools.ConfigTable.csproj | 5 + .../Fantasy.Tools.NetworkProtocol.csproj | 4 + Tools/SourceCode/Fantasy.Tools.SourceCode.sln | 16 + 194 files changed, 81685 insertions(+), 696 deletions(-) create mode 100644 Config/Excel/Server/~$MachineConfig.xlsx create mode 100644 Config/Excel/Server/~$ProcessConfig.xlsx create mode 100644 Config/Excel/Server/~$SceneConfig.xlsx create mode 100644 Config/Excel/Server/~$WorldConfig.xlsx create mode 100644 Entity/Chat/ChatComponent.cs rename Entity/{Model/RouteMessage => Chat}/ChatUnit.cs (100%) create mode 100644 Entity/Game/Container/Container.cs create mode 100644 Entity/Game/Container/ContainerComponent.cs delete mode 100644 Entity/Game/Entity/Currency.cs delete mode 100644 Entity/Game/Entity/DayFlags.cs delete mode 100644 Entity/Game/Entity/GamingInfo.cs delete mode 100644 Entity/Game/Entity/Guide.cs delete mode 100644 Entity/Game/Entity/MapMatter.cs delete mode 100644 Entity/Game/Entity/Mission.cs delete mode 100644 Entity/Game/Entity/Player.cs delete mode 100644 Entity/Game/Entity/Skill.cs delete mode 100644 Entity/Game/Entity/UserInfo.cs rename Entity/Game/{Entity => Item}/Item.cs (58%) rename Entity/Game/{Entity/ActivityInfo.cs => Item/ItemComponent.cs} (54%) rename Entity/Game/{Entity/BasicInfo.cs => Role/Child/RoleBasic.cs} (79%) create mode 100644 Entity/Game/Role/Child/RoleCurrency.cs create mode 100644 Entity/Game/Role/Child/RoleDayFlags.cs rename Entity/Game/{Entity/UserStatisticsInfo.cs => Role/Child/RoleStatistics.cs} (70%) create mode 100644 Entity/Game/Role/Role.cs create mode 100644 Entity/Game/Role/RoleComAttribute.cs create mode 100644 Entity/Game/Role/RoleManagerComponent.cs rename Entity/Gate/Entity/{GameAccount.cs => Player.cs} (54%) rename Entity/Gate/Entity/{GameAccountFlagComponent.cs => PlayerFlagComponent.cs} (70%) delete mode 100644 Entity/Gate/GameAccountManageComponent.cs create mode 100644 Entity/Gate/PlayerManageComponent.cs delete mode 100644 Entity/Model/Addressable/Unit.cs delete mode 100644 Hotfix/Inner/Addressable/G2M_RequestAddressableIdHandler.cs delete mode 100644 Hotfix/Inner/SubScene/G2M_CreateSubSceneRequestHandler.cs delete mode 100644 Hotfix/Inner/SubScene/G2SubScene_AddressableIdRequestHandler.cs delete mode 100644 Hotfix/Inner/SubScene/G2SubScene_SentMessageHandler.cs create mode 100644 Hotfix/Outer/Game/Container/ContainerSystem.cs delete mode 100644 Hotfix/Outer/Gate/System/GameAccountManageComponentSystem.cs rename Hotfix/Outer/Gate/System/{GameAccount/GameAccountSystem.cs => Player/PlayerDestroySystem.cs} (55%) rename Hotfix/Outer/Gate/System/{GameAccount/GameAccountFactory.cs => Player/PlayerFactory.cs} (68%) rename Hotfix/Outer/Gate/System/{GameAccount/GameAccountFlagComponentSystem.cs => Player/PlayerFlagComponentSystem.cs} (63%) rename Hotfix/Outer/Gate/System/{GameAccount/GameAccountHelper.cs => Player/PlayerHelper.cs} (87%) create mode 100644 Hotfix/Outer/Gate/System/PlayerManageComponentSystem.cs create mode 100644 Server.sln.DotSettings create mode 100644 ThirdParty/ThirdParty.csproj create mode 100644 ThirdParty/Unity.Mathematics/Il2CppEagerStaticClassConstructionAttribute.cs create mode 100644 ThirdParty/Unity.Mathematics/affine_transform.cs create mode 100644 ThirdParty/Unity.Mathematics/bool2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool2x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool2x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool2x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool3x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool3x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool3x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool4x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool4x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/bool4x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double2x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double2x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double2x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double3x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double3x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double3x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double4x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double4x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/double4x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float2x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float2x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float2x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float3x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float3x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float3x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float4x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float4x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/float4x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/half.cs create mode 100644 ThirdParty/Unity.Mathematics/half2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/half3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/half4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int2x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int2x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int2x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int3x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int3x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int3x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int4x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int4x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/int4x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/math.cs create mode 100644 ThirdParty/Unity.Mathematics/matrix.cs create mode 100644 ThirdParty/Unity.Mathematics/matrix.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/quaternion.cs create mode 100644 ThirdParty/Unity.Mathematics/random.cs create mode 100644 ThirdParty/Unity.Mathematics/rigid_transform.cs create mode 100644 ThirdParty/Unity.Mathematics/svd.cs create mode 100644 ThirdParty/Unity.Mathematics/uint2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint2x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint2x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint2x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint3x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint3x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint3x4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint4.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint4x2.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint4x3.gen.cs create mode 100644 ThirdParty/Unity.Mathematics/uint4x4.gen.cs rename Tools/{Exporter => }/ConfigTable/CommandLine.dll (100%) rename Tools/{Exporter => }/ConfigTable/EPPlus.Interfaces.dll (100%) rename Tools/{Exporter => }/ConfigTable/EPPlus.System.Drawing.dll (100%) rename Tools/{Exporter => }/ConfigTable/EPPlus.dll (100%) rename Tools/{Exporter => }/ConfigTable/ExporterSettings.json (100%) rename Tools/{Exporter => }/ConfigTable/Fantasy.Tools.ConfigTable (100%) rename Tools/{Exporter => }/ConfigTable/Fantasy.Tools.ConfigTable.deps.json (100%) rename Tools/{Exporter => }/ConfigTable/Fantasy.Tools.ConfigTable.dll (100%) rename Tools/{Exporter => }/ConfigTable/Fantasy.Tools.ConfigTable.pdb (100%) rename Tools/{Exporter => }/ConfigTable/Fantasy.Tools.ConfigTable.runtimeconfig.json (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.CodeAnalysis.CSharp.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.CodeAnalysis.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Extensions.Configuration.Abstractions.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Extensions.Configuration.FileExtensions.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Extensions.Configuration.Json.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Extensions.Configuration.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Extensions.FileProviders.Abstractions.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Extensions.FileProviders.Physical.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Extensions.FileSystemGlobbing.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Extensions.Primitives.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.IO.RecyclableMemoryStream.dll (100%) rename Tools/{Exporter => }/ConfigTable/Microsoft.Win32.SystemEvents.dll (100%) rename Tools/{Exporter => }/ConfigTable/Newtonsoft.Json.dll (100%) rename Tools/{Exporter => }/ConfigTable/Run.bat (100%) rename Tools/{Exporter => }/ConfigTable/Run.sh (100%) rename Tools/{Exporter => }/ConfigTable/System.Collections.Immutable.dll (100%) rename Tools/{Exporter => }/ConfigTable/System.Drawing.Common.dll (100%) rename Tools/{Exporter => }/ConfigTable/System.IO.Pipelines.dll (100%) rename Tools/{Exporter => }/ConfigTable/System.Reflection.Metadata.dll (100%) rename Tools/{Exporter => }/ConfigTable/System.Security.Cryptography.Pkcs.dll (100%) rename Tools/{Exporter => }/ConfigTable/System.Security.Cryptography.Xml.dll (100%) rename Tools/{Exporter => }/ConfigTable/System.Text.Encoding.CodePages.dll (100%) rename Tools/{Exporter => }/ConfigTable/System.Text.Encodings.Web.dll (100%) rename Tools/{Exporter => }/ConfigTable/System.Text.Json.dll (100%) rename Tools/{Exporter => }/ConfigTable/protobuf-net.Core.dll (100%) rename Tools/{Exporter => }/ConfigTable/protobuf-net.dll (100%) rename Tools/{Exporter => }/ConfigTable/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll (100%) rename Tools/{Exporter => }/ConfigTable/runtimes/win/lib/net7.0/Microsoft.Win32.SystemEvents.dll (100%) rename Tools/{Exporter => }/ConfigTable/runtimes/win/lib/net7.0/System.Drawing.Common.dll (100%) rename Tools/{Exporter => }/ConfigTable/runtimes/win/lib/net8.0/System.Security.Cryptography.Pkcs.dll (100%) rename Tools/{Exporter => }/ConfigTable/runtimes/win/lib/net9.0/System.Security.Cryptography.Pkcs.dll (100%) rename Tools/{Exporter => }/ConfigTable/runtimes/win/lib/net9.0/System.Text.Encoding.CodePages.dll (100%) delete mode 100644 Tools/Exporter/NetworkProtocol/CommandLine.dll delete mode 100644 Tools/Exporter/NetworkProtocol/ExporterSettings.json delete mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol delete mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.deps.json delete mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.pdb delete mode 100644 Tools/Exporter/NetworkProtocol/Fantasy.Tools.NetworkProtocol.runtimeconfig.json delete mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Configuration.Abstractions.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Configuration.FileExtensions.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Configuration.Json.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Configuration.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.FileProviders.Abstractions.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.FileProviders.Physical.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.FileSystemGlobbing.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Microsoft.Extensions.Primitives.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Newtonsoft.Json.dll delete mode 100644 Tools/Exporter/NetworkProtocol/Run.bat delete mode 100644 Tools/Exporter/NetworkProtocol/Run.sh delete mode 100644 Tools/Exporter/NetworkProtocol/System.IO.Pipelines.dll delete mode 100644 Tools/Exporter/NetworkProtocol/System.Text.Encodings.Web.dll delete mode 100644 Tools/Exporter/NetworkProtocol/System.Text.Json.dll delete mode 100644 Tools/Exporter/NetworkProtocol/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll diff --git a/Config/Excel/Server/SceneConfig.xlsx b/Config/Excel/Server/SceneConfig.xlsx index 685d6c9ba0ce860e82842c16c4511a65033f89b1..343902b3ab4b223cead4c68a3e1d2a0eaa238212 100644 GIT binary patch literal 16935 zcmaKTWk4NE(l+h{cXxMpcMtCF?i$>KL(o8Qm*BzO9fG?%2bW+UNp|<%n{VIkAH#5_ zs=E7`o~rH=MHx^q7@(gmOnyu7=ih%f=(igadt*f>dk1F*#Wyn4w;!N>kzMuQSPKFJ z0oi~60U`dK%+SGs-ow@=Ghsp+lnJpP5C}kYvRD2Xo@5hw56RFMIO{z+-Vm@#YSLeD zquJ_#=mV@8%K~|_0ii2|AW6IdRzfi7?wU#NCcvVnxZ8x`65}tdG&PC(l^w0%JKjf z`!gB`(*C@ucz?El5h8+MTS5Rb1=}+R>s{ey&vG9*sR5aSFlEJ5QiBSMb*_XyVuqzL zo~KUrReiww$aXosK)Z3qdG_1{HaRQC9TJhpxOYr@C-Nk$pv-#57WH|o#nrBI+9|+P zrLpt-cZ~xRMHo~GYi;$W>q}LqIoOS%Dks<({xKxbEy1udWE-kX^YJerc39ji@AjAc zgOmX55w2}Ufwz0jF=})*nBnT<= z5MqV`$X~)jyj8-~bDE91uP(*#&9xY+3q_ zkTVp9l+xT0x9`5_xKr|RKY$*K&Gb;d-fu?JeH6VFA?$W4S)|%By;zC|9zd`?f3sca zZKYA_riQB+4=vvWyjMqMQ}V>g!nHr|{Rb+@yE}d>E zs=@dfd`qZn(OYV!Vv>|hsz~H%eJoX(*JEmX`|-YY!ka;}W0;8(${4cZJz@wZn6Tq2 zyj4ozzAd~lqQ-n_C0;!;6(3-POTQ%q{)PiA^n^ydH-P|K>n;irvBc zbG7MQTB^c0m2!Wi7^gw>6Z9=i*$lsj9Ac82R)=37Z~0lw_)^ z3>VA;Hi@rhLGnf10?dy z%=8oVF-=Nq0J6>6wD71O52tKv9R5o*r|3yB8MycYe@>Ap3f z?CcFptgWbwV9HSP7Pix@1~#~_spD7H zFxI1^z0Rycv8M7w)?Q>j=*6PLA8txskH_8ZMQ?UIjU6)?cUf?9mP*tU0r*Rb*F+-DIXS<;wn&5yNK@@cBTG48^|kLKZbUYQIubQYa4 zGR|us`S9V(Lw{g=@w@=$6FYk@PT^zNs~0KEa}d85!2PuoMB;cJiKP&qH`L90@bS*K zDr^q2TV##@1be2vhZyv=a?`KT=SAqsdt!Bia^>V|iz+|%D0JYPv-Kbk?+V2$N>#KW zA9kLrIth^o$IUX+1V>j@UHHD4;BYh;ys~rhwcn-s#W;m)@6+v*av6WmKEiSV^Eziu zI-PgB&8#x*0}BuJ6Mo0*K}8HPogL^T$B4jK)%gP>i0 z!)D`W$VQ!f$4*>?&^Y6rq3=;G>GKQ~s{Qwrx%?E+6vz&{wIAbv%9^?&P4%QNZa%zN zM_{m=4#R?dD#BRos&dN{j16EoeF)>_TV6{uIW&DSW<$h(7i!e(2v z8j>$DoNb7g%oo-KZnw?rVqjp$Shnrm`t%nV@r;6H#NX+984@cLf6mZ)0&ClOnE-A05p|360 zn=YspoW-*Z%hv4ZTCmI&=EZV&JpwV*Y^U@D(e^@vrruW2eA+NH^(TAH9GKjCbLG>_ zFB=F|vmVWa9WbKRI;(W#Cu1D%7S@y#2onsHZ%`(UYq{F%*6qe}&jN&&Kuarn!Zr}K zM$Kw&r;PPRYY&mN>4Qu>F3bxO&1+gObxa>mx^df~!ujw>YAVKD5^@cPh*iq1XMJ;k zy3E@>!W;IP^Dmnv;4&i})rPdjAnlKO)R{C^Fp;kMm#O&(HnQ;RfV)58FdQNDS|by} zx2z@L?u(w^c?9w`Pt1P|W+UUsASrGWPRorj3FzB4Dyfo=7#Bs^5cT!fOQ^M~vTjyL zzwc$yOErCpgXQcsPQ}3`hYgWL$!IKsjCyv9fq6B? zREjV$oVRP4zo6>$QzX#de0Eac%4ak_B2}+E{6Wdkzvz}oc307#3kDAVWqerc`KWq7 zPNaL`2*Sov;LFa9CV$(|B@Qv4%%}0a*sU^AQw$7y@t3t@S0vAsy?k2#2&KQY0UiSJY}%pmZoyz_I4b7DA(}>N>Ij zjctuELJY8}=DqV9;u8EZ1z%Uo^C-X|Y(8LFKRVwKixbMC@KM^Xx1y)+xvp!@R3Ya= zQeJsA8o&BkL8aLjyp6qZbFtLC4=Mi^HbBT1)ts7g3lg3kUTY{1$*^EGwO2ZR!=v(f z3tR>;MM2eFNU(()f{`sEYo-ws8Z3X{2CkP03GK?-XONoAQUz920m@vDW&~dR7gJmo9(>C-%orb0u2V&nC9+&M6e5HwkvseZ}J1~;0 zs(OxSU5au(3>+^b-42*hYiXVZ9 zsZi0iwh-`wB++n;t>_ziD(jk*BrR2!zzyghd)AH3pr~ znqL#6wxq1!04`aVi+J4yiRRa+^c~r7o`xQxJFuQ5Fuf&Dm`Eu(EBdBWtgHFR<@N|S z11*p3;k#YMRhlg?wE^WIbPU63&G(vbe6**xy18mp&B)~FvP>GWM9_R z1B^qOhs$g+jRBBk13SnLikW50z<_h*#1MdN_NWCaClQ*dW`kV)I zU-~lFp${ZLj6j>SAPm6jtUUKeQ-%U5%hkY@DG!FZLinU7aZ>dAp0aNNy)3+s8c0M3 zSFgqsZ3{*E>MIm8uLA$~{sHdy{=vk_(B0C`{LeEAlf3ry+S}$W;_ZNf`3L2{Sbl9N zPBmogmKhOOF%Iyc&QPAq7to0zOQKQ11A8UYK_`*1V6!CyOl-IyE$k;%Iacp`;lVLZhlVFO zP+7#Nt86DuEprUmmedqvQGx*po1dp{H!;bfgEgnlq#uYZDgx)pmZoERs5A|oPORs4)^7Yf_;xFH z4MD5z9~&UhY-3{IM@6EQs|&3Z_Me(~>H!V(}?4vwL>s5>TD_j8{<&ah(p=*LvKcXx?++)xJG6=sEcH!5r=*cEH zHABg^oRX&oU&Snw*a0Qw@oY}z7KYhJq$D4mZJ)l|MY_UzsyW&{H*91j)Q(0f^8|dP z874F|K<6gZEnZ$sr2(S@Uxl}YpHFM^a=|bl!2%Lsa>FyqqcRqJj=0Dmyz`}MxNs%Q z*SdmaQ_AQJJjczLt9o~SbJgSgMvBO14|8IoeXOkRA~if z3-#g*$|BKtn(U#7RhP4U$Zc4loxK%4Wk&~R_>4)uYttQX*d<6KT}YRv%H=LtAm-p_ z17WyBY}2qn_iqit-i5_^6+Ze>vr080a~B_vy`Y-q@0uGb>@sc@yodGXUsEgd#;TvR zn$J!rT`#Ab&&0Bi+j$c1_HW*vt$X5iG*@nF-#1R2uYEk`hMqBb#d|qe2YS5v0r)(B zR<`=`k?{xcKMyqrxyqb$U_d}J_&`87e|!^ewl<=_za%F5xBJsHefwp0#LjilYaXbR zGTe{f1!NjjP)~m}yjy5Ktu`QCG82gi6y=c?c#g^ctSO~tQT%Ms31Ndm8tcCE?82X= z4)`I>={@JBGl$jPi0`DKJD4z^0r&i{J7W{@S$?WHUwDpIB(_`xaLK_zLk9_HmLVIP ztgM)+T&Rh3tBu5{IN8w}gV8K-YTE;svCO&8qMi(ds5T2!AtBIMmeeZ?QV|e}ya7jn z1m+UzT=Ixpc$GBLhfb<8S+ce40sD}|vwNaER|Z#|K*Q2M63L#YSCkJU51r@Po*o-~ zHM>?>fRD3x&Mczuji9HGb^+xCL$zG9y}r2v9m6}p_GK`D4O`K2k5$E%Ma8p{BGi$` z`ugw&ZkHn_Z?;5jjb$GP*SZKFoL1MdPwVSg%<;``X^GMzoZw%elF%3vwe1){r?F9$pBmQZkgfIKBdLN*@D}Ly$d` zDhNQ0O-tAU?A_M|=P^Vk%}e~HF<({B7T0xb1sI9A0t>rb(lCLb{X_n8Julg7tUs}K)G`k|58QhQPuQA8@hABzk^ z3GS{saY=gFsNzN#CGBJYd=PT^Y`7q41Ne|bpfA*J5oavP;1Y?{!lZYAy8Y?n zI!%+44|PJ2bNq?%dTnt`&n46FB>oXb&RAL1L*MQm1}sWK1nhcm9PjCzxmjj*Fp{9| z1uxU$9mdc{trY|r%v4hKtQ;8Esd%houg~9$v#XPO&JHxP9iZ6QtNj11QMwvRl@wXWgLA%qqKt zg2&ufz29suk6ytqabKXuUw>(t|9-}Q_gl-j+dEl1TbP=<{Ar~F<(gNS-j4g^xc{-z zf1~}y^2%PrZQFP*XNHLF{gA76d?~Ue-YbbBqnW|I?ndDPOP)fctsmA~ zhu6tnz;m zJfb6+{vLhduq~vg$z(ya7;`MaCL|Po!Wp3ASX}oMd&GtB1w4 zqwR?i%ZC`9iZmE|Kwx3_Gz^TpKwy(KzIF$?%4d(FrlXfhRMUD&d}6b4(;T231Lp{y zBRsAQa_T}VABT12+if;Wvs25drFOZByf}er5eu=?%+XdonA_zhyPAAlPxiD+o$$dh z%_8x48j@2GljQ=*O$u+1OhrQ?w~|+b26HX)WI{%%r)cSgJ%c4ftSe4=yRfU1A*$3I zBTFW0hwwE}Q_sn@%<qUI$0n?>>bYq z3tZ4l7DVJJLze89pSGJPi=%CU2{`X9C;qB;ajljGy`tbt#)hbg^6rp~XJRL(6Z`{J zs-sX1hQgkqVHYl}4XuVj7c#7x#@BJ^q!mH?lHsw3EqVAw^jFKMQrqrNbd_cE@m{6H zN-U+5n!+jdHRM__SIAJZr*LU3-! zUkdvZv7PKDSIBidlX1iH@M) zO+!S&d#0Gz4h>}D^gDqjRAh(m?TpNv{lDbSm3O3TCoR_FGIPALw7}f5ZAI@CCYulL zE?w)#2QSu6mFoHYv5n?rI)Fk=7chUxT3V{aAZm3S4Ym%(3NN(=G zKc@HC*3US%K7GKGy@W>2s)`Cdy`N@%^~X#^kL^y&mz07oO)n`ONIC~nHdeKi8d(vA zJ(lAfWTXqOF8C6KY)D2b6Cp)qi9v}(PD>zgal(pIrDwmWwUyz4rEF)Xsqxw3g(=m~ zeYtbKks$`q^(hmzvk|Zj9GUh(S5Z|94&f>O%v-74ItDN^QvkrlPdrtr%PZ<5;_O!^ zjr1EEH6HVV8Ap8&R=AKPvm0R;$e<0PDpFh8_ySao z_{v*m%QzccUa(sm0I5P?Luql)#ijB7I|*O5AuhMxs2+9`3(WG6J9j-@4JU%`9 z(8qiQeB3)OzQbV`xxLOf3ZHGiKQ{i0{b+_}Z~k@#*#FbaGXDzPC2QMfyoEH@DNcC^ zJLGp0;_@RvRE1S-r`c6o_*)E+RXRuAgj*Ckj5EBMRpP@I7WVy~cm^Q1PgiA8h}YiCl$<%Hl(P9CgNHm;M}4Uu*M|Dt<0P!#p_s5 zMCEG$2?&sbSGBc?+FxQY=?IszDL`K6O|ZV;-UTwq2#a$?hhR;QPFtiXRaUq%jMKI{ zxR7aLnN1XJLEvH_t|%vvZ>ff8gCb4+pc=Q8^f*>a`_|B~OtWdZiV9zajgOgxn2EoDIQtMl ziY$Rpp~QC^olGF*#0k^sIJO9abxk@=O7UeVEkFBwQnnIx8g-?+Bc810IzE0AV>WrI zz&L~Oo$6kx>SyU)t+BQ5nc0Cn}EB zb!IK>b78@x^V05)!tW0%pw#-X&fr8>AR`z{i=&47!c@zac%qP+yNq79_KkB`4V2}y zw<+l3<@U%HC{XQ=Tjkg&uuwR%8WzZfbFNI8uC;-YCVrO8)V{JG+h^y(+;!BN#!6%X#_NtQ4Z=&q;MItTzz= z5hklH7778}Z08JhS<|Ll_^hUlKZVVrs#PeLM{b8>MJT%N&~xx`I>BcZ2RSub2s=K0 zeq55FNHW~iOaE4pqDSd4DGMWZOfNij?NFTcEaY`ppWEjKN#2E)Xo}*4psgofc;Y`7 zZP*BV)LnvxcVgI3mHM=w>K{8pYEyyJgU@(sEe7fB00fao-eyzQ{5j!FniFEpOnSd1 z-evH#5b8RE+b(bF=2^(^3dV;}pOJ@@i{m|VkNN<6&Rl9cZgG2d2zH3bMg+_^;#mcW zZzah0my6`M4NL{OzW&7X&IneDdYb8FUtbaaZ|8R?UrWo&Mbp2Iga zJKY!xw;7Lu8(I!j>6ZS$mj^{pU_H8bmk5fbf6R)bghw)^I=gqKeJX1q@O1z`9mJ$q z0DV+B$&MkANjp`cCiXWZrLTr7I=AWe2qg8{RU+Ft0DB^@t5L0Br-3Fe0TfUIH#U-^ zARG9(Z#F1&xl@N=Ls1e?7kS{}$Xmk@?d8fexkp(HgkcH0F?S;r0F+2cc@OSYpZC?> zs#GTB4Mle$w0rEbUtwCh2|wE%a(S}SQ&i03-0bNc>Vp>R4BTixn{{aZm;pis`#Syk z<6&*}`Wk=@rW|-!fZOLztL-#BgyYG+%5lxQ*blZ!sOj|wwlCv>Fe+Uu#O{4RcDtUv zt?MzmUXYWIGyHn#+07B%8x<4Tp$ojOEo)=T$JyjK=sZYyj}|3@x(1ki8B`S!O!_O^42JL*9ed0>=d zs}}^HN&F7W9bzLieI)$cB3b-w=wY;XRp?-W%^jma&FZlht}gMLj+?Q~RI8j4wNkJ$ zE#FO)9Ftr589$MlPOM~SngPn;D#aQ<@pxR+-~x4i!4$9*A%io9kYqhtMxOT?e_o~P z-FbC%FnmC9&=Zt0P1O9PY;NzaQ!ug>#1rDsf|wKMen7-AEOc57qp6-iukbe;J4cPG z_-h8@w?QTC(r|1vOkj-maT{3Q z?rrjXr`GF*awb4I#m6dRZ@hqZOn1~K+@Wsq>Q^O?8Yo>ut^+K7d?>n6g=pGnFl8iVAJP{ z5Z&ZP*6Rmb!M^!A)7U+u>D1f(G^bfsf@4OH4>GjtQLhx!6D_oNU}o)^NWE&^5Z``5 z4@J4mL1ZXvmbl;+XF&&{8h8DS9k@rBqkgNVQHMuMPjmNCrJ@?h%2aJ5c&DqWberSI z07TruRv0ymTEVjvV{vxKCnIeQRkjSI^!$BZvA=2Ia^!LUZprL!fm@8MHffYot<=Hb z0Y14A>Q*lI?1866t7YZ#NRrmI3T31QCaYG;YjmHOGrU{blAy9OmBmq}%hR44s5H5t z=D?TEQ#^ihtnV?36xyOB9uH`eS@!oIDP{UYPKc29f#-7*%Y=kU_wdQ22GmCwW(1Wh zh|;xfVZk;t$>t$6J?967rcX(?hrl4GWm}kXi8KAcLni9GA5=2*am#5J;imbbdQj|T z&7a-{B3sv4QTr1ioktcWOR$ihtJR>^m_Apq77DwK%?CDzUOI}_Vxr;opeQ7+)=bn%USWp}Rpo@d9mKCf| z#28TUOV5!1^y3=kiatBO#WtiMfPj8xWxd$~XA46oQxjzur=OvapIf<4s;Aa7g19gA z_X5E_?w0#BBx96RiNv!;G`{?a+TN)veJwKezR1Ic)6udfpcmkwA`nIulp5cs{0coU zI?fX!kLlC4QUtU1oA#U50Vyp9We7SFheE@MU1;^KD(}(4>5NELN{SnotoJL6VYY#m zJBcvWzVn+Ll{(%=jbp0!YK>A`r8wJ*&7{tT&>P6~25B%J2RHkFR9~7(l_2`6i6MN( zz2sElBIOL+U223xa24sLnSYPDdX>WkNuR7DVm>%o8;7en0Trv9fd|;WOF$g7{RtI+2vM)!0ND!$pd_``|>2hN*<-q4u03q!>xw z8KixMr3~tbxO{-6Dl`pU8BEx>v>bkg49VL(Ie6$WLN7xmf^~*#3^HNW+KDyC#Xsqj znAo}_=-D_Oig6%WS>gON5=q?<6-byCV_J(|lM}UD^gX{fFe+lMGEY9MU9Q;pi@2F~ zGgbSCooiWAGXp&xYuz?%FZ@7m+1WR(GHyObisiOOrBe6Lc|r zjQJqh5XjiPi7@7+bG(?P)$7&~mDz?qV6%;w#N#uzTBNA;(a3+9L{u)Zab?nk-?Cq_8uFeXTb^9eoMBguUuS7Q<7WILNlXd?7k@`wBLTtd+ zEk(nm7)ET>B+IC!mamT|!HT77%J|6`1N(sXmdEk^vm1K3aty=-r#TV%9&z-q{$WWK z-Us{BRgH0EXof^moI&_r;1QLN`W-HfI=oe!ehsX^iF~LupIjM}h2W^-;j@5eD3CCy zl)Px>G|WIGDUE?XkuTJr%6vv1R_vNYQswkOodW9TUC8fL5h5lek}hH}P9I93)7cGp z_gPzmts%_@3@+%x8Lu@g+m|C3dIbYpgLLFfvXo|(Y*0E}B{7Z~%DcFv(FfKZ0zuO# z5uSr}s_3-vlz2s8@KQuWON_EOnduXPcN^T`ft!LM&HA~SwJjCw!)-t)^%+s)Y>g`i z%rg9>Yq?91&ioY|IRDll&8*IYRWTkI}yV~{Dk z*0)n*Q}qN-m&}e>EWzQ-P;!~vL3ykEu|>Mw)BTAGDBwo2sG3O7;zRzVADQWN&18EJ zN8v@E^S&!s1*OlF$XQp=^KZS-DxTFZl*|!{R&Ce95%NB`o3w^M zHCwLGzmL)Ha9DEtz}ebb>}}j}sLQoI)qC}tL{iNXHDyRVEG1`2_-!ZN3XHd}&;LWJ zYEg)@J)srJHOeFa-3HJ2=58*Ci5l*a=A2&8oS(hmr0o@4=YWDTAkyHqo!G&JLwlUs zs3>uFCP*KRHx+&$=;*%7hyT9*GjB4{c~PLzsx#k->AvH`(d{e9KlQ135kHvv+tFBD z2M7rMU;5O=)5i3dBAwM)j$Kj1@{`!|`$`@N*=yFH(!{yCIGL&YQIe`ONd*KrvXv!E z7dE!-#v^x?IA0JOL`t{WTN7!{L2(In^0&r}Z*bSaKp_*@K(9Ab;p;M;I z)e!n=L|gxLX^)Z9t=t+i8BMaY8?S)|QpmxhL<`Rip*(=A^#D(c{%QK|DFCapqC+1K z|3~s74svdQvZ__RxU0dE9ode9<>XkmiNOy6EId1xwyqqk1@8u9$blqvF>DtG-9>l4 z^%ZBqSrYwNuAbeuT+Y>-ww!qcdXTcxdBC!+wYW%=(oIDM`$df2;*yI5s4*g3K_!P% zkeiqczSJgzy4Sg4rDV<&UKOO(N?bdc?)_~DY(362&CU-Aocps3`!`JeZ?{@ zxidOr=@54-eBqZ!vqD|17;E3JAuOX7P2*i$!fhv8WyL!nhlx;}cjncH0XjuAP3s@U z)iC^cF=U@5(59e`m->RpEhSlOwS#p^tTYk;?@xwMmJ@X)edKXA={#zfUY=sYv+l2x zN*j_dlL4*rtrb((0M?mYd3mtXhfS~tW@L-jrIix8 z`b37Wli9Dyhtpga+L^BV*uo|!Th4GnhK;Q&U&oLN-LsKt>oG>r=8E_2HBl=IK=e&i zD!*ngg?VB|BQbL`l-g`58L*F6_0=*QLhiZKX?tzM9M0)>8Kfn4lZ6wLMfBr7ERZI+ z#7sS?UoN=LBv)#AijgOxu|A2U1}w%T%C^ozq$PGGR>*09LD8Roik@y{=MAd%oxT3k7CjGNJO!!XK;3)UVMo2K$5CiF`q%Vr-StZ8tec$cC0B`h>cg1%&G2G@Km<>**oPt*e!LAX%UA0C zV5nURs%mJctjIFwWVk$;+HE7Xl2(;FHQm`D{35xid+{OanDkGqSu32vjsK z>I3IjuUm^aLi)7UU{10PU0gs4YCI`L^e94op_;XoYXQ;^-ZIZ>Je`h+);>4h+E7F# z6IdeRK}=!MYB-!lJ6$y#Br$dzBq4Deq&`pE6HgLO*H0Tvk)%eHgF&#CW~Vxm#9v*A z7wiJQ`&*?OlBjx57;tt=#3Dm$ZHK6)4HT<^ps7 zE>SeS(MrfwE&8rKUPdD%mc9oYYt6Q2ok+Jr7Yd(bpmuZZTVmdZGBsGI+i;SaX~M|d=m=?1gi5Fu2SPJ0<7G&t ztT+^zdVCa|D77#<FA48h~rvA`_h#pb8cl{U|S5qBTIjZaOiCU z(bb}Biqxg1W1=6?_Kr)=&rYekBh;bZt>Dubxtznty?DEnlj&3e|9sB)^WxC^cKMq8 zM!~uDc9E2+Z>@(E)1k9J?b1qayxj;-X}mR{>#8FANs#SWt)+Ic=krZ9*6r}{u;B_Y zEhF)qvRWDDf^1KlN0xm^igJaJQr2zj?Su$uzyWEblH4|Jrz=WYVl0f zE+Ny`>IIo)-vPetd~hw?e+4ILI?1Bft|#)Ti528W%Irw*=F}W)in3XN5+Q158rG+L z?`|gk9@G7MyZQq$O9$P_kFBlr)OiWt=&3<*jcHTpBqpt(Z;&!Aw-xHhW>tv4SXrv~ zD`b7<_rf7-Y>PkbjClIW+fCJp73kggMWBu2WtL%L?NL`2;+>Gmrn~(XiEI4lnO9zH zfd@}nLE^EU$ws=O-PZdV7DVO;P9$NSF^hw;pcz)<{AC1dftUgz3Gt+B+d9i(MLtoH zem+_35A~LzdmZlMX95{dw}!M~qyAWO_jCnR98m(#JJ&lSwU87HYu=A8=~<(4SbQIV zjkWf6*8K!p9_4A{WKpnyPtKvXTz}l#Z@aIjJ#C)tJp1*!m~4d}bWg0xT5>;ZoGpg= zMNu7`ArT`rzg|yCWUuVZk?3Ks&KTCY67dT=A`?>4*1CKQK^p2V78CU^3=ba&r-joN z1(PEo#>cN=v_nE-jSlzl31%3ThdjPse7?v8!!rQ6y zz}wpc2;=-duh;Wm7#F(D*}f6N@>IWn46P#?Gwm@3pJN15`i@?^c>($n4un0r&&ETx zL|7JjRO$zr4>hPaI6n*3B*`odG){9;4-ks4vt9E{fmcX%8nwFc%Fmksnk2DJ9y*Xb zFg+<`gl_@HguUja>X*}hz!A;|o7E66<2xyp7a&UzL1a`kp4>m4;`f_H+ag(VlvS=~eppBDm zHOq1R<91wJ_t*w-g6Sn!;_3?#Kt{08?m}wKaEEl9t~c9*VB4e3UgKtY&{=h7oEkv-PNp`0=8AZ8y0yN(JzIY}R=#c4 z|3yRpld|Hi;H;PNcfr|SyPP{3(xM9k@rj(t2me&r*GY1e1kKa-HX$Y2@6C|0X%BlD z>pmteIIDzuOocJ6fv!q{g7$-M?Mml99vZ8GlI3l)pq?rY-C!+8mqw4lL3_MOOZ24i zx<2nGnZtOf5-q0=RTKrk@UV#$aS0fc1hKc-DcTKRiuZrPSCr%JTcZy5Zh>&*3~7C^ zw=X>&-{4Ej6PaM4*-?qlbhU{?iwg3|Tj)T%5rcr>ns9RE9|5>ahm}{D(ZP%9grq7* zuI%b`IMSvK=*Sa9l4XxQ2+qvxcX!24Y1fTNatD*;9>0<@5A^ONd-AjCOFCWBmAU`l zSpF-Z@ZaEs*tgEReuGisEiU+0Z1dBJ^qcHw0?xnB>A%ozOBk{0VMG+W3wa4j{Xn<; zK~Z|gMw)PW?it81nxHp1*lc>vPk&Q*OVEL%5T`3s=q?M(vi2F@>mnk6+Z@eA3I@b> zSJoT{oM89t3=6EfLHuq!HxLQBq3?8T58iw10=Yhu0!f#a$|CLgW0Fcer-k%q2^^k! z*q}X15t6pbcg;d+MTd!S&IpwBZ}3t=d0#>0;(m~QSzexXRo^TtiviVYM<$9G;D1Lb zjfZUl-oYIaMOZZ;P>#KRNKY@YNgpM28)wrKEiq{(jgD!@n%SqxAsan@ z0=Ecxs3ei0%j6Z#c`2&({-y7K#AyEIaQj=D(tkr2zsg2!?G07&x5Y~G8{Pkp=Q5KY;t^cn9wTcK0ssTrIVj84EIK3#?bYNvk-_ zIU-5O@B`HqM_|A_QBF2^zyXi*eJoJpOWJ%83NZA&UoG(o=ImLIbV9!o5P#g-(iHmQ z>?33{lQ=^wLaLv{PFmzlr5vV|5p)KXqIwg2I0u>@QM8~5ZfUMgc$=b;@Ot;omIreQ z;%aknKMjhv*)ij~gjQY0^@x%t4*AqQ*8cjKX} zx$zYoeA7EHIUk<)Q2u%1F8UOu7xz|Pcl!3R|17W57O}T;c`NeLSMhW(b=LjmBKkBU z|7+DrK8ftmNw3rhLa~_&8A5-eBrrI!M44sqT$z61LunM+!pb#EOkufO;YlM+T+WjkCDGPQ(mu`SGX`H#L9Wnv{vy?Vy)KH82^>7Wt zM0Iw1eyyu<=?a%DGVE)Mv#tj5<-*o=JhTDBxmvLJdT0V6Q$5AhvOcvNlvpuE+rqOl zpDj(^I$w_(A9Y!ws!!OYO>Yf7JQPiI7rn2UyB4M;#EwD44u(1^KOLHXNw}l_E#W`z&HshsKbL?D z!7tW-Cnx+9!avg!{^~K~?`(f1EBra+KLZAT36Q4z)$iX|&;J_q&y?fe?dPi(do$N> z(ErW${x9C2w*7be$&1PLC-1*4{Xggar>*}f;rH^9{y!xAVfp{W;?Jz;zXUq|f7AI( s)SpuRO#1pu%EDXm$3H>&CFNHNn4%2$FJ+ARRyDQ%7QCV6{mJ+L01f`{^8f$< literal 18747 zcmeIa^;;b2)-K$*yE_CAL4&&mcXxMpcXxMp*Wm6D+}$m>I|TTcnSI`woxRWX{Q>8# zAF8YAT6Z_kwbpv>WhEmH0*VR%2S5S<03twum)J@H5CC8a0RW%?Ac55dtgRdjtsJx! zTx|^PHECQdEeP{KfhlqTz#sSj@A3ce3iKzAO7+npetQu4C9p?rw&vuEXtn|tO{xIQ z-Mth~R;GR3T-{~7(+HV6Lt#e3Y>T}5u!gm|J8WU@&=};?PzQ#yFOcM$C^hdSTNC|o z(1SNh2VEZEgbv*ZVo-NN=Y-QvLP7wNxbQggJ2Bvv~^@4hl~(Gd^8R=uwwSgL_0YhP?Yjm@}jQ0$`c2O%m> zHHB4b7{dA9^C;Sz=Ee@Bp}K&a5KkrW(?0DTvp)#=4kCx|9gY>#y>Km9jgJ|Fs1s7a z_PX*X4n|V;1oh3$C-RxgQPO7szb+VJ8~jp!h(oI_6~FXl5NUoyJ-E$pj|!DfWO9yO zta>Kr2w-JY>Q!{?_Viw~_P`UfhHS4N*7^Pp0+9JP<3`cyGz9)I?#+)+VLpso+s@F! zo|fj1^Zy$4|HGF2kAJ-)PEs6%9x>>`@11C@gJbpcrx^>{Z-5elj%!<1De(GFAXRt%wxR3mX8FK826W}I2Br zlPt&+8{eNlR^dNQ=7(0*WG4s!kOTz)Abi~6VnOR{ZD+1$ZEgO?URa@|8NI@a>Zxt| zE|8WPthBnt>LCn*7Gn?&nm^5Jd=Hn}k7$0axQgXh_V&;r1q@QCRy!Nn9eQ@MYhOLt zF??41DXJc01WY{MHwveyYPw$>)okM{ON{W zGMfn?($9-fIA#$LKroXMB9t}_YQ#(#9U4Hh`6<>`3>Zo7^Dd-n(J~*sZm1T~(l6`? zhdNzuM>(Eo(@#{0QpBHpJ0Vrc;7w}1;WQ*3?X$4Fu#Ew=Mo955$O?;kn^{)z3Gt4g zRv68dXt-W@kNPOsCp9P%nignZvx`5i{{ZLB54#O~UlPR34$Nte=y4RG?mvQ&H+C@? z;IKBBXVY`k>Zy4eHNh-UG#d!o>OiXW+%r1rTZIch)F;)9G+4$9ofrMqijG9I?jwo~ zdrRXmi^qkt<;pyv3R<^xn!<$#7j4&hfL)TUq%s;4TC8?30?9}pMzRkT>kvnVOrp|u zTW&{HORfvOvw(lNm|+Xe1~voCl1thtxv-PC|(1!SHaeRY<11R`tqnLpEf2_ z@z_=f`W_fOtO3&86Q?5ij0P!p)77#1Do)#Y(JodJ%y{!`uh1kO3!M4fMH9904Bj2b zW)Idz?Q6mwLq$VQ4ul&F{F|PcR9GJ@^H~O1HDhP$ongrf!np2vo1Kbchp>?Ijv`Z8 zIhynrsF`(Mmb8u}D62CB5X<@1#5(COG26V=)Md4k36=sm7P=L%L|mv1zFtDZr4+6< zSY>Sa0aC1qVCc<>&eW9gdfT&tl<4(?{6n;-@UZCz2|=B@9*8bc;$OLwRkg+ zpAXIK^#z|WKW96$Il}is)?O*9`l+W9dRnM?qB*JkNR8RY8vzFCiCFEZT|QM88tu!P z?)99-6xhME95QcgTS{%VlrD^LGh7YiUu&;LevoNNLrxVal~XJ`T`jvip5EOm!Y=t{ zqojKZA>1NY{l?M<<`E}&E2e*OCDu2*?!neI0{71rE`f6ub-x^Ypv&?lD&suthsy;tKWCND&i%#l>bexX|`3G?|=5#p6Q<{&Ul~ zLtJ~|`G}{6@c;nK4;A^>reSYlXy{;1`{xV&AG=3}g1U7&9jaG${kzXEt?qytX6VWy zB~2>D`TEoA(-Z+cG<_ou$yT#>&!L}jQnAQ$AvO`?51AKhDcWZSXq^7c{PS$Nx)Q)8 zEuRHDMuwv=nv4%f=#u8a$`#<)T!93tXn4F*tP{N$%mFxr0+x2)8yi!<#crF&j0KeW zVoQq^lGZ(zD94&I*7W)tppn{Ue2WWBtB3u{6(o>YxMh?7D8z56jtqxZSF&00P2a6i zlRm6^$|Ah>-fcsq-BcQ!I}QIZ-p|}n!Bn8iU`~u9;`&qTBdyf%5a{PruN6jPku@C~ zaapLBojy|Ey}B30N=9`hl~_DUECeU)YS8z17Qf}(;;T3;f)x0#Y+*q~u|dY$YUa|3 z?X=+z>^7wC--kJdzx$3Aicd1<{TMc1d!3k)a}IxKdOM|U$#{W(D+9qraWOzPud(sx z6?I^v1-&l}XPuJyx%V}bOU8SPj|a>`Qg~~@*Kia}p_@7fAO>8X20?Mgq@XC(xiv^o zxaap(*@S&y8#jw!U1wX|YY}c&u9SSpHCm!p{>U{Gd9czYDCs7uh;^!~gSAO$c$)C+ ztToy71OhW(lL2J0?3on0O{l4)&?nCFbK7P+=6z@B8D7Zz3cK$FlrkE_4p&UCr%6rt z^2Dm8c*<0ak!c30Jo05^t=N4Qy9-Ren=9c8JZs^$EhP9Uk%_zZG881T8{`UnoRKaw zzt#fKv=eU{DS3wHF`Ws=m@BpvnJ8y2d7SU25iN@41$9p=t|)<0$v8)6qx7$8T_Vjg#f`G@7UA!+ZKSO%F)!V<(oI z7}n}k`IkXWX&~+PQ+@0RH>j0GrQFLf8+bmC`+MW*U2&7Jn+-MJha7dkAH==9L~Mrzl)^ zhw0jI3b#{dn^UjA02;KplBg1#l^<(PyHu<{1q`P~sj1-tUQ} zAv$JrNd~&Nj70$r!^j7Z!?9QwW+@!&be}%ow|3Iu9-u=-*~=sM#2OWm1Ss0cGXO+& zRl%^^>kGnf);{^Vs;WAH9>}G~0nBo0HA*Cto1LA5+}{?R&r4Ov?^`wdYtRY8nv z0fBz@`}&)UOGe`2z~w@WWT1sx%o7Vs{F_<^`K_V;vf`?2zxbPqOHT^2?98Ym1D@A` z*YZq?Xlf(c5Nd9Z5=1i9gl;({)RdAugHLO^b3A0gSH|Hml3~vw9I?^t{g*?7&8vHZ zbINDE?nv5eO+nL5;T2~QeKNxp=Nx%{|BH_wp3&$0v10AiiGodEfzgJ2SD~L4slAgb zcjGMwSdd1mR)&~nCVny7iSk_Z)z|7uv z{hS8Lg4rnR3~J0a_A8z`s2yi?16-R^mEqUZR=x13XUcub(~5xyDFZH01&UydVHQVLjuQWrb5(te<;808 zQ*RKi&a@KIL#1d;aFut*;37YcL2YYNaD`DZF}3D!pTO$bc%1pTlTAc8_%1(XDNV#C zDlLiw!QcbUBd%gQhD}Fy6v|Upmkph$XuwU3gpHV|A5^4p_@msT3yBdIXd3<@I2@qKM2~hUpMQQ)wK;B z_-T&#GfD10~e(86_uJFLc-3GJEv540$6%>Eq$O6Bu43;Hnne)a74_t#F#|8Im%ad?-a{U~tTd zyVdlAbdbb|rIwW-+eB=8ZrHO1AHDL4*6$8NukW#92V!0Y9mz4C;PUWL`*TE8ApAA~D7UtEuRB1u@hh^!wFT_hWltDX65Ko_LL8!UljYcLG zvdyuL<03S0AxND`Os6Hp+MiV_OsCeR8E$a7 zy;*%Cd6+ZoeP_8IbxKzojiG(yiZcyWHe}dh1#SwV=iz=H`*lIh(|GRTvzTsJ@C&UM z@V@Dy^qJU6WHJvwGZCgL4cpC)KScl@ZF9h4IEDZ4`@HK56J~tR(_QPN-m>JgvcJ;Y zHUDUKo&(boKMiU1p;GJ3PnV^aqKE7jmBk72L&=mR-T*4O-uGC#klU#NPXydT%-Tvv zwL5(BZCT*V6B0z}ILst#$Q+JLfF5m#kZe+b>aRu=k6bCpT4|bBZ@U7j6M}!RfW&pH z07Aq-?E#xrn1Rjp$T$kg%|4a!dp+}fr3Nr|(M z7!qi?Bq`o27pm>+$X7JNt(&e`1O&UcCKzls!NO81%f7|n^55i;L$*~TxK(9?q?Ll! z#ivivL=D87;|$V8OJW0ntqmh4>HLO`3h4dT#CNFt9LC}*kztT~IdBWa+GCL91dF>; zV^B!8-JzIpbf-f**rgzf!YJ4?GT)32_1b&1LcfuxZL#8|pssfx-%1*MgL<+7W#Vz7@7GZ%6lt?Fw@50FEF?;7APHcU!WIT1MlJw?7L0FnrYee+wy89kn zfBf}pr)7hFU&KnVJ1Kgd#n5gSsEHmAli8vW4Jf*Q=FZDvwd`8%Q~B$M8UBlQF^=~@ z_tGJPPH98E04d2F6&?-5L*#ZLu393`W!9*ozHfZqW44C>Djcg^?IOOy6S6NB zb-F25Wl}%;DUH#(shd&oYzZgWa#ZPa$uQ~eQ^&!xzbAJ=Y^23ug^}MHWI9)e@s*vOuY{Zp*EEkQ?7yJT+>TeZ%oEt&C)c}@9 zvqsaH>6{J{*zBYH)0tWwL7zLhpZ;c^wblnBVp?-B6TZ3ZCj%#ER&lJm9XE?D3lh8C z__}Z@+R8R3$Tp)H3Z3)L`~`KIifWNQnC1; zfgY(GX}vIV$Y`%2VZh4uc#oxZvg~3R#N!X4-XPvN-CvmUqmjx}8hQPNb`i*C>>dQe zONM*feh_3<6eNP|y$P;;h%no6EfcyOLQ~bip3Qw;ycnU8dvRkL><>u#WOm&~ub8B% zvqo`)WcLE}{;1zJ;K(#DL5waC?_h0tk5+6p$(EoWmIZBKQf3)T#Srg|Ch%(8{Zcy! zFdV{ajIaou!mCl@vP3s7Ox#t+omg$HvO44qI^Z7&3J!tNidpDR!{(9iqH;Is>)*SK z4;|f~ez~^f>FFFD_g7AC4zKJ!B*?f?V4z;WcmiX{`1B&d9xw1d1RHWB4P4f-o~k#8 z5L55klJSr+a7W037e549aT3dxL=n|UJ(~uVdxcMS%oBq(?{L;#4&yneG}o>1YK&FWjA2QqG04e(;2Elh0Hbp z$HHxOWktoSI+@M?0M8Q-YbRV1Po0OP;RP0Vfb-^5rRsTIoO6^aJ!Zz*WL?-FRXzbZofMQvU$gJZvz%;O)N=JX@9e{S7EBkmAb^9 zfbyj_qQbmG z{82j9b&#SWQbWZ^sd^J!-cIXz+zFvwx69P#38rU^vx8`|+OD1 z52>Ze^jX(`C5BN=d()|)0KhUD008%w@3(hwwJ@~*gALB9NL#Nmqjn)IIU_na-%iF= zcH7AgA))7hfs=qW5>v}E(}yuqu*YzmHfB0uJFP)1RkopHwo2Cl&YG5pNmb3T7o*l2 zMB!^i;xAq|F1W5<$EM>MiU*m{!M49JWTLDx(uuo>EpakvYYcScnxZ1tqRLL#7*yHn za$|YF&X>fPhtXnSii1ehd}6?mqmiaA7eQwg9)Qx;1K%{z*c0iM8LQNzq!WW_pe#-@ zU-eBS?j0NHHO)HJClTHWp8uYF=@CkjiX^tDw#pF6$<~qbm1Zgecy8t>zn>zLw^@i1 zo80XlgojNOl-7kzy1QziE`sDypg9*!jlz`LcfaooTc=^$#eh~A2=yJcZ*{0xHXFWS z#&EC5W0Dh<;Rh?VxIgZWh!?~a$Z-9>O_@Mj_Sq;b^UK{VwZ9Qt<-ghDD zP?*$2(T|v=&|yBC_#|!maBh{4lC^1whT`8{3w*TZRqR|SO==_?7AiR z^$2^^ko6st+eRoQ7(rTx2%MA78rEBF&oylbz<9I;E`#5ocPdSv@Tb%zBZX0ok)?$B ze!|>QJ|VwNHYX6;4CW`~uo;Jxy{(@fo`X(9Jkv1j1K+9=V@-)&tI?~BcvyNKs73M# zEVZEOFjF{JRr)>Y)mj{KLYs_p?=kcwXnkJj8dZaXSW8arQF6@~g`x18IuNsBik7*% z(@$(Sqr)c>`}t)Eb`J+VjzsJiDP4b}9@SS7_eJgfj*}&}A9b=u4?Z>23=n?p9N!~7 zL8y}*@IcVY2p^zb5b!l;O|TW zF-!?A1Q4q7*ZV}y-yc;7K_-O9?7Gx3W$2p99(quPg7=4jm#ty+hp?`6RN(Qoshw54 zOvr=IlcoqbET22bI!ud#TE#=h(if{Y-=6Fb@G>eP!7|kyg$rAmIl7J18mYD4d1H^E z#lw9gF%ExGPE3W3l#eIJE_3q?QL66CWZsoo4>KjN2pTj_PA1?w_>I#V+GK?%qVIiX zrXD*Xm^{!ul+v%f;1K`P0lu&!$4$ix+*@3WOv2#JnGM@}$o*1kkKo)-ozck*YPxqT4Fm1$nD?_R>h*hO_}D~Fm{u@oP1}+HOHKB3 z)OtAA>d_qt<0%}-6RBSSfamW|f}e!{ZqgQ1uxy z!ImiQuUwv@&h&;NUt1;>;54%Y(k2hNvgc5?cD^u_#bM7s#=0KqqToYN$Au{R!B&=0 z<(CPw?5Gclq31{#5|x5BCw@Co)v32fjXCoC>KE19hgs`<7V~W#+BGd6?q8^|i{Dw&mcof9gY0DIETAg;Qq5GDK-rYI z5N3Y3WY&p}6TK>6r-xTE?1U$Qk$$?uBM(*Mql!Xs?#mn(LO$?g|J4PiBJ=iHsnDau zzFL_qA@&z?;Gq1}LS9ADRgc=`u7E1FHsa$b#PF-zA zWFSerd*X6S^RnLSh=??WON|aHx@S!oU-oW1k(|t|B@HgjPyS%1Q6??isRU=RGs@*o z^8MQDXonGnm5<;bR$-$O6#^Y^x-;KoH42i8`>dq<6-o;4cdHLZ|5;ALtWX%O`v@uTJ|ee&m6HtY zbe;dud)j|p{1w5ej9aZSBX(jOazM7vwms**=~xn)Du46orr-GqWJ0}|%qvG2iFEpn1KUoB-~h*q%=2w$$<}ysZb~ec=)ocsm&~li zazHX@<4t25lg+7i$IeFFRc>Kn~m36*)3f~A_!D}Os{#6liI_P9{n80!t}Pp zy+pSOv7#_jds+H`(lkiH`D3p-P2a#2l~7Y(6nzK2@Ki$dTd)P5C77D3flq@$#zEeO zC{rsoY1?!esW#XFOdYWP3V=?FW&HECKpY8z{-9xSB4Xh;ZXo)OFgULq<4V^B8)x1=jMreBjrvibF}D+VOwCrJnPt+a$w6g@+MN~LAT z5x!5<)&V71ag5?<%N33T@h9^m^@%Z1nvEK8XwdE?=4qMo^piL$2q#1fo+anYcIHX? zHaNOiIFh&CCCYx9MpM8u#$X-W4=?Sop~osTImt)ewy$+QT>DrvL$SEs9242%^yuAl zy)n%lOqA8z7}z+VB3(hkefvZLOxEsu-Gd!3OU^R&lQBN)k+^Siu#F0C%ySkRJT8p1 zq&j|na#Uad>;AQa3r0F7B-Y-VQ`qMbK*Q_wYHR2jsp2hM_ugE|&N_TDMoi3!@_i=M zuX|{PYxosAGinopkOn-uYDcr+(sb9+04;gR10h%bn$Do0fl2;8jdv)do2=3>QZ2=P z-=-cdv~MnT@SGYkpNFinUPx}CLhYues;l*Efivdf3fI?)}26HSe0qREfhVugm*5Ig~{hm|r-XC=28;2KtO zYn98YN;ndJ5OxP*daqS~{UGB1Y3R9ioz*uVhK_*`0O0(!%l(g`J6T!?{$=#^G#}Te zsguz=%&0>biO)PL%ODttwKw4|P%~y_9Sw;qWn2|yiXvlMn&d*Ex(qLi56kc|y1}vy zM99H};J7?5%ad=Hw++V2sK7nis_( z$_v*lTn0;C*&j^bgb5Z5Bv`31jVVn#B%LJ+Che-He7_5k!jHBv7+D^;#-3}b$Yhl< z+SYt!q4`PcQIQ03BFA-sx#POyVWr{XsnkyjKT=R}o#w3{DqwTiDt~iCcvxh$r zzEWtG&N`r=;%>MK{W4$UWJecQwx=A_DWbJ-tm?DqN2Ro!N|X}j6o6mOcu=80rtrjM zn}AOjZ#c|Qc#z79mJoI20L=PrHnL!l1`5}JqthKJE3@B#+`Ov!i)m|B;S$xo7KCEK zJTa}YpCu|O$6cqVlASSrwo6qbDhh#w`XE75m=IDz*SJe+U69`HUblJYPrq_wvoJr& zsUVnGQKIsG*Ct<#zQftx*F`=j*C;YS;z@+@=ibI7Ci%cIqI-wxJ=1Ruv`eHmLNx8E z>kH=4qbZ~0s}#0kstlO$eKvNQ#xG$#Sxx4yE570L3!W411%TED3!O$c2=Z^##%zl? zz*MZ_fq8CzDC5}tqZtHIaE?4RH$!p9Oqmr)_BClvqffq#R%iAC1OY-@7`zy-oo~P! z?+iHa=?c_RCd*UW`@XMz^Y^|`va3FhciDhbs(FGD3o0rO`aLP6)GQu)sBw8z+5@<= zMo@18!kp-usq*O3l2lWhidtFbTZE^2yM}KVQHcludD)fcMi0i<$`-_mb&^BpsKqxi z^|ESYyn7OCTAGwWUzl69GA?J^B6fIoh4|QG_af|=L3vb(SmVq4wI$AhaDrm?W`3sW zyQU(y>3B1qdo3fg(;@OQ+o|Ds+ojwUoYGF?G9V)tka-^#R2xJ%p#~Pvd0XkSzOA@p zsVcHq=0<3e^UsLh1Io1xICH!FG?t zBOQb1tW>1U7;Ul7nGZ)_k5%6--0ssqDCad@B*X|8>pBZAe-w zuhY8~E|QAE0y<|8{VRR=UII!e)a+3z&W4VRdY+RiAOp;*AZx7>Y84QyU$B!|xW7Ex z@GPImP2T8v?%RIz)yb2N60T@-CJaY9aUaB9E$5=DphvVKBG`ck#i{kuuk!CaVt=Di zca93bn%~vq`~y?{Nw+j;k`-G*4ad?>zof6k`a9V+&J4EpJmC^vZKrX?w%@ZuQ}Nda zo8gs`JAy$s_;)z1*Z)ci_!-$@c0YWC&<86f{>xYV(WmsU9+STsm;UZF`Lk`QB6ig5 z&xY;5H~$n*5)NNEu{{fZqSZLBZo)`{ezzRio5z90Ty=U>nO0F(g$fcV!M>04V`evC8N|3#QI&8@MQvEH;w-+``b z=Ru7ygL=NJ+Mczpm&C@E91Hsm(SOD;CzM?)Lyof6>2_jvYVRDJSgA$1SeY==*QeVa zI?cd(Oz4_=7z5fNVI@kSAzuysG};X+wc)z4dZTsteyqi)*Ge@UYQxE_V^pm&PDY6y zh7hRV1Tn^94T?E!Ax7d~o2x^D9}hmJFW37k@#LZF1YsawmNH2qWeZL(6zE2Tfo;XO zmV}>JjxnVfnIKW`a>Pa>3OxQ&rqfb1Vnoh{g8q}}ut|TfYNa13Htf*Y9^P|auG0ny zcEY=@ae}Wj0UTLhQ*W$|orE`S9VPZLPCH)sXpcG)>mgUm)!@S(!Uiig{P2~a2dgXC z#t&oyeE8r3go&YRbk$az!8rQ1XMg87Vq3Q9#{ow!To9}~^&dA?gS0k$nhcu(D8oNN z;=jNlq^wsg3sw=}V$=DTpb+=SmcG4kwOmMHX1yiLqjFUUY+>Iv}k1up~Zw3>Wihf11s*D7Lkz>x%2K@aru?;?R~01T-_rV z^FIt$fI1*gB_js~-Dm^mAPiR_d-tB()0DYFT zd9qjGr&IS8sFAAZ)7`$)Ohw}qgy*P5MeY0xSJN1i z2;5pNc?L!Pu4@R5%oEYbo@t9_tK#LLe&6=0zd#XBib_a@gm(eBq|lFftHY7IREaqt zFXIasAWq|^*}Pcrz16_>@k`ejysq?~8GT@p5C|wRYUfbw;-Jp)=}#z8*n>Ly>Xexj z#>*?$lNi)nL-97+>Y~m5FpqfmKIvELTuy_!`*;zn+qVo-U90Eys;XKx93`T?)x%dY z2_i8u5lL+z4wwc;3dMT<0=HAzVnl_gS;|!AD_-c=YJ_rA6Q9|=0Mavd!qveADRZ1- zLk(k_NlCU&MBUG)T0wU=%!9t(td?G}NMOP04(y&lUEQ+zh9<{`jvleSBoUt?z3sE! z)@BinI$zp3hqDv;W!;rL?6Y$BRO;(4-OlvjSI;x`8ou*a-W}OaLv$?ls~-0q5E2$% zil_sx#HInL5hFey4lhB;Z zU$(6Oj^GI8_!|6EQ}(Os-KAo>7td7EW-xFyp-Lct*aa;1YBjfi|7V9%&>fUlai4YF zGb_P2FfEFMiTNTMthfo8ip9YiS%3mG4{{EW)10ue%-h=;n!Z{P)gfJZ0zu~{yUvTk zNw=cOTQj|%JHJVfA^}rvfz~(XIZ10H*W@Y?w}?4^k?$p|M{!COhoSnKK;EK}`Na?O z~i$5X<;dgk|GJ@Cxg70N>pcvV@L692|ne!h?p} z>XnhGYO|Q<>cH?632A|u60|>AfoebleFC*T9xdF|l3JK2JeMNDI@d#8)cvxY`J=KA z;X*H7JDA)hIsMHVIS(EIU?Ien3Qj$;bDDY>SH@Dv$61t6Y<@zyw)SkNo!MUy%uXLz zqz$x;U?%DT981iI;5<<8^vFY`(up1|?B)vX$Q9@`YH}<{$#uNXMgc%S52+%~mpLu` zQZ=J{%*#_VSYhcqp{OlcHUQ>$4>e+~+tlEp;(ooZ?s<&w|GK|Y=n;QVPOazz6JX{V zUq~cNo*?G)P+de;Muk8_^vct;*ePJ^NHuqOy4$9hab)De7tC~S>X2)dS^6Z<>&hs4 zY;}k30I6`%kj`}%r4FW$Dw7-~>jsw?MlyG(1a%zFfN}G$j>e;wHr9qh2dW)& zmuB$8-!(?%J=id|vD@@Fd3;1>Hkg<;X5bNbd*apOzqEzf&mL@EOFKTtryFuvb@}VM z5=2PbPHBF6w$K{vd-h~bm%e>;b#rS5a32p=$+`^brxT<$_SZ^K7G@MSV35|A*2NXT zmtiEO=bOlc<`qAU-7ThMeRIj3iT7CLoj++&EE&eAYxezqNqkkKVB6~Q7Lf$vt5;S` z$_N7`j9;Rev6@WAXSY;dU^o9!Pk&BnH<;R~gr=^G){TP#1qFqw|DwawoDj5jYBDSIteEG4Vx21om~sk&_i$ur!zHcu7cK`lc%B z{Kds}MkP82EHf5A-B}j7QA5ti0giW=SVs|0rh!{uR4=@Zb|za(v#g)Hb?n+r14T=~ z8S|syK9aWAxVyHOoV)0%#NE|sG>*rEs8@uIC~%sl^5->)5zJyCfcD{kacWUCvWJSgc%i(QpoMUWqfs!4Wj zM#qR8C7Z;^#0SgYM@JedHb{47h@(JXaJ%eAkuRf<$2oD)X@cgCT@CnA;;N5F4@S1JpqD7!^p<*I**dvsa?`ar-s^!aH|na zaAWW*bC;ryAbc|rk{T^$&$+K6e#Q8)GbH2q4KoLIeFKCE5Q{kqkRnz3@fyuU0FJKE z*DpO0Z}&iHT0QBOO$a8n@(Wb;838fW%_A_DDpPSzF{Hhubw3S!LffG~DPc&bl?dJ- zn3dXUpmB?q?^?5Ldu7x=+pBl)fwj$kZU&0NU&=XsxbhOJzm^Kxt;99I3GtGxk%u2U zDqZR47L|i@aq293t=kIynLG{F;v6*9RUasm{euG!_`pCVdUmi`RfX~Awk2+#eMY9e zotBELbo5a{z4W1*+(K8VPZ-w=&G$z9!eebP-cAS~K{JCR7O0(W^o0Xo235$Ngb^af zKz=*5Y*06LsjS>up>LV(=A{v7o(ly)H1IN>Ti>wTo`##`8SzOq-v4Wjko~iS-S!7V zZvFW5|1f1;3w;3-T~n(+%7g|n|1<09&*XmG93m%^F+x~7jLzL{S0qWo^J%qg>jEpb zU-D>XXmQB7h}(l>bOLi0u^qIw)F+oE7w4B~@8ZEwAHK@Sit`G1G_n_6Pi{+Bd1T|y zjzxcCgG*8V?3>3CR|YQjOlDm{X_g_x%n64G@~pv-R&g#przGogvmrdFoKm=OWHllm zIOIcNaYdiWUzL}E6nspSl=$K$nbTf(AJ!rA!tfIQ1U|Lt4VNV74wCgwI+viLC@U@A za>6!OWuvxe$jwAK++FoFXEpA+>~`}}Q25Wlfs3i>Q1W9bv_FC?q>oV$18aR5J8K(z zT77Ff!#~#JV_fooCqO>*#UqYSx{nYu=z{DmILIBwvPnpEmDJ41E;N)0+ZwdfvY(%W zx9!#4v}v9OJNmMdlhcDp`&1Fn!?*VPG*}q1AMjK=lAJa4tsHe94ywvfy^dpkE-yrl ziL93PetTg%{iQ(~dPKYqi1bX-btA9(fm&GYzPikqP-m`ZvsHxN1noF@Q-pU7+*Uvg zER~G}-H;6e>}qU?lt_=T!HelJ5Fu+2HmZrSE$+Z$@kuwu%YiRZDr2HU@Iu#70f!-s z7wpje#z^gwqvl+pf6znp)#~w;tBVe|@+uL^$X-oK8F_#QKyKPFZK+xzm|DC^&u>i4E({4>|cS5&J@zEGzP>piHt z9p%Qb9F|(o^5PS(Xzo;`3*&sai{Tefz3ctrW&I%iVItY zbPqVUUy5D5$ZSUs#lJ+SdkWAyWHkKhk{s3fXg1b7O9QQ#4=%D@02Heqo15$9$k;l; zeWZF6j0u{+GvoBr#WKVhAEvLR4#cA58yL52vZAKYSouk{VUD45aW;W1NGjE`8cbOG zBTkzbyGwtZ`_zC?3BpYK9e^$^2NgtX3gF)DR%d&Ad3!%!D&|ZI65xc$T9kyzcUG4+3)TR>i($Md4@az)kc6gbDXMFa%FcYbE zcB>coe^ctE9HyJkA4(1X;aEQ&FYyn@>S*s^ZTY`?{eQF?04Ru^6z`+^$ng8U3;gJi zOru_jXw-iN+u`e3b{CzkoFX9=Ef)B-IX=b4=`y{$`|{X6=}xQKHG+g2Q0uQm8Nm|0CSqT&=>e`2T$qh*W$~jE`2*$mF67?|;OsBN#ve O=zr82dIkS@_x}O!F(AzV diff --git a/Config/Excel/Server/~$MachineConfig.xlsx b/Config/Excel/Server/~$MachineConfig.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..fd5ec18548fa218ea975c406c092d06f02ee4679 GIT binary patch literal 165 fcmZQIGcYwWS0ELzGMF(KFqkqJF_<$b&>R8)fr}1P literal 0 HcmV?d00001 diff --git a/Config/Excel/Server/~$ProcessConfig.xlsx b/Config/Excel/Server/~$ProcessConfig.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..fd5ec18548fa218ea975c406c092d06f02ee4679 GIT binary patch literal 165 fcmZQIGcYwWS0ELzGMF(KFqkqJF_<$b&>R8)fr}1P literal 0 HcmV?d00001 diff --git a/Config/Excel/Server/~$SceneConfig.xlsx b/Config/Excel/Server/~$SceneConfig.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..fd5ec18548fa218ea975c406c092d06f02ee4679 GIT binary patch literal 165 fcmZQIGcYwWS0ELzGMF(KFqkqJF_<$b&>R8)fr}1P literal 0 HcmV?d00001 diff --git a/Config/Excel/Server/~$WorldConfig.xlsx b/Config/Excel/Server/~$WorldConfig.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..fd5ec18548fa218ea975c406c092d06f02ee4679 GIT binary patch literal 165 fcmZQIGcYwWS0ELzGMF(KFqkqJF_<$b&>R8)fr}1P literal 0 HcmV?d00001 diff --git a/Config/NetworkProtocol/Inner/InnerMessage.proto b/Config/NetworkProtocol/Inner/InnerMessage.proto index bc4e9bf..496ddba 100644 --- a/Config/NetworkProtocol/Inner/InnerMessage.proto +++ b/Config/NetworkProtocol/Inner/InnerMessage.proto @@ -33,7 +33,7 @@ message Chat2G_CreateRouteResponse // IRouteResponse // Protocol Bson message M2M_SendUnitRequest // IRouteRequest,M2M_SendUnitResponse { - Unit Unit = 1; + } // Protocol Bson message M2M_SendUnitResponse // IRouteResponse diff --git a/Entity/Chat/ChatComponent.cs b/Entity/Chat/ChatComponent.cs new file mode 100644 index 0000000..5afd10f --- /dev/null +++ b/Entity/Chat/ChatComponent.cs @@ -0,0 +1,7 @@ +using Fantasy.Entitas; + +namespace Fantasy; + +public class ChatComponent : Entity +{ +} \ No newline at end of file diff --git a/Entity/Model/RouteMessage/ChatUnit.cs b/Entity/Chat/ChatUnit.cs similarity index 100% rename from Entity/Model/RouteMessage/ChatUnit.cs rename to Entity/Chat/ChatUnit.cs diff --git a/Entity/Entity.csproj b/Entity/Entity.csproj index 137382c..a7b455e 100644 --- a/Entity/Entity.csproj +++ b/Entity/Entity.csproj @@ -19,6 +19,7 @@ + @@ -28,6 +29,7 @@ + diff --git a/Entity/Game/Container/Container.cs b/Entity/Game/Container/Container.cs new file mode 100644 index 0000000..7ec1262 --- /dev/null +++ b/Entity/Game/Container/Container.cs @@ -0,0 +1,46 @@ +using Fantasy.DataStructure.Collection; +using Fantasy.Entitas; +using MongoDB.Bson.Serialization.Attributes; +using MongoDB.Bson.Serialization.Options; +using NB.Game; + +namespace NB; + +public sealed class Container : Entity +{ + /// + /// 可用格子数量 + /// + public int CellCount; + + /// + /// 最大格子数量 + /// + public int CellCountMax; + + /// + /// 当前已经使用格子数量 + /// + public int CurrentCellCount; + + /// + /// 容器内的物品 + /// + [BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)] + public Dictionary Items = new Dictionary(); + + /// + /// 容器内物品,按格子进行分组 + /// + [BsonIgnore] public Dictionary ItemsByCell = new Dictionary(); + + /// + /// 按物品id分组 + /// + [BsonIgnore] public readonly OneToManyList ItemsByConfigId = new OneToManyListPool(); + + /// + /// 容器内按物品类型分组 + /// + [BsonIgnore] public readonly OneToManyList ItemsByType = new OneToManyListPool(); +} \ No newline at end of file diff --git a/Entity/Game/Container/ContainerComponent.cs b/Entity/Game/Container/ContainerComponent.cs new file mode 100644 index 0000000..92b7ea9 --- /dev/null +++ b/Entity/Game/Container/ContainerComponent.cs @@ -0,0 +1,23 @@ +using Fantasy.Entitas; + +namespace NB; + +public enum ContainerType : uint +{ + /// + /// 背包 + /// + Bag, + + /// + /// 鱼护 + /// + FishBag, +} + +/// +/// 物品容器组件 +/// +public class ContainerComponent : Entity +{ +} \ No newline at end of file diff --git a/Entity/Game/Entity/Currency.cs b/Entity/Game/Entity/Currency.cs deleted file mode 100644 index 592e240..0000000 --- a/Entity/Game/Entity/Currency.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Fantasy.Entitas; - -namespace NB.Game; - -public class Currency : Entity -{ - /// - /// 配置id - /// - public int ConfigId; - - /// - /// 拥有的数量 - /// - public int Count; -} \ No newline at end of file diff --git a/Entity/Game/Entity/DayFlags.cs b/Entity/Game/Entity/DayFlags.cs deleted file mode 100644 index eaee747..0000000 --- a/Entity/Game/Entity/DayFlags.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace NB.Game; - -public class DayFlags -{ -} \ No newline at end of file diff --git a/Entity/Game/Entity/GamingInfo.cs b/Entity/Game/Entity/GamingInfo.cs deleted file mode 100644 index b99cbe5..0000000 --- a/Entity/Game/Entity/GamingInfo.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Fantasy.Entitas; - -namespace NB.Game; - -public class GamingInfo : Entity -{ - /// - /// 地图 - /// - public int Map; - - /// - /// 位置 - /// - public int Pos; - - /// - /// 进入时间 - /// - public int Time; -} \ No newline at end of file diff --git a/Entity/Game/Entity/Guide.cs b/Entity/Game/Entity/Guide.cs deleted file mode 100644 index 79b2d4d..0000000 --- a/Entity/Game/Entity/Guide.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Fantasy.Entitas; - -namespace NB.Game; - -public class Guide : Entity -{ - /// - /// 排序 - /// - public int Sort; - - /// - /// 配置id - /// - public int ConfigId; - - /// - /// 步骤 - /// - public int Step; - - /// - /// 触发时间 - /// - public long GetTime; -} \ No newline at end of file diff --git a/Entity/Game/Entity/MapMatter.cs b/Entity/Game/Entity/MapMatter.cs deleted file mode 100644 index ce58057..0000000 --- a/Entity/Game/Entity/MapMatter.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Fantasy.Entitas; - -namespace NB.Game; - -public class MapMatter : Entity -{ -} \ No newline at end of file diff --git a/Entity/Game/Entity/Mission.cs b/Entity/Game/Entity/Mission.cs deleted file mode 100644 index e298f80..0000000 --- a/Entity/Game/Entity/Mission.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Fantasy.Entitas; - -namespace NB.Game; - -public class Mission : Entity -{ -} \ No newline at end of file diff --git a/Entity/Game/Entity/Player.cs b/Entity/Game/Entity/Player.cs deleted file mode 100644 index 37a0e82..0000000 --- a/Entity/Game/Entity/Player.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Fantasy.Entitas; - -namespace Fantasy; - -/// -/// 玩家信息 -/// -public class Player : Entity -{ - -} \ No newline at end of file diff --git a/Entity/Game/Entity/Skill.cs b/Entity/Game/Entity/Skill.cs deleted file mode 100644 index 2c10135..0000000 --- a/Entity/Game/Entity/Skill.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Fantasy.Entitas; - -namespace NB.Game; - -public class Skill : Entity -{ -} \ No newline at end of file diff --git a/Entity/Game/Entity/UserInfo.cs b/Entity/Game/Entity/UserInfo.cs deleted file mode 100644 index 537ac07..0000000 --- a/Entity/Game/Entity/UserInfo.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Fantasy.Entitas; -using NB.Game; - -namespace NB; - -public class UserInfo : Entity -{ - /// - /// 基础信息 - /// - public BasicInfo BasicInfo; - - /// - /// 统计信息 - /// - public UserStatisticsInfo Statistics; - - /// - /// 游戏信息 - /// - public GamingInfo GamingInfo; - - /// - /// 货币信息 - /// - public List Currency; - - /// - /// 拥有的物品 - /// - public List Items; - - /// - /// 参与的活动 - /// - public List Activity; - - /// - /// 任务列表 - /// - public List Missions; - - /// - /// 账号标识 - /// - public DayFlags DayFlags; - - /// - /// 拥有的技能 - /// - public List Abilities; - - /// - /// 引导情况 - /// - public List Guides; - - /// - /// 地图情况 - /// - public List MapMatters; -} \ No newline at end of file diff --git a/Entity/Game/Entity/Item.cs b/Entity/Game/Item/Item.cs similarity index 58% rename from Entity/Game/Entity/Item.cs rename to Entity/Game/Item/Item.cs index 47cc505..a7aeb7f 100644 --- a/Entity/Game/Entity/Item.cs +++ b/Entity/Game/Item/Item.cs @@ -1,7 +1,16 @@ using Fantasy.Entitas; +using MongoDB.Bson.Serialization.Attributes; namespace NB.Game; +public enum ItemType +{ + None = 0, + Item, + Equip, + Fish, +} + public class Item : Entity { /// @@ -18,4 +27,9 @@ public class Item : Entity /// 是否绑定 /// public bool IsBind; -} \ No newline at end of file + + /// + /// 当前所属的容器 + /// + [BsonIgnore] public Container Container; +} diff --git a/Entity/Game/Entity/ActivityInfo.cs b/Entity/Game/Item/ItemComponent.cs similarity index 54% rename from Entity/Game/Entity/ActivityInfo.cs rename to Entity/Game/Item/ItemComponent.cs index 42d9946..724ab73 100644 --- a/Entity/Game/Entity/ActivityInfo.cs +++ b/Entity/Game/Item/ItemComponent.cs @@ -2,6 +2,7 @@ namespace NB.Game; -public class Activity : Entity +public class ItemComponent : Entity { + } \ No newline at end of file diff --git a/Entity/Game/Entity/BasicInfo.cs b/Entity/Game/Role/Child/RoleBasic.cs similarity index 79% rename from Entity/Game/Entity/BasicInfo.cs rename to Entity/Game/Role/Child/RoleBasic.cs index 4491360..6b76c86 100644 --- a/Entity/Game/Entity/BasicInfo.cs +++ b/Entity/Game/Role/Child/RoleBasic.cs @@ -1,8 +1,12 @@ using Fantasy.Entitas; -namespace NB.Game; +namespace NB; -public class BasicInfo : Entity +/// +/// 角色基础数据 +/// +[RoleCom] +public class RoleBasic : Entity { /// /// 昵称 diff --git a/Entity/Game/Role/Child/RoleCurrency.cs b/Entity/Game/Role/Child/RoleCurrency.cs new file mode 100644 index 0000000..c39d7b2 --- /dev/null +++ b/Entity/Game/Role/Child/RoleCurrency.cs @@ -0,0 +1,15 @@ +using Fantasy.Entitas; +using MongoDB.Bson.Serialization.Attributes; +using MongoDB.Bson.Serialization.Options; + +namespace NB; + +/// +/// 角色货币数据 +/// +[RoleCom] +public class RoleCurrency : Entity +{ + [BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)] + public Dictionary dic = new(); +} \ No newline at end of file diff --git a/Entity/Game/Role/Child/RoleDayFlags.cs b/Entity/Game/Role/Child/RoleDayFlags.cs new file mode 100644 index 0000000..9fcea59 --- /dev/null +++ b/Entity/Game/Role/Child/RoleDayFlags.cs @@ -0,0 +1,11 @@ +using Fantasy.Entitas; + +namespace NB; + +/// +/// 角色状态标志量 +/// +[RoleCom] +public class RoleDayFlags : Entity +{ +} \ No newline at end of file diff --git a/Entity/Game/Entity/UserStatisticsInfo.cs b/Entity/Game/Role/Child/RoleStatistics.cs similarity index 70% rename from Entity/Game/Entity/UserStatisticsInfo.cs rename to Entity/Game/Role/Child/RoleStatistics.cs index 289f8ee..ddd5f5b 100644 --- a/Entity/Game/Entity/UserStatisticsInfo.cs +++ b/Entity/Game/Role/Child/RoleStatistics.cs @@ -1,8 +1,12 @@ using Fantasy.Entitas; -namespace NB.Game; +namespace NB; -public class UserStatisticsInfo : Entity +/// +/// 角色统计数据 +/// +[RoleCom] +public class RoleStatistics : Entity { /// /// 登录次数 @@ -24,5 +28,8 @@ public class UserStatisticsInfo : Entity /// public long CreateTime; + /// + /// 钓鱼个数 + /// public int FishCount; } \ No newline at end of file diff --git a/Entity/Game/Role/Role.cs b/Entity/Game/Role/Role.cs new file mode 100644 index 0000000..0da5d30 --- /dev/null +++ b/Entity/Game/Role/Role.cs @@ -0,0 +1,8 @@ +using Fantasy.Entitas; + +namespace NB; + +public sealed class Role : Entity +{ + +} \ No newline at end of file diff --git a/Entity/Game/Role/RoleComAttribute.cs b/Entity/Game/Role/RoleComAttribute.cs new file mode 100644 index 0000000..f3ca35f --- /dev/null +++ b/Entity/Game/Role/RoleComAttribute.cs @@ -0,0 +1,10 @@ +using CommandLine; + +namespace NB; + +/// +/// 挂这个 玩家Role创建时会自动添加此组件 +/// +public class RoleComAttribute : BaseAttribute +{ +} \ No newline at end of file diff --git a/Entity/Game/Role/RoleManagerComponent.cs b/Entity/Game/Role/RoleManagerComponent.cs new file mode 100644 index 0000000..689a052 --- /dev/null +++ b/Entity/Game/Role/RoleManagerComponent.cs @@ -0,0 +1,8 @@ +using Fantasy.Entitas; + +namespace NB; + +public class RoleManagerComponent : Entity +{ + public readonly Dictionary Roles = new(); +} \ No newline at end of file diff --git a/Entity/Gate/Entity/GameAccount.cs b/Entity/Gate/Entity/Player.cs similarity index 54% rename from Entity/Gate/Entity/GameAccount.cs rename to Entity/Gate/Entity/Player.cs index 887383d..2d89780 100644 --- a/Entity/Gate/Entity/GameAccount.cs +++ b/Entity/Gate/Entity/Player.cs @@ -3,10 +3,8 @@ using MongoDB.Bson.Serialization.Attributes; namespace NB.Gate; -public sealed class GameAccount : Entity +public sealed class Player : Entity { - // 1、可以拿ToKen的传递过来的AId来当这个组件的Id. - // 2、让这个Id自动生成、在组件里做一个变量来记录ToKen的AId。 public long AuthenticationId; public long CreateTime; public long LoginTime; diff --git a/Entity/Gate/Entity/GameAccountFlagComponent.cs b/Entity/Gate/Entity/PlayerFlagComponent.cs similarity index 70% rename from Entity/Gate/Entity/GameAccountFlagComponent.cs rename to Entity/Gate/Entity/PlayerFlagComponent.cs index 679dfa1..b24e251 100644 --- a/Entity/Gate/Entity/GameAccountFlagComponent.cs +++ b/Entity/Gate/Entity/PlayerFlagComponent.cs @@ -2,12 +2,14 @@ using Fantasy.Entitas; namespace NB.Gate; -public sealed class GameAccountFlagComponent : Entity +public sealed class PlayerFlagComponent : Entity { + public bool Kick { get; set; } + public long AccountID; // 有一种可能,当在Account在其他地方被销毁 // 这时候因为这个Account是会回收到池子中,所以这个引用还是有效的 // 那这时候就会出现这个引用的Account可能是其他用户的了。 - public EntityReference Account; + public EntityReference Account; } \ No newline at end of file diff --git a/Entity/Gate/GameAccountManageComponent.cs b/Entity/Gate/GameAccountManageComponent.cs deleted file mode 100644 index 23172cb..0000000 --- a/Entity/Gate/GameAccountManageComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Fantasy.Entitas; - -namespace NB.Gate; - -public sealed class GameAccountManageComponent : Entity -{ - public readonly Dictionary Accounts = new(); -} \ No newline at end of file diff --git a/Entity/Gate/PlayerManageComponent.cs b/Entity/Gate/PlayerManageComponent.cs new file mode 100644 index 0000000..6b74077 --- /dev/null +++ b/Entity/Gate/PlayerManageComponent.cs @@ -0,0 +1,8 @@ +using Fantasy.Entitas; + +namespace NB.Gate; + +public sealed class PlayerManageComponent : Entity +{ + public readonly Dictionary Players = new(); +} \ No newline at end of file diff --git a/Entity/Generate/NetworkProtocol/InnerMessage.cs b/Entity/Generate/NetworkProtocol/InnerMessage.cs index 48aa0d7..c4f2a7e 100644 --- a/Entity/Generate/NetworkProtocol/InnerMessage.cs +++ b/Entity/Generate/NetworkProtocol/InnerMessage.cs @@ -163,7 +163,6 @@ namespace Fantasy } public override void Dispose() { - Unit = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif @@ -171,7 +170,6 @@ namespace Fantasy [BsonIgnore] public M2M_SendUnitResponse ResponseType { get; set; } public uint OpCode() { return InnerOpcode.M2M_SendUnitRequest; } - public Unit Unit { get; set; } } public partial class M2M_SendUnitResponse : AMessage, IRouteResponse { diff --git a/Entity/Model/Addressable/Unit.cs b/Entity/Model/Addressable/Unit.cs deleted file mode 100644 index 189609d..0000000 --- a/Entity/Model/Addressable/Unit.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Fantasy.Entitas; - -namespace Fantasy; - -public sealed class Unit : Entity -{ - -} \ No newline at end of file diff --git a/Hotfix/Hotfix.csproj b/Hotfix/Hotfix.csproj index 22d03c7..5151c65 100644 --- a/Hotfix/Hotfix.csproj +++ b/Hotfix/Hotfix.csproj @@ -2,7 +2,7 @@ enable - enable + disable default net9.0 diff --git a/Hotfix/Inner/Addressable/G2M_RequestAddressableIdHandler.cs b/Hotfix/Inner/Addressable/G2M_RequestAddressableIdHandler.cs deleted file mode 100644 index 92ad091..0000000 --- a/Hotfix/Inner/Addressable/G2M_RequestAddressableIdHandler.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using Fantasy.Async; -using Fantasy.Entitas; -using Fantasy.Network; -using Fantasy.Network.Interface; -using Fantasy.Network.Route; - -namespace Fantasy; - -public sealed class G2M_RequestAddressableIdHandler : RouteRPC -{ - protected override async FTask Run(Scene scene, G2M_RequestAddressableId request, M2G_ResponseAddressableId response, Action reply) - { - // 1、因为是测试代码,所以默认每次请求这个协议我都创建一个新的Unit来做Addressable。 - var unit = Entity.Create(scene, false, true); - // 2、给Unit添加AddressableMessageComponent组件,并执行Register(),向AddressableScene注册自己当前的位置。 - await unit.AddComponent().Register(); - // 3、返回给Gate服务器AddressableId - response.AddressableId = unit.Id; - await FTask.CompletedTask; - } -} \ No newline at end of file diff --git a/Hotfix/Inner/SubScene/G2M_CreateSubSceneRequestHandler.cs b/Hotfix/Inner/SubScene/G2M_CreateSubSceneRequestHandler.cs deleted file mode 100644 index 7508c27..0000000 --- a/Hotfix/Inner/SubScene/G2M_CreateSubSceneRequestHandler.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Fantasy.Async; -using Fantasy.Entitas; -using Fantasy.Network.Interface; - -namespace Fantasy; - -public class G2M_CreateSubSceneRequestHandler : RouteRPC -{ - protected override async FTask Run(Scene scene, G2M_CreateSubSceneRequest request, M2G_CreateSubSceneResponse response, Action reply) - { - // 下面的SceneType传的是666,其实并没有这个类型,这个是我随便写的。 - var subScene = Scene.CreateSubScene(scene, 6666); - // 返回subScene的运行时id - response.SubSceneRouteId = subScene.RouteId; - await FTask.CompletedTask; - } -} \ No newline at end of file diff --git a/Hotfix/Inner/SubScene/G2SubScene_AddressableIdRequestHandler.cs b/Hotfix/Inner/SubScene/G2SubScene_AddressableIdRequestHandler.cs deleted file mode 100644 index 1407241..0000000 --- a/Hotfix/Inner/SubScene/G2SubScene_AddressableIdRequestHandler.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Fantasy.Async; -using Fantasy.Entitas; -using Fantasy.Network.Interface; -using Fantasy.Network.Route; - -namespace Fantasy; - -public sealed class G2SubScene_AddressableIdRequestHandler : RouteRPC -{ - protected override async FTask Run(SubScene subScene, G2SubScene_AddressableIdRequest request, SubScene2G_AddressableIdResponse response, Action reply) - { - Log.Debug($"G2SubScene_AddressableIdRequestHandler {subScene.SceneType}"); - // 1、因为是测试代码,所以默认每次请求这个协议我都创建一个新的Unit来做Addressable。 - var unit = Entity.Create(subScene, false, true); - // 2、给Unit添加AddressableMessageComponent组件,并执行Register(),向AddressableScene注册自己当前的位置。 - await unit.AddComponent().Register(); - // 3、返回给Gate服务器AddressableId - response.AddressableId = unit.Id; - await FTask.CompletedTask; - } -} \ No newline at end of file diff --git a/Hotfix/Inner/SubScene/G2SubScene_SentMessageHandler.cs b/Hotfix/Inner/SubScene/G2SubScene_SentMessageHandler.cs deleted file mode 100644 index 84b04fa..0000000 --- a/Hotfix/Inner/SubScene/G2SubScene_SentMessageHandler.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Fantasy.Async; -using Fantasy.Network.Interface; - -namespace Fantasy; - -public class G2SubScene_SentMessageHandler : Route -{ - protected override async FTask Run(Scene scene, G2SubScene_SentMessage message) - { - Log.Debug($"接受到来自Gate的消息 SceneType:{scene.SceneType} Message:{message.Tag}"); - await FTask.CompletedTask; - } -} \ No newline at end of file diff --git a/Hotfix/OnSceneCreate_Init.cs b/Hotfix/OnSceneCreate_Init.cs index 201c2b3..2315536 100644 --- a/Hotfix/OnSceneCreate_Init.cs +++ b/Hotfix/OnSceneCreate_Init.cs @@ -27,7 +27,7 @@ public class OnSceneCreate_Init : AsyncEventSystem // 用于验证JWT是否合法的组件 scene.AddComponent(); // 用于管理GameAccount的组件 - scene.AddComponent(); + scene.AddComponent(); break; } } diff --git a/Hotfix/Outer/Authentication/Handler/C2A_LoginRequestHandler.cs b/Hotfix/Outer/Authentication/Handler/C2A_LoginRequestHandler.cs index dccccb7..9c8b37d 100644 --- a/Hotfix/Outer/Authentication/Handler/C2A_LoginRequestHandler.cs +++ b/Hotfix/Outer/Authentication/Handler/C2A_LoginRequestHandler.cs @@ -21,6 +21,7 @@ public class C2A_LoginRequestHandler : MessageRPC +{ + protected override void Destroy(Container self) + { + self.CellCount = 0; + self.CellCountMax = 0; + self.CurrentCellCount = 0; + + foreach (var (_, item) in self.Items) + { + item.Dispose(); + } + + self.Items.Clear(); + self.ItemsByCell.Clear(); + self.ItemsByConfigId.Clear(); + self.ItemsByType.Clear(); + } +} + +public static class ContainerSystem +{ + #region Get + + /// + /// 通过唯一id获取 + /// + /// + /// + /// + /// + public static bool GetItemById(this Container self, uint id, out Item item) + { + return self.Items.TryGetValue(id, out item); + } + + /// + /// 通过格子位置获取物品 + /// + /// + /// + /// + /// + public static bool GetItemByCell(this Container self, uint cell, out Item item) + { + return self.ItemsByCell.TryGetValue(cell, out item); + } + + /// + /// 通过配置id获取物品 + /// + /// + /// + /// + public static void GetItemByConfigId(this Container self, uint configId, List items) + { + if (!self.ItemsByConfigId.TryGetValue(configId, out var itemList)) + { + return; + } + + items.AddRange(itemList); + } + + /// + /// 通过类型获取物品 + /// + /// + /// + /// + public static void GetItemByType(this Container self, ItemType type, List items) + { + if (!self.ItemsByType.TryGetValue((uint)type, out var itemList)) + { + return; + } + + items.AddRange(itemList); + } + + #endregion +} \ No newline at end of file diff --git a/Hotfix/Outer/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs b/Hotfix/Outer/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs index 62036d6..e04c32c 100644 --- a/Hotfix/Outer/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs +++ b/Hotfix/Outer/Gate/Handler/Outer/C2G_GetAccountInfoRequestHandler.cs @@ -9,7 +9,7 @@ public sealed class C2G_GetAccountInfoRequestHandler : MessageRPC(); + var gameAccountFlagComponent = session.GetComponent(); if (gameAccountFlagComponent == null) { @@ -19,7 +19,7 @@ public sealed class C2G_GetAccountInfoRequestHandler : MessageRPC @@ -22,7 +20,7 @@ public sealed class C2G_LoginRequestHandler : MessageRPC(); + var gameAccountManageComponent = scene.GetComponent(); Log.Debug("检查账号是否在缓存中"); if (!gameAccountManageComponent.TryGet(accountId, out var account)) { // 首先要先到数据库中查询是否有这个账号 - account = await GameAccountHelper.LoadDataBase(scene, accountId); + account = await PlayerHelper.LoadDataBase(scene, accountId); // 如果有的话,就直接加入在缓存中就可以了 if (account == null) { Log.Debug("检查到账号没有在数据库中,需要创建一个新的账号并且保存到数据库中"); // 如果没有,就要创建一个新的并且保存到数据库。 // 如果不存在,表示这是一个新的账号,需要创建一下这个账号。 - account = await GameAccountFactory.Create(scene, accountId); + account = await PlayerFactory.Create(scene, accountId); } else { @@ -79,7 +77,7 @@ public sealed class C2G_LoginRequestHandler : MessageRPC(); + var gameAccountFlagComponent = oldSession.GetComponent(); gameAccountFlagComponent.AccountID = 0; gameAccountFlagComponent.Account = null; // 给客户端发送一个重复登录的消息,如果当前客户端是自己上次登录的,发送也不会收到。 @@ -90,7 +88,7 @@ public sealed class C2G_LoginRequestHandler : MessageRPC(); + var accountFlagComponent = session.AddComponent(); accountFlagComponent.AccountID = accountId; accountFlagComponent.Account = account; diff --git a/Hotfix/Outer/Gate/System/GameAccountManageComponentSystem.cs b/Hotfix/Outer/Gate/System/GameAccountManageComponentSystem.cs deleted file mode 100644 index 6adcf33..0000000 --- a/Hotfix/Outer/Gate/System/GameAccountManageComponentSystem.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Fantasy.Entitas.Interface; - -namespace NB.Gate.System; - -public sealed class GameAccountManageComponentDestroySystem : DestroySystem -{ - protected override void Destroy(GameAccountManageComponent self) - { - foreach (var (_, gameAccount) in self.Accounts) - { - gameAccount.Dispose(); - } - - self.Accounts.Clear(); - } -} - -public static class GameAccountManageComponentSystem -{ - public static void Add(this GameAccountManageComponent self, GameAccount account) - { - self.Accounts.Add(account.Id, account); - } - - public static GameAccount? Get(this GameAccountManageComponent self, long accountId) - { - return self.Accounts.GetValueOrDefault(accountId); - } - - public static bool TryGet(this GameAccountManageComponent self, long accountId, out GameAccount? account) - { - return self.Accounts.TryGetValue(accountId, out account); - } - - public static void Remove(this GameAccountManageComponent self, long accountId, bool isDispose = true) - { - if (!self.Accounts.Remove(accountId, out var account)) - { - return; - } - - if (!isDispose) - { - return; - } - - account.Dispose(); - } -} \ No newline at end of file diff --git a/Hotfix/Outer/Gate/System/GameAccount/GameAccountSystem.cs b/Hotfix/Outer/Gate/System/Player/PlayerDestroySystem.cs similarity index 55% rename from Hotfix/Outer/Gate/System/GameAccount/GameAccountSystem.cs rename to Hotfix/Outer/Gate/System/Player/PlayerDestroySystem.cs index 66135c0..32d32d7 100644 --- a/Hotfix/Outer/Gate/System/GameAccount/GameAccountSystem.cs +++ b/Hotfix/Outer/Gate/System/Player/PlayerDestroySystem.cs @@ -2,9 +2,9 @@ using Fantasy.Entitas.Interface; namespace NB.Gate; -public sealed class GameAccountDestroySystem : DestroySystem +public sealed class PlayerDestroySystem : DestroySystem { - protected override void Destroy(GameAccount self) + protected override void Destroy(Player self) { self.CreateTime = 0; self.LoginTime = 0; diff --git a/Hotfix/Outer/Gate/System/GameAccount/GameAccountFactory.cs b/Hotfix/Outer/Gate/System/Player/PlayerFactory.cs similarity index 68% rename from Hotfix/Outer/Gate/System/GameAccount/GameAccountFactory.cs rename to Hotfix/Outer/Gate/System/Player/PlayerFactory.cs index 03a6b3b..f7d9626 100644 --- a/Hotfix/Outer/Gate/System/GameAccount/GameAccountFactory.cs +++ b/Hotfix/Outer/Gate/System/Player/PlayerFactory.cs @@ -5,20 +5,20 @@ using Fantasy.Helper; namespace NB.Gate; -public static class GameAccountFactory +public static class PlayerFactory { /// - /// 创建一个新的GameAccount + /// 创建一个新的Player /// /// /// ToKen令牌传递过来的aId /// 是否在创建的过程中保存到数据库 /// - public static async FTask Create(Scene scene, long aId, bool isSaveDataBase = true) + public static async FTask Create(Scene scene, long aId, bool isSaveDataBase = true) { - var gameAccount = Entity.Create(scene, aId, false, false); + var gameAccount = Entity.Create(scene, aId, false, false); gameAccount.LoginTime = gameAccount.CreateTime = TimeHelper.Now; - + if (isSaveDataBase) { await gameAccount.SaveDataBase(); diff --git a/Hotfix/Outer/Gate/System/GameAccount/GameAccountFlagComponentSystem.cs b/Hotfix/Outer/Gate/System/Player/PlayerFlagComponentSystem.cs similarity index 63% rename from Hotfix/Outer/Gate/System/GameAccount/GameAccountFlagComponentSystem.cs rename to Hotfix/Outer/Gate/System/Player/PlayerFlagComponentSystem.cs index 1ce520c..e6ada07 100644 --- a/Hotfix/Outer/Gate/System/GameAccount/GameAccountFlagComponentSystem.cs +++ b/Hotfix/Outer/Gate/System/Player/PlayerFlagComponentSystem.cs @@ -2,15 +2,15 @@ using Fantasy.Entitas.Interface; namespace NB.Gate; -public sealed class GameAccountFlagComponentDestroySystem : DestroySystem +public sealed class PlayerFlagComponentDestroySystem : DestroySystem { - protected override void Destroy(GameAccountFlagComponent self) + protected override void Destroy(PlayerFlagComponent self) { if (self.AccountID != 0) { // 执行下线过程、并且要求在5分钟后完成缓存清理。也就是5分钟后会保存数据到数据库。 // 由于5分钟太长了、咱们测试的时候,不方便测试,也可以把这个时间改短一些,比如10秒。 - GameAccountHelper.Disconnect(self.Scene, self.AccountID, 1000 * 60 * 5).Coroutine(); + PlayerHelper.Disconnect(self.Scene, self.AccountID, 1000 * 60 * 5).Coroutine(); self.AccountID = 0; } diff --git a/Hotfix/Outer/Gate/System/GameAccount/GameAccountHelper.cs b/Hotfix/Outer/Gate/System/Player/PlayerHelper.cs similarity index 87% rename from Hotfix/Outer/Gate/System/GameAccount/GameAccountHelper.cs rename to Hotfix/Outer/Gate/System/Player/PlayerHelper.cs index d3d542c..f49f19a 100644 --- a/Hotfix/Outer/Gate/System/GameAccount/GameAccountHelper.cs +++ b/Hotfix/Outer/Gate/System/Player/PlayerHelper.cs @@ -5,7 +5,7 @@ using Fantasy.Network; namespace NB.Gate; -public static class GameAccountHelper +public static class PlayerHelper { /// /// 从数据库中读取GameAccount @@ -13,9 +13,9 @@ public static class GameAccountHelper /// /// 账号Id /// - public static async FTask LoadDataBase(Scene scene, long accountId) + public static async FTask LoadDataBase(Scene scene, long accountId) { - var account = await scene.World.DataBase.First(d => d.Id == accountId); + var account = await scene.World.DataBase.First(d => d.Id == accountId); if (account == null) { return null; @@ -29,7 +29,7 @@ public static class GameAccountHelper /// 保存账号到数据库中 /// /// - public static async FTask SaveDataBase(this GameAccount self) + public static async FTask SaveDataBase(this Player self) { await self.Scene.World.DataBase.Save(self); } @@ -38,12 +38,12 @@ public static class GameAccountHelper /// 执行该账号的断开逻辑,不要非必要不要使用这个接口,这个接口是内部使用。 /// /// - public static async FTask Disconnect(this GameAccount self) + public static async FTask Disconnect(this Player self) { // 保存该账号信息到数据库中。 await SaveDataBase(self); // 在缓存中移除自己,并且执行自己的Dispose方法。 - self.Scene.GetComponent().Remove(self.Id); + self.Scene.GetComponent().Remove(self.Id); } /// @@ -62,7 +62,7 @@ public static class GameAccountHelper // 这样的话,是不是可以在登录的时候,给这个组件把AccountId存到这个组件呢? // 要检查当前缓存中是否存在该账号的数据 - var gameAccountManageComponent = scene.GetComponent(); + var gameAccountManageComponent = scene.GetComponent(); if (!gameAccountManageComponent.TryGet(accountId, out var account)) { // 如果缓存中没有、那表示已经下线或者根本不存在该账号,应该在打印一个警告,因为正常的情况下是不会出现的。 @@ -98,7 +98,7 @@ public static class GameAccountHelper /// /// /// - public static GameAccountInfo GetGameAccountInfo(this GameAccount self) + public static GameAccountInfo GetGameAccountInfo(this Player self) { // 其实可以不用每次都NEW一个新的GameAccountInfo // 可以在当前账号下创建一个GameAccountInfo,每次变动会提前通知这个GameAccountInfo diff --git a/Hotfix/Outer/Gate/System/PlayerManageComponentSystem.cs b/Hotfix/Outer/Gate/System/PlayerManageComponentSystem.cs new file mode 100644 index 0000000..313bed3 --- /dev/null +++ b/Hotfix/Outer/Gate/System/PlayerManageComponentSystem.cs @@ -0,0 +1,49 @@ +using Fantasy.Entitas.Interface; + +namespace NB.Gate.System; + +public sealed class PlayerManageComponentDestroySystem : DestroySystem +{ + protected override void Destroy(PlayerManageComponent self) + { + foreach (var (_, gameAccount) in self.Players) + { + gameAccount.Dispose(); + } + + self.Players.Clear(); + } +} + +public static class PlayerManageComponentSystem +{ + public static void Add(this PlayerManageComponent self, Player account) + { + self.Players.Add(account.Id, account); + } + + public static Player Get(this PlayerManageComponent self, long accountId) + { + return self.Players.GetValueOrDefault(accountId); + } + + public static bool TryGet(this PlayerManageComponent self, long accountId, out Player? account) + { + return self.Players.TryGetValue(accountId, out account); + } + + public static void Remove(this PlayerManageComponent self, long accountId, bool isDispose = true) + { + if (!self.Players.Remove(accountId, out var account)) + { + return; + } + + if (!isDispose) + { + return; + } + + account.Dispose(); + } +} \ No newline at end of file diff --git a/Server.sln b/Server.sln index b0554bd..29972cd 100644 --- a/Server.sln +++ b/Server.sln @@ -12,6 +12,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fantasy.ConfigTable", "Fant EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Fantasy", "Fantasy", "{B1F4CF72-A767-4509-B050-8DB30D0DC40A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThirdParty", "ThirdParty\ThirdParty.csproj", "{9C25A89F-0C87-4F91-AEEA-2ECCD2763DC3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -38,6 +40,10 @@ Global {0A539FA2-C595-4AA3-A2C3-86BF86EA7FFB}.Debug|Any CPU.Build.0 = Debug|Any CPU {0A539FA2-C595-4AA3-A2C3-86BF86EA7FFB}.Release|Any CPU.ActiveCfg = Release|Any CPU {0A539FA2-C595-4AA3-A2C3-86BF86EA7FFB}.Release|Any CPU.Build.0 = Release|Any CPU + {9C25A89F-0C87-4F91-AEEA-2ECCD2763DC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C25A89F-0C87-4F91-AEEA-2ECCD2763DC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C25A89F-0C87-4F91-AEEA-2ECCD2763DC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C25A89F-0C87-4F91-AEEA-2ECCD2763DC3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {0A539FA2-C595-4AA3-A2C3-86BF86EA7FFB} = {B1F4CF72-A767-4509-B050-8DB30D0DC40A} diff --git a/Server.sln.DotSettings b/Server.sln.DotSettings new file mode 100644 index 0000000..3d8771c --- /dev/null +++ b/Server.sln.DotSettings @@ -0,0 +1,2 @@ + + False \ No newline at end of file diff --git a/ThirdParty/ThirdParty.csproj b/ThirdParty/ThirdParty.csproj new file mode 100644 index 0000000..cd9a6d3 --- /dev/null +++ b/ThirdParty/ThirdParty.csproj @@ -0,0 +1,14 @@ + + + + net8.0 + enable + disable + true + + + + + + + diff --git a/ThirdParty/Unity.Mathematics/Il2CppEagerStaticClassConstructionAttribute.cs b/ThirdParty/Unity.Mathematics/Il2CppEagerStaticClassConstructionAttribute.cs new file mode 100644 index 0000000..6f64b47 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/Il2CppEagerStaticClassConstructionAttribute.cs @@ -0,0 +1,13 @@ +using System; + +namespace Unity.IL2CPP.CompilerServices +{ + /// + /// This is used to indicate to IL2CPP that the static constructors should be executed eagerly at startup + /// rather than lazily at runtime. + /// + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)] + internal class Il2CppEagerStaticClassConstructionAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/ThirdParty/Unity.Mathematics/affine_transform.cs b/ThirdParty/Unity.Mathematics/affine_transform.cs new file mode 100644 index 0000000..6ba3088 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/affine_transform.cs @@ -0,0 +1,322 @@ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; +using static Unity.Mathematics.math; + +namespace Unity.Mathematics +{ + /// + /// An affine transformation type. + /// + [Il2CppEagerStaticClassConstruction] + [Serializable] + public struct AffineTransform : IEquatable, IFormattable + { + /// + /// The rotation and scale part of the affine transformation. + /// + public float3x3 rs; + + /// + /// The translation part of the affine transformation. + /// + public float3 t; + + /// An AffineTransform representing the identity transform. + public static readonly AffineTransform identity = new AffineTransform(float3.zero, float3x3.identity); + + /// + /// An AffineTransform zero value. + /// + public static readonly AffineTransform zero; + + /// Constructs an AffineTransform from a translation represented by a float3 vector and rotation represented by a unit quaternion. + /// The translation vector. + /// The rotation quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public AffineTransform(float3 translation, quaternion rotation) + { + rs = float3x3(rotation); + t = translation; + } + + /// Constructs an AffineTransform from a translation represented by a float3 vector, rotation represented by a unit quaternion and scale represented by a float3 vector. + /// The translation vector. + /// The rotation quaternion. + /// The scale vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public AffineTransform(float3 translation, quaternion rotation, float3 scale) + { + rs = mulScale(math.float3x3(rotation), scale); + t = translation; + } + + /// Constructs an AffineTransform from a translation represented by float3 vector and a float3x3 matrix representing both rotation and scale. + /// The translation vector. + /// The rotation and scale matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public AffineTransform(float3 translation, float3x3 rotationScale) + { + rs = rotationScale; + t = translation; + } + + /// Constructs an AffineTransform from float3x3 matrix representating both rotation and scale. + /// The rotation and scale matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public AffineTransform(float3x3 rotationScale) + { + rs = rotationScale; + t = float3.zero; + } + + /// Constructs an AffineTransform from a RigidTransform. + /// The RigidTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public AffineTransform(RigidTransform rigid) + { + rs = math.float3x3(rigid.rot); + t = rigid.pos; + } + + /// Constructs an AffineTransform from a float3x4 matrix. + /// The float3x4 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public AffineTransform(float3x4 m) + { + rs = math.float3x3(m.c0, m.c1, m.c2); + t = m.c3; + } + + /// Constructs an AffineTransform from a float4x4 matrix. + /// The float4x4 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public AffineTransform(float4x4 m) + { + rs = math.float3x3(m.c0.xyz, m.c1.xyz, m.c2.xyz); + t = m.c3.xyz; + } + + /// Implicit float3x4 cast operator. + /// The AffineTransform. + /// The converted AffineTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x4(AffineTransform m) { return float3x4(m.rs.c0, m.rs.c1, m.rs.c2, m.t); } + + /// Implicit float4x4 cast operator. + /// The AffineTransform. + /// The converted AffineTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x4(AffineTransform m) { return float4x4(float4(m.rs.c0, 0f), float4(m.rs.c1, 0f), float4(m.rs.c2, 0f), float4(m.t, 1f)); } + + /// Returns true if the AffineTransform is equal to a given AffineTransform, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(AffineTransform rhs) { return rs.Equals(rhs.rs) && t.Equals(rhs.t); } + + /// Returns true if the AffineTransform is equal to a given AffineTransform, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is AffineTransform converted && Equals(converted); } + + /// Returns a hash code for the AffineTransform. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)hash(this); } + + /// Returns a string representation of the AffineTransform. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("AffineTransform(({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f), ({9}f, {10}f, {11}f))", + rs.c0.x, rs.c1.x, rs.c2.x, rs.c0.y, rs.c1.y, rs.c2.y, rs.c0.z, rs.c1.z, rs.c2.z, t.x, t.y, t.z + ); + } + + /// Returns a string representation of the AffineTransform using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("AffineTransform(({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f), ({9}f, {10}f, {11}f))", + rs.c0.x.ToString(format, formatProvider), rs.c1.x.ToString(format, formatProvider), rs.c2.x.ToString(format, formatProvider), + rs.c0.y.ToString(format, formatProvider), rs.c1.y.ToString(format, formatProvider), rs.c2.y.ToString(format, formatProvider), + rs.c0.z.ToString(format, formatProvider), rs.c1.z.ToString(format, formatProvider), rs.c2.z.ToString(format, formatProvider), + t.x.ToString(format, formatProvider), t.y.ToString(format, formatProvider), t.z.ToString(format, formatProvider) + ); + } + } + + public static partial class math + { + /// Returns an AffineTransform constructed from a translation represented by a float3 vector and rotation represented by a unit quaternion. + /// The AffineTransform translation. + /// The AffineTransform rotation. + /// The AffineTransform given the translation vector and rotation quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform AffineTransform(float3 translation, quaternion rotation) { return new AffineTransform(translation, rotation); } + + /// Returns an AffineTransform constructed from a translation represented by a float3 vector, rotation represented by a unit quaternion and scale represented by a float3 vector. + /// The translation vector. + /// The rotation quaternion. + /// The scale vector. + /// The AffineTransform given the translation vector, rotation quaternion and scale vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform AffineTransform(float3 translation, quaternion rotation, float3 scale) { return new AffineTransform(translation, rotation, scale); } + + /// Returns an AffineTransform constructed from a translation represented by float3 vector and a float3x3 matrix representing both rotation and scale. + /// The translation vector. + /// The rotation and scale matrix. + /// The AffineTransform given the translation vector and float3x3 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform AffineTransform(float3 translation, float3x3 rotationScale) { return new AffineTransform(translation, rotationScale); } + + /// Returns an AffineTransform constructed from a float3x3 matrix representing both rotation and scale. + /// The rotation and scale matrix. + /// The AffineTransform given a float3x3 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform AffineTransform(float3x3 rotationScale) { return new AffineTransform(rotationScale); } + + /// Returns an AffineTransform constructed from a float4x4 matrix. + /// The float4x4 matrix. + /// The AffineTransform given a float4x4 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform AffineTransform(float4x4 m) { return new AffineTransform(m); } + + /// Returns an AffineTransform constructed from a float3x4 matrix. + /// The float3x4 matrix. + /// The AffineTransform given a float3x4 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform AffineTransform(float3x4 m) { return new AffineTransform(m); } + + /// Returns an AffineTransform constructed from a RigidTransform. + /// The RigidTransform. + /// The AffineTransform given a RigidTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform AffineTransform(RigidTransform rigid) { return new AffineTransform (rigid); } + + /// Returns a float4x4 matrix constructed from an AffineTransform. + /// The AffineTransform. + /// The float4x4 matrix given an AffineTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(AffineTransform transform) { return float4x4(float4(transform.rs.c0, 0f), float4(transform.rs.c1, 0f), float4(transform.rs.c2, 0f), float4(transform.t, 1f)); } + + /// Returns a float3x4 matrix constructed from an AffineTransform. + /// The AffineTransform. + /// The float3x4 matrix given an AffineTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(AffineTransform transform) { return float3x4(transform.rs.c0, transform.rs.c1, transform.rs.c2, transform.t); } + + /// Returns the result of transforming the AffineTransform b by the AffineTransform a. + /// The AffineTransform on the left. + /// The AffineTransform on the right. + /// The AffineTransform of a transforming b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform mul(AffineTransform a, AffineTransform b) + { + return new AffineTransform(transform(a, b.t), mul(a.rs, b.rs)); + } + + /// Returns the result of transforming the AffineTransform b by a float3x3 matrix a. + /// The float3x3 matrix on the left. + /// The AffineTransform on the right. + /// The AffineTransform of a transforming b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform mul(float3x3 a, AffineTransform b) + { + return new AffineTransform(mul(a, b.t), mul(a, b.rs)); + } + + /// Returns the result of transforming the float3x3 b by an AffineTransform a. + /// The AffineTransform on the left. + /// The float3x3 matrix on the right. + /// The AffineTransform of a transforming b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform mul(AffineTransform a, float3x3 b) + { + return new AffineTransform(a.t, mul(b, a.rs)); + } + + /// Returns the result of transforming a float4 homogeneous coordinate by an AffineTransform. + /// The AffineTransform. + /// The position to be transformed. + /// The transformed position. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mul(AffineTransform a, float4 pos) + { + return float4(mul(a.rs, pos.xyz) + a.t * pos.w, pos.w); + } + + /// Returns the result of rotating a float3 vector by an AffineTransform. + /// The AffineTransform. + /// The direction vector to rotate. + /// The rotated direction vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 rotate(AffineTransform a, float3 dir) + { + return mul(a.rs, dir); + } + + /// Returns the result of transforming a float3 point by an AffineTransform. + /// The AffineTransform. + /// The position to transform. + /// The transformed position. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 transform(AffineTransform a, float3 pos) + { + return a.t + mul(a.rs, pos); + } + + /// Returns the inverse of an AffineTransform. + /// The AffineTransform to invert. + /// The inverse AffineTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static AffineTransform inverse(AffineTransform a) + { + AffineTransform inv; + inv.rs = pseudoinverse(a.rs); + inv.t = mul(inv.rs, -a.t); + return inv; + } + + /// Decomposes the AffineTransform in translation, rotation and scale. + /// The AffineTransform + /// The decomposed translation vector of the AffineTransform. + /// The decomposed rotation quaternion of the AffineTransform. + /// The decomposed scale of the AffineTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void decompose(AffineTransform a, out float3 translation, out quaternion rotation, out float3 scale) + { + translation = a.t; + rotation = math.rotation(a.rs); + var sm = mul(float3x3(conjugate(rotation)), a.rs); + scale = float3(sm.c0.x, sm.c1.y, sm.c2.z); + } + + /// Returns a uint hash code of an AffineTransform. + /// The AffineTransform to hash. + /// The hash code of the input AffineTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(AffineTransform a) + { + return hash(a.rs) + 0xC5C5394Bu * hash(a.t); + } + + /// + /// Returns a uint4 vector hash code of an AffineTransform. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// The AffineTransform to hash. + /// The uint4 wide hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(AffineTransform a) + { + return hashwide(a.rs).xyzz + 0xC5C5394Bu * hashwide(a.t).xyzz; + } + } +} diff --git a/ThirdParty/Unity.Mathematics/bool2.gen.cs b/ThirdParty/Unity.Mathematics/bool2.gen.cs new file mode 100644 index 0000000..1595180 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool2.gen.cs @@ -0,0 +1,626 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2 component vector of bools. + [DebuggerTypeProxy(typeof(bool2.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool2 : System.IEquatable + { + /// x component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool x; + /// y component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool y; + + + /// Constructs a bool2 vector from two bool values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2(bool x, bool y) + { + this.x = x; + this.y = y; + } + + /// Constructs a bool2 vector from a bool2 vector. + /// The constructed vector's xy components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2(bool2 xy) + { + this.x = xy.x; + this.y = xy.y; + } + + /// Constructs a bool2 vector from a single bool value by assigning it to every component. + /// bool to convert to bool2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2(bool v) + { + this.x = v; + this.y = v; + } + + + /// Implicitly converts a single bool value to a bool2 vector by assigning it to every component. + /// bool to convert to bool2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool2(bool v) { return new bool2(v); } + + + /// Returns the result of a componentwise equality operation on two bool2 vectors. + /// Left hand side bool2 to use to compute componentwise equality. + /// Right hand side bool2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (bool2 lhs, bool2 rhs) { return new bool2 (lhs.x == rhs.x, lhs.y == rhs.y); } + + /// Returns the result of a componentwise equality operation on a bool2 vector and a bool value. + /// Left hand side bool2 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (bool2 lhs, bool rhs) { return new bool2 (lhs.x == rhs, lhs.y == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool2 vector. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (bool lhs, bool2 rhs) { return new bool2 (lhs == rhs.x, lhs == rhs.y); } + + + /// Returns the result of a componentwise not equal operation on two bool2 vectors. + /// Left hand side bool2 to use to compute componentwise not equal. + /// Right hand side bool2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (bool2 lhs, bool2 rhs) { return new bool2 (lhs.x != rhs.x, lhs.y != rhs.y); } + + /// Returns the result of a componentwise not equal operation on a bool2 vector and a bool value. + /// Left hand side bool2 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (bool2 lhs, bool rhs) { return new bool2 (lhs.x != rhs, lhs.y != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool2 vector. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (bool lhs, bool2 rhs) { return new bool2 (lhs != rhs.x, lhs != rhs.y); } + + + /// Returns the result of a componentwise not operation on a bool2 vector. + /// Value to use when computing the componentwise not. + /// bool2 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator ! (bool2 val) { return new bool2 (!val.x, !val.y); } + + + /// Returns the result of a componentwise bitwise and operation on two bool2 vectors. + /// Left hand side bool2 to use to compute componentwise bitwise and. + /// Right hand side bool2 to use to compute componentwise bitwise and. + /// bool2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator & (bool2 lhs, bool2 rhs) { return new bool2 (lhs.x & rhs.x, lhs.y & rhs.y); } + + /// Returns the result of a componentwise bitwise and operation on a bool2 vector and a bool value. + /// Left hand side bool2 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator & (bool2 lhs, bool rhs) { return new bool2 (lhs.x & rhs, lhs.y & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool2 vector. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool2 to use to compute componentwise bitwise and. + /// bool2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator & (bool lhs, bool2 rhs) { return new bool2 (lhs & rhs.x, lhs & rhs.y); } + + + /// Returns the result of a componentwise bitwise or operation on two bool2 vectors. + /// Left hand side bool2 to use to compute componentwise bitwise or. + /// Right hand side bool2 to use to compute componentwise bitwise or. + /// bool2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator | (bool2 lhs, bool2 rhs) { return new bool2 (lhs.x | rhs.x, lhs.y | rhs.y); } + + /// Returns the result of a componentwise bitwise or operation on a bool2 vector and a bool value. + /// Left hand side bool2 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator | (bool2 lhs, bool rhs) { return new bool2 (lhs.x | rhs, lhs.y | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool2 vector. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool2 to use to compute componentwise bitwise or. + /// bool2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator | (bool lhs, bool2 rhs) { return new bool2 (lhs | rhs.x, lhs | rhs.y); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool2 vectors. + /// Left hand side bool2 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool2 to use to compute componentwise bitwise exclusive or. + /// bool2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator ^ (bool2 lhs, bool2 rhs) { return new bool2 (lhs.x ^ rhs.x, lhs.y ^ rhs.y); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool2 vector and a bool value. + /// Left hand side bool2 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator ^ (bool2 lhs, bool rhs) { return new bool2 (lhs.x ^ rhs, lhs.y ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool2 vector. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool2 to use to compute componentwise bitwise exclusive or. + /// bool2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator ^ (bool lhs, bool2 rhs) { return new bool2 (lhs ^ rhs.x, lhs ^ rhs.y); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, y); } + } + + + + /// Returns the bool element at a specified index. + unsafe public bool this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (bool2* array = &this) { return ((bool*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (bool* array = &x) { array[index] = value; } + } + } + + /// Returns true if the bool2 is equal to a given bool2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool2 rhs) { return x == rhs.x && y == rhs.y; } + + /// Returns true if the bool2 is equal to a given bool2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool2 converted && Equals(converted); } + + + /// Returns a hash code for the bool2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool2({0}, {1})", x, y); + } + + internal sealed class DebuggerProxy + { + public bool x; + public bool y; + public DebuggerProxy(bool2 v) + { + x = v.x; + y = v.y; + } + } + + } + + public static partial class math + { + /// Returns a bool2 vector constructed from two bool values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// bool2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 bool2(bool x, bool y) { return new bool2(x, y); } + + /// Returns a bool2 vector constructed from a bool2 vector. + /// The constructed vector's xy components will be set to this value. + /// bool2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 bool2(bool2 xy) { return new bool2(xy); } + + /// Returns a bool2 vector constructed from a single bool value by assigning it to every component. + /// bool to convert to bool2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 bool2(bool v) { return new bool2(v); } + + /// Returns a uint hash code of a bool2 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool2 v) + { + return csum(select(uint2(0x90A285BBu, 0x5D19E1D5u), uint2(0xFAAF07DDu, 0x625C45BDu), v)); + } + + /// + /// Returns a uint2 vector hash code of a bool2 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(bool2 v) + { + return (select(uint2(0xC9F27FCBu, 0x6D2523B1u), uint2(0x6E2BF6A9u, 0xCC74B3B7u), v)); + } + + /// Returns the result of specified shuffling of the components from two bool2 vectors into a bool value. + /// bool2 to use as the left argument of the shuffle operation. + /// bool2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool. + /// bool result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool shuffle(bool2 left, bool2 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two bool2 vectors into a bool2 vector. + /// bool2 to use as the left argument of the shuffle operation. + /// bool2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool2 x component. + /// The ShuffleComponent to use when setting the resulting bool2 y component. + /// bool2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 shuffle(bool2 left, bool2 right, ShuffleComponent x, ShuffleComponent y) + { + return bool2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two bool2 vectors into a bool3 vector. + /// bool2 to use as the left argument of the shuffle operation. + /// bool2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool3 x component. + /// The ShuffleComponent to use when setting the resulting bool3 y component. + /// The ShuffleComponent to use when setting the resulting bool3 z component. + /// bool3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 shuffle(bool2 left, bool2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return bool3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two bool2 vectors into a bool4 vector. + /// bool2 to use as the left argument of the shuffle operation. + /// bool2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool4 x component. + /// The ShuffleComponent to use when setting the resulting bool4 y component. + /// The ShuffleComponent to use when setting the resulting bool4 z component. + /// The ShuffleComponent to use when setting the resulting bool4 w component. + /// bool4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 shuffle(bool2 left, bool2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return bool4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static bool select_shuffle_component(bool2 a, bool2 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool2x2.gen.cs b/ThirdParty/Unity.Mathematics/bool2x2.gen.cs new file mode 100644 index 0000000..02460be --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool2x2.gen.cs @@ -0,0 +1,292 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x2 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool2x2 : System.IEquatable + { + /// Column 0 of the matrix. + public bool2 c0; + /// Column 1 of the matrix. + public bool2 c1; + + + /// Constructs a bool2x2 matrix from two bool2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x2(bool2 c0, bool2 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a bool2x2 matrix from 4 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x2(bool m00, bool m01, + bool m10, bool m11) + { + this.c0 = new bool2(m00, m10); + this.c1 = new bool2(m01, m11); + } + + /// Constructs a bool2x2 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x2(bool v) + { + this.c0 = v; + this.c1 = v; + } + + + /// Implicitly converts a single bool value to a bool2x2 matrix by assigning it to every component. + /// bool to convert to bool2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool2x2(bool v) { return new bool2x2(v); } + + + /// Returns the result of a componentwise equality operation on two bool2x2 matrices. + /// Left hand side bool2x2 to use to compute componentwise equality. + /// Right hand side bool2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (bool2x2 lhs, bool2x2 rhs) { return new bool2x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a bool2x2 matrix and a bool value. + /// Left hand side bool2x2 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (bool2x2 lhs, bool rhs) { return new bool2x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool2x2 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (bool lhs, bool2x2 rhs) { return new bool2x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two bool2x2 matrices. + /// Left hand side bool2x2 to use to compute componentwise not equal. + /// Right hand side bool2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (bool2x2 lhs, bool2x2 rhs) { return new bool2x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a bool2x2 matrix and a bool value. + /// Left hand side bool2x2 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (bool2x2 lhs, bool rhs) { return new bool2x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool2x2 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (bool lhs, bool2x2 rhs) { return new bool2x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise not operation on a bool2x2 matrix. + /// Value to use when computing the componentwise not. + /// bool2x2 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator ! (bool2x2 val) { return new bool2x2 (!val.c0, !val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two bool2x2 matrices. + /// Left hand side bool2x2 to use to compute componentwise bitwise and. + /// Right hand side bool2x2 to use to compute componentwise bitwise and. + /// bool2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator & (bool2x2 lhs, bool2x2 rhs) { return new bool2x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on a bool2x2 matrix and a bool value. + /// Left hand side bool2x2 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator & (bool2x2 lhs, bool rhs) { return new bool2x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool2x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool2x2 to use to compute componentwise bitwise and. + /// bool2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator & (bool lhs, bool2x2 rhs) { return new bool2x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two bool2x2 matrices. + /// Left hand side bool2x2 to use to compute componentwise bitwise or. + /// Right hand side bool2x2 to use to compute componentwise bitwise or. + /// bool2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator | (bool2x2 lhs, bool2x2 rhs) { return new bool2x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on a bool2x2 matrix and a bool value. + /// Left hand side bool2x2 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator | (bool2x2 lhs, bool rhs) { return new bool2x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool2x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool2x2 to use to compute componentwise bitwise or. + /// bool2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator | (bool lhs, bool2x2 rhs) { return new bool2x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool2x2 matrices. + /// Left hand side bool2x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool2x2 to use to compute componentwise bitwise exclusive or. + /// bool2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator ^ (bool2x2 lhs, bool2x2 rhs) { return new bool2x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool2x2 matrix and a bool value. + /// Left hand side bool2x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator ^ (bool2x2 lhs, bool rhs) { return new bool2x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool2x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool2x2 to use to compute componentwise bitwise exclusive or. + /// bool2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator ^ (bool lhs, bool2x2 rhs) { return new bool2x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the bool2 element at a specified index. + unsafe public ref bool2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (bool2x2* array = &this) { return ref ((bool2*)array)[index]; } + } + } + + /// Returns true if the bool2x2 is equal to a given bool2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool2x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the bool2x2 is equal to a given bool2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool2x2 converted && Equals(converted); } + + + /// Returns a hash code for the bool2x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool2x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool2x2({0}, {1}, {2}, {3})", c0.x, c1.x, c0.y, c1.y); + } + + } + + public static partial class math + { + /// Returns a bool2x2 matrix constructed from two bool2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// bool2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 bool2x2(bool2 c0, bool2 c1) { return new bool2x2(c0, c1); } + + /// Returns a bool2x2 matrix constructed from from 4 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// bool2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 bool2x2(bool m00, bool m01, + bool m10, bool m11) + { + return new bool2x2(m00, m01, + m10, m11); + } + + /// Returns a bool2x2 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 bool2x2(bool v) { return new bool2x2(v); } + + /// Return the bool2x2 transpose of a bool2x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 transpose(bool2x2 v) + { + return bool2x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y); + } + + /// Returns a uint hash code of a bool2x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool2x2 v) + { + return csum(select(uint2(0x7AF32C49u, 0xAE131389u), uint2(0x5D1B165Bu, 0x87096CD7u), v.c0) + + select(uint2(0x4C7F6DD1u, 0x4822A3E9u), uint2(0xAAC3C25Du, 0xD21D0945u), v.c1)); + } + + /// + /// Returns a uint2 vector hash code of a bool2x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(bool2x2 v) + { + return (select(uint2(0x88FCAB2Du, 0x614DA60Du), uint2(0x5BA2C50Bu, 0x8C455ACBu), v.c0) + + select(uint2(0xCD266C89u, 0xF1852A33u), uint2(0x77E35E77u, 0x863E3729u), v.c1)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool2x3.gen.cs b/ThirdParty/Unity.Mathematics/bool2x3.gen.cs new file mode 100644 index 0000000..4e497b6 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool2x3.gen.cs @@ -0,0 +1,306 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x3 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool2x3 : System.IEquatable + { + /// Column 0 of the matrix. + public bool2 c0; + /// Column 1 of the matrix. + public bool2 c1; + /// Column 2 of the matrix. + public bool2 c2; + + + /// Constructs a bool2x3 matrix from three bool2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x3(bool2 c0, bool2 c1, bool2 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a bool2x3 matrix from 6 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x3(bool m00, bool m01, bool m02, + bool m10, bool m11, bool m12) + { + this.c0 = new bool2(m00, m10); + this.c1 = new bool2(m01, m11); + this.c2 = new bool2(m02, m12); + } + + /// Constructs a bool2x3 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x3(bool v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + + /// Implicitly converts a single bool value to a bool2x3 matrix by assigning it to every component. + /// bool to convert to bool2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool2x3(bool v) { return new bool2x3(v); } + + + /// Returns the result of a componentwise equality operation on two bool2x3 matrices. + /// Left hand side bool2x3 to use to compute componentwise equality. + /// Right hand side bool2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (bool2x3 lhs, bool2x3 rhs) { return new bool2x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a bool2x3 matrix and a bool value. + /// Left hand side bool2x3 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (bool2x3 lhs, bool rhs) { return new bool2x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool2x3 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (bool lhs, bool2x3 rhs) { return new bool2x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two bool2x3 matrices. + /// Left hand side bool2x3 to use to compute componentwise not equal. + /// Right hand side bool2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (bool2x3 lhs, bool2x3 rhs) { return new bool2x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a bool2x3 matrix and a bool value. + /// Left hand side bool2x3 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (bool2x3 lhs, bool rhs) { return new bool2x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool2x3 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (bool lhs, bool2x3 rhs) { return new bool2x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise not operation on a bool2x3 matrix. + /// Value to use when computing the componentwise not. + /// bool2x3 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator ! (bool2x3 val) { return new bool2x3 (!val.c0, !val.c1, !val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two bool2x3 matrices. + /// Left hand side bool2x3 to use to compute componentwise bitwise and. + /// Right hand side bool2x3 to use to compute componentwise bitwise and. + /// bool2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator & (bool2x3 lhs, bool2x3 rhs) { return new bool2x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on a bool2x3 matrix and a bool value. + /// Left hand side bool2x3 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator & (bool2x3 lhs, bool rhs) { return new bool2x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool2x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool2x3 to use to compute componentwise bitwise and. + /// bool2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator & (bool lhs, bool2x3 rhs) { return new bool2x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two bool2x3 matrices. + /// Left hand side bool2x3 to use to compute componentwise bitwise or. + /// Right hand side bool2x3 to use to compute componentwise bitwise or. + /// bool2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator | (bool2x3 lhs, bool2x3 rhs) { return new bool2x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on a bool2x3 matrix and a bool value. + /// Left hand side bool2x3 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator | (bool2x3 lhs, bool rhs) { return new bool2x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool2x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool2x3 to use to compute componentwise bitwise or. + /// bool2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator | (bool lhs, bool2x3 rhs) { return new bool2x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool2x3 matrices. + /// Left hand side bool2x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool2x3 to use to compute componentwise bitwise exclusive or. + /// bool2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator ^ (bool2x3 lhs, bool2x3 rhs) { return new bool2x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool2x3 matrix and a bool value. + /// Left hand side bool2x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator ^ (bool2x3 lhs, bool rhs) { return new bool2x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool2x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool2x3 to use to compute componentwise bitwise exclusive or. + /// bool2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator ^ (bool lhs, bool2x3 rhs) { return new bool2x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the bool2 element at a specified index. + unsafe public ref bool2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (bool2x3* array = &this) { return ref ((bool2*)array)[index]; } + } + } + + /// Returns true if the bool2x3 is equal to a given bool2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool2x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the bool2x3 is equal to a given bool2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool2x3 converted && Equals(converted); } + + + /// Returns a hash code for the bool2x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool2x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y); + } + + } + + public static partial class math + { + /// Returns a bool2x3 matrix constructed from three bool2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// bool2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 bool2x3(bool2 c0, bool2 c1, bool2 c2) { return new bool2x3(c0, c1, c2); } + + /// Returns a bool2x3 matrix constructed from from 6 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// bool2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 bool2x3(bool m00, bool m01, bool m02, + bool m10, bool m11, bool m12) + { + return new bool2x3(m00, m01, m02, + m10, m11, m12); + } + + /// Returns a bool2x3 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 bool2x3(bool v) { return new bool2x3(v); } + + /// Return the bool3x2 transpose of a bool2x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 transpose(bool2x3 v) + { + return bool3x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y); + } + + /// Returns a uint hash code of a bool2x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool2x3 v) + { + return csum(select(uint2(0x7BE39F3Bu, 0xFAB9913Fu), uint2(0xB4501269u, 0xE04B89FDu), v.c0) + + select(uint2(0xDB3DE101u, 0x7B6D1B4Bu), uint2(0x58399E77u, 0x5EAC29C9u), v.c1) + + select(uint2(0xFC6014F9u, 0x6BF6693Fu), uint2(0x9D1B1D9Bu, 0xF842F5C1u), v.c2)); + } + + /// + /// Returns a uint2 vector hash code of a bool2x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(bool2x3 v) + { + return (select(uint2(0xA47EC335u, 0xA477DF57u), uint2(0xC4B1493Fu, 0xBA0966D3u), v.c0) + + select(uint2(0xAFBEE253u, 0x5B419C01u), uint2(0x515D90F5u, 0xEC9F68F3u), v.c1) + + select(uint2(0xF9EA92D5u, 0xC2FAFCB9u), uint2(0x616E9CA1u, 0xC5C5394Bu), v.c2)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool2x4.gen.cs b/ThirdParty/Unity.Mathematics/bool2x4.gen.cs new file mode 100644 index 0000000..c4f7615 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool2x4.gen.cs @@ -0,0 +1,320 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x4 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool2x4 : System.IEquatable + { + /// Column 0 of the matrix. + public bool2 c0; + /// Column 1 of the matrix. + public bool2 c1; + /// Column 2 of the matrix. + public bool2 c2; + /// Column 3 of the matrix. + public bool2 c3; + + + /// Constructs a bool2x4 matrix from four bool2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x4(bool2 c0, bool2 c1, bool2 c2, bool2 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a bool2x4 matrix from 8 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x4(bool m00, bool m01, bool m02, bool m03, + bool m10, bool m11, bool m12, bool m13) + { + this.c0 = new bool2(m00, m10); + this.c1 = new bool2(m01, m11); + this.c2 = new bool2(m02, m12); + this.c3 = new bool2(m03, m13); + } + + /// Constructs a bool2x4 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2x4(bool v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + + /// Implicitly converts a single bool value to a bool2x4 matrix by assigning it to every component. + /// bool to convert to bool2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool2x4(bool v) { return new bool2x4(v); } + + + /// Returns the result of a componentwise equality operation on two bool2x4 matrices. + /// Left hand side bool2x4 to use to compute componentwise equality. + /// Right hand side bool2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (bool2x4 lhs, bool2x4 rhs) { return new bool2x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a bool2x4 matrix and a bool value. + /// Left hand side bool2x4 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (bool2x4 lhs, bool rhs) { return new bool2x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool2x4 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (bool lhs, bool2x4 rhs) { return new bool2x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two bool2x4 matrices. + /// Left hand side bool2x4 to use to compute componentwise not equal. + /// Right hand side bool2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (bool2x4 lhs, bool2x4 rhs) { return new bool2x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a bool2x4 matrix and a bool value. + /// Left hand side bool2x4 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (bool2x4 lhs, bool rhs) { return new bool2x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool2x4 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (bool lhs, bool2x4 rhs) { return new bool2x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise not operation on a bool2x4 matrix. + /// Value to use when computing the componentwise not. + /// bool2x4 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator ! (bool2x4 val) { return new bool2x4 (!val.c0, !val.c1, !val.c2, !val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two bool2x4 matrices. + /// Left hand side bool2x4 to use to compute componentwise bitwise and. + /// Right hand side bool2x4 to use to compute componentwise bitwise and. + /// bool2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator & (bool2x4 lhs, bool2x4 rhs) { return new bool2x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on a bool2x4 matrix and a bool value. + /// Left hand side bool2x4 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator & (bool2x4 lhs, bool rhs) { return new bool2x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool2x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool2x4 to use to compute componentwise bitwise and. + /// bool2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator & (bool lhs, bool2x4 rhs) { return new bool2x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two bool2x4 matrices. + /// Left hand side bool2x4 to use to compute componentwise bitwise or. + /// Right hand side bool2x4 to use to compute componentwise bitwise or. + /// bool2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator | (bool2x4 lhs, bool2x4 rhs) { return new bool2x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on a bool2x4 matrix and a bool value. + /// Left hand side bool2x4 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator | (bool2x4 lhs, bool rhs) { return new bool2x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool2x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool2x4 to use to compute componentwise bitwise or. + /// bool2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator | (bool lhs, bool2x4 rhs) { return new bool2x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool2x4 matrices. + /// Left hand side bool2x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool2x4 to use to compute componentwise bitwise exclusive or. + /// bool2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator ^ (bool2x4 lhs, bool2x4 rhs) { return new bool2x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool2x4 matrix and a bool value. + /// Left hand side bool2x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator ^ (bool2x4 lhs, bool rhs) { return new bool2x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool2x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool2x4 to use to compute componentwise bitwise exclusive or. + /// bool2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator ^ (bool lhs, bool2x4 rhs) { return new bool2x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the bool2 element at a specified index. + unsafe public ref bool2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (bool2x4* array = &this) { return ref ((bool2*)array)[index]; } + } + } + + /// Returns true if the bool2x4 is equal to a given bool2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool2x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the bool2x4 is equal to a given bool2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool2x4 converted && Equals(converted); } + + + /// Returns a hash code for the bool2x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool2x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool2x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y); + } + + } + + public static partial class math + { + /// Returns a bool2x4 matrix constructed from four bool2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// bool2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 bool2x4(bool2 c0, bool2 c1, bool2 c2, bool2 c3) { return new bool2x4(c0, c1, c2, c3); } + + /// Returns a bool2x4 matrix constructed from from 8 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// bool2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 bool2x4(bool m00, bool m01, bool m02, bool m03, + bool m10, bool m11, bool m12, bool m13) + { + return new bool2x4(m00, m01, m02, m03, + m10, m11, m12, m13); + } + + /// Returns a bool2x4 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 bool2x4(bool v) { return new bool2x4(v); } + + /// Return the bool4x2 transpose of a bool2x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 transpose(bool2x4 v) + { + return bool4x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y, + v.c3.x, v.c3.y); + } + + /// Returns a uint hash code of a bool2x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool2x4 v) + { + return csum(select(uint2(0x45A22087u, 0xFC104C3Bu), uint2(0x5FFF6B19u, 0x5E6CBF3Bu), v.c0) + + select(uint2(0xB546F2A5u, 0xBBCF63E7u), uint2(0xC53F4755u, 0x6985C229u), v.c1) + + select(uint2(0xE133B0B3u, 0xC3E0A3B9u), uint2(0xFE31134Fu, 0x712A34D7u), v.c2) + + select(uint2(0x9D77A59Bu, 0x4942CA39u), uint2(0xB40EC62Du, 0x565ED63Fu), v.c3)); + } + + /// + /// Returns a uint2 vector hash code of a bool2x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(bool2x4 v) + { + return (select(uint2(0x93C30C2Bu, 0xDCAF0351u), uint2(0x6E050B01u, 0x750FDBF5u), v.c0) + + select(uint2(0x7F3DD499u, 0x52EAAEBBu), uint2(0x4599C793u, 0x83B5E729u), v.c1) + + select(uint2(0xC267163Fu, 0x67BC9149u), uint2(0xAD7C5EC1u, 0x822A7D6Du), v.c2) + + select(uint2(0xB492BF15u, 0xD37220E3u), uint2(0x7AA2C2BDu, 0xE16BC89Du), v.c3)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool3.gen.cs b/ThirdParty/Unity.Mathematics/bool3.gen.cs new file mode 100644 index 0000000..602a7cc --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool3.gen.cs @@ -0,0 +1,1497 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3 component vector of bools. + [DebuggerTypeProxy(typeof(bool3.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool3 : System.IEquatable + { + /// x component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool x; + /// y component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool y; + /// z component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool z; + + + /// Constructs a bool3 vector from three bool values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(bool x, bool y, bool z) + { + this.x = x; + this.y = y; + this.z = z; + } + + /// Constructs a bool3 vector from a bool value and a bool2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(bool x, bool2 yz) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + } + + /// Constructs a bool3 vector from a bool2 vector and a bool value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(bool2 xy, bool z) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + } + + /// Constructs a bool3 vector from a bool3 vector. + /// The constructed vector's xyz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(bool3 xyz) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + } + + /// Constructs a bool3 vector from a single bool value by assigning it to every component. + /// bool to convert to bool3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3(bool v) + { + this.x = v; + this.y = v; + this.z = v; + } + + + /// Implicitly converts a single bool value to a bool3 vector by assigning it to every component. + /// bool to convert to bool3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool3(bool v) { return new bool3(v); } + + + /// Returns the result of a componentwise equality operation on two bool3 vectors. + /// Left hand side bool3 to use to compute componentwise equality. + /// Right hand side bool3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); } + + /// Returns the result of a componentwise equality operation on a bool3 vector and a bool value. + /// Left hand side bool3 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (bool3 lhs, bool rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool3 vector. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (bool lhs, bool3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); } + + + /// Returns the result of a componentwise not equal operation on two bool3 vectors. + /// Left hand side bool3 to use to compute componentwise not equal. + /// Right hand side bool3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); } + + /// Returns the result of a componentwise not equal operation on a bool3 vector and a bool value. + /// Left hand side bool3 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (bool3 lhs, bool rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool3 vector. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (bool lhs, bool3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); } + + + /// Returns the result of a componentwise not operation on a bool3 vector. + /// Value to use when computing the componentwise not. + /// bool3 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator ! (bool3 val) { return new bool3 (!val.x, !val.y, !val.z); } + + + /// Returns the result of a componentwise bitwise and operation on two bool3 vectors. + /// Left hand side bool3 to use to compute componentwise bitwise and. + /// Right hand side bool3 to use to compute componentwise bitwise and. + /// bool3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator & (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x & rhs.x, lhs.y & rhs.y, lhs.z & rhs.z); } + + /// Returns the result of a componentwise bitwise and operation on a bool3 vector and a bool value. + /// Left hand side bool3 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator & (bool3 lhs, bool rhs) { return new bool3 (lhs.x & rhs, lhs.y & rhs, lhs.z & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool3 vector. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool3 to use to compute componentwise bitwise and. + /// bool3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator & (bool lhs, bool3 rhs) { return new bool3 (lhs & rhs.x, lhs & rhs.y, lhs & rhs.z); } + + + /// Returns the result of a componentwise bitwise or operation on two bool3 vectors. + /// Left hand side bool3 to use to compute componentwise bitwise or. + /// Right hand side bool3 to use to compute componentwise bitwise or. + /// bool3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator | (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x | rhs.x, lhs.y | rhs.y, lhs.z | rhs.z); } + + /// Returns the result of a componentwise bitwise or operation on a bool3 vector and a bool value. + /// Left hand side bool3 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator | (bool3 lhs, bool rhs) { return new bool3 (lhs.x | rhs, lhs.y | rhs, lhs.z | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool3 vector. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool3 to use to compute componentwise bitwise or. + /// bool3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator | (bool lhs, bool3 rhs) { return new bool3 (lhs | rhs.x, lhs | rhs.y, lhs | rhs.z); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool3 vectors. + /// Left hand side bool3 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool3 to use to compute componentwise bitwise exclusive or. + /// bool3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator ^ (bool3 lhs, bool3 rhs) { return new bool3 (lhs.x ^ rhs.x, lhs.y ^ rhs.y, lhs.z ^ rhs.z); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool3 vector and a bool value. + /// Left hand side bool3 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator ^ (bool3 lhs, bool rhs) { return new bool3 (lhs.x ^ rhs, lhs.y ^ rhs, lhs.z ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool3 vector. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool3 to use to compute componentwise bitwise exclusive or. + /// bool3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator ^ (bool lhs, bool3 rhs) { return new bool3 (lhs ^ rhs.x, lhs ^ rhs.y, lhs ^ rhs.z); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(z, z); } + } + + + + /// Returns the bool element at a specified index. + unsafe public bool this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (bool3* array = &this) { return ((bool*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (bool* array = &x) { array[index] = value; } + } + } + + /// Returns true if the bool3 is equal to a given bool3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } + + /// Returns true if the bool3 is equal to a given bool3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool3 converted && Equals(converted); } + + + /// Returns a hash code for the bool3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool3({0}, {1}, {2})", x, y, z); + } + + internal sealed class DebuggerProxy + { + public bool x; + public bool y; + public bool z; + public DebuggerProxy(bool3 v) + { + x = v.x; + y = v.y; + z = v.z; + } + } + + } + + public static partial class math + { + /// Returns a bool3 vector constructed from three bool values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// bool3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 bool3(bool x, bool y, bool z) { return new bool3(x, y, z); } + + /// Returns a bool3 vector constructed from a bool value and a bool2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// bool3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 bool3(bool x, bool2 yz) { return new bool3(x, yz); } + + /// Returns a bool3 vector constructed from a bool2 vector and a bool value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// bool3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 bool3(bool2 xy, bool z) { return new bool3(xy, z); } + + /// Returns a bool3 vector constructed from a bool3 vector. + /// The constructed vector's xyz components will be set to this value. + /// bool3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 bool3(bool3 xyz) { return new bool3(xyz); } + + /// Returns a bool3 vector constructed from a single bool value by assigning it to every component. + /// bool to convert to bool3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 bool3(bool v) { return new bool3(v); } + + /// Returns a uint hash code of a bool3 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool3 v) + { + return csum(select(uint3(0xA1E92D39u, 0x4583C801u, 0x9536A0F5u), uint3(0xAF816615u, 0x9AF8D62Du, 0xE3600729u), v)); + } + + /// + /// Returns a uint3 vector hash code of a bool3 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(bool3 v) + { + return (select(uint3(0x5F17300Du, 0x670D6809u, 0x7AF32C49u), uint3(0xAE131389u, 0x5D1B165Bu, 0x87096CD7u), v)); + } + + /// Returns the result of specified shuffling of the components from two bool3 vectors into a bool value. + /// bool3 to use as the left argument of the shuffle operation. + /// bool3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool. + /// bool result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool shuffle(bool3 left, bool3 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two bool3 vectors into a bool2 vector. + /// bool3 to use as the left argument of the shuffle operation. + /// bool3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool2 x component. + /// The ShuffleComponent to use when setting the resulting bool2 y component. + /// bool2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 shuffle(bool3 left, bool3 right, ShuffleComponent x, ShuffleComponent y) + { + return bool2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two bool3 vectors into a bool3 vector. + /// bool3 to use as the left argument of the shuffle operation. + /// bool3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool3 x component. + /// The ShuffleComponent to use when setting the resulting bool3 y component. + /// The ShuffleComponent to use when setting the resulting bool3 z component. + /// bool3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 shuffle(bool3 left, bool3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return bool3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two bool3 vectors into a bool4 vector. + /// bool3 to use as the left argument of the shuffle operation. + /// bool3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool4 x component. + /// The ShuffleComponent to use when setting the resulting bool4 y component. + /// The ShuffleComponent to use when setting the resulting bool4 z component. + /// The ShuffleComponent to use when setting the resulting bool4 w component. + /// bool4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 shuffle(bool3 left, bool3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return bool4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static bool select_shuffle_component(bool3 a, bool3 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool3x2.gen.cs b/ThirdParty/Unity.Mathematics/bool3x2.gen.cs new file mode 100644 index 0000000..8790944 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool3x2.gen.cs @@ -0,0 +1,299 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x2 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool3x2 : System.IEquatable + { + /// Column 0 of the matrix. + public bool3 c0; + /// Column 1 of the matrix. + public bool3 c1; + + + /// Constructs a bool3x2 matrix from two bool3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x2(bool3 c0, bool3 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a bool3x2 matrix from 6 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x2(bool m00, bool m01, + bool m10, bool m11, + bool m20, bool m21) + { + this.c0 = new bool3(m00, m10, m20); + this.c1 = new bool3(m01, m11, m21); + } + + /// Constructs a bool3x2 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x2(bool v) + { + this.c0 = v; + this.c1 = v; + } + + + /// Implicitly converts a single bool value to a bool3x2 matrix by assigning it to every component. + /// bool to convert to bool3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool3x2(bool v) { return new bool3x2(v); } + + + /// Returns the result of a componentwise equality operation on two bool3x2 matrices. + /// Left hand side bool3x2 to use to compute componentwise equality. + /// Right hand side bool3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (bool3x2 lhs, bool3x2 rhs) { return new bool3x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a bool3x2 matrix and a bool value. + /// Left hand side bool3x2 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (bool3x2 lhs, bool rhs) { return new bool3x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool3x2 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (bool lhs, bool3x2 rhs) { return new bool3x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two bool3x2 matrices. + /// Left hand side bool3x2 to use to compute componentwise not equal. + /// Right hand side bool3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (bool3x2 lhs, bool3x2 rhs) { return new bool3x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a bool3x2 matrix and a bool value. + /// Left hand side bool3x2 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (bool3x2 lhs, bool rhs) { return new bool3x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool3x2 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (bool lhs, bool3x2 rhs) { return new bool3x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise not operation on a bool3x2 matrix. + /// Value to use when computing the componentwise not. + /// bool3x2 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator ! (bool3x2 val) { return new bool3x2 (!val.c0, !val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two bool3x2 matrices. + /// Left hand side bool3x2 to use to compute componentwise bitwise and. + /// Right hand side bool3x2 to use to compute componentwise bitwise and. + /// bool3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator & (bool3x2 lhs, bool3x2 rhs) { return new bool3x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on a bool3x2 matrix and a bool value. + /// Left hand side bool3x2 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator & (bool3x2 lhs, bool rhs) { return new bool3x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool3x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool3x2 to use to compute componentwise bitwise and. + /// bool3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator & (bool lhs, bool3x2 rhs) { return new bool3x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two bool3x2 matrices. + /// Left hand side bool3x2 to use to compute componentwise bitwise or. + /// Right hand side bool3x2 to use to compute componentwise bitwise or. + /// bool3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator | (bool3x2 lhs, bool3x2 rhs) { return new bool3x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on a bool3x2 matrix and a bool value. + /// Left hand side bool3x2 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator | (bool3x2 lhs, bool rhs) { return new bool3x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool3x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool3x2 to use to compute componentwise bitwise or. + /// bool3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator | (bool lhs, bool3x2 rhs) { return new bool3x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool3x2 matrices. + /// Left hand side bool3x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool3x2 to use to compute componentwise bitwise exclusive or. + /// bool3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator ^ (bool3x2 lhs, bool3x2 rhs) { return new bool3x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool3x2 matrix and a bool value. + /// Left hand side bool3x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator ^ (bool3x2 lhs, bool rhs) { return new bool3x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool3x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool3x2 to use to compute componentwise bitwise exclusive or. + /// bool3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator ^ (bool lhs, bool3x2 rhs) { return new bool3x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the bool3 element at a specified index. + unsafe public ref bool3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (bool3x2* array = &this) { return ref ((bool3*)array)[index]; } + } + } + + /// Returns true if the bool3x2 is equal to a given bool3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool3x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the bool3x2 is equal to a given bool3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool3x2 converted && Equals(converted); } + + + /// Returns a hash code for the bool3x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool3x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool3x2({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z); + } + + } + + public static partial class math + { + /// Returns a bool3x2 matrix constructed from two bool3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// bool3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 bool3x2(bool3 c0, bool3 c1) { return new bool3x2(c0, c1); } + + /// Returns a bool3x2 matrix constructed from from 6 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// bool3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 bool3x2(bool m00, bool m01, + bool m10, bool m11, + bool m20, bool m21) + { + return new bool3x2(m00, m01, + m10, m11, + m20, m21); + } + + /// Returns a bool3x2 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 bool3x2(bool v) { return new bool3x2(v); } + + /// Return the bool2x3 transpose of a bool3x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 transpose(bool3x2 v) + { + return bool2x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z); + } + + /// Returns a uint hash code of a bool3x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool3x2 v) + { + return csum(select(uint3(0x9C9F0823u, 0x5A9CA13Bu, 0xAFCDD5EFu), uint3(0xA88D187Du, 0xCF6EBA1Du, 0x9D88E5A1u), v.c0) + + select(uint3(0xEADF0775u, 0x747A9D7Bu, 0x4111F799u), uint3(0xB5F05AF1u, 0xFD80290Bu, 0x8B65ADB7u), v.c1)); + } + + /// + /// Returns a uint3 vector hash code of a bool3x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(bool3x2 v) + { + return (select(uint3(0xDFF4F563u, 0x7069770Du, 0xD1224537u), uint3(0xE99ED6F3u, 0x48125549u, 0xEEE2123Bu), v.c0) + + select(uint3(0xE3AD9FE5u, 0xCE1CF8BFu, 0x7BE39F3Bu), uint3(0xFAB9913Fu, 0xB4501269u, 0xE04B89FDu), v.c1)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool3x3.gen.cs b/ThirdParty/Unity.Mathematics/bool3x3.gen.cs new file mode 100644 index 0000000..1ce216d --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool3x3.gen.cs @@ -0,0 +1,315 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x3 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool3x3 : System.IEquatable + { + /// Column 0 of the matrix. + public bool3 c0; + /// Column 1 of the matrix. + public bool3 c1; + /// Column 2 of the matrix. + public bool3 c2; + + + /// Constructs a bool3x3 matrix from three bool3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x3(bool3 c0, bool3 c1, bool3 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a bool3x3 matrix from 9 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x3(bool m00, bool m01, bool m02, + bool m10, bool m11, bool m12, + bool m20, bool m21, bool m22) + { + this.c0 = new bool3(m00, m10, m20); + this.c1 = new bool3(m01, m11, m21); + this.c2 = new bool3(m02, m12, m22); + } + + /// Constructs a bool3x3 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x3(bool v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + + /// Implicitly converts a single bool value to a bool3x3 matrix by assigning it to every component. + /// bool to convert to bool3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool3x3(bool v) { return new bool3x3(v); } + + + /// Returns the result of a componentwise equality operation on two bool3x3 matrices. + /// Left hand side bool3x3 to use to compute componentwise equality. + /// Right hand side bool3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (bool3x3 lhs, bool3x3 rhs) { return new bool3x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a bool3x3 matrix and a bool value. + /// Left hand side bool3x3 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (bool3x3 lhs, bool rhs) { return new bool3x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool3x3 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (bool lhs, bool3x3 rhs) { return new bool3x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two bool3x3 matrices. + /// Left hand side bool3x3 to use to compute componentwise not equal. + /// Right hand side bool3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (bool3x3 lhs, bool3x3 rhs) { return new bool3x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a bool3x3 matrix and a bool value. + /// Left hand side bool3x3 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (bool3x3 lhs, bool rhs) { return new bool3x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool3x3 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (bool lhs, bool3x3 rhs) { return new bool3x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise not operation on a bool3x3 matrix. + /// Value to use when computing the componentwise not. + /// bool3x3 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator ! (bool3x3 val) { return new bool3x3 (!val.c0, !val.c1, !val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two bool3x3 matrices. + /// Left hand side bool3x3 to use to compute componentwise bitwise and. + /// Right hand side bool3x3 to use to compute componentwise bitwise and. + /// bool3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator & (bool3x3 lhs, bool3x3 rhs) { return new bool3x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on a bool3x3 matrix and a bool value. + /// Left hand side bool3x3 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator & (bool3x3 lhs, bool rhs) { return new bool3x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool3x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool3x3 to use to compute componentwise bitwise and. + /// bool3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator & (bool lhs, bool3x3 rhs) { return new bool3x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two bool3x3 matrices. + /// Left hand side bool3x3 to use to compute componentwise bitwise or. + /// Right hand side bool3x3 to use to compute componentwise bitwise or. + /// bool3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator | (bool3x3 lhs, bool3x3 rhs) { return new bool3x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on a bool3x3 matrix and a bool value. + /// Left hand side bool3x3 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator | (bool3x3 lhs, bool rhs) { return new bool3x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool3x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool3x3 to use to compute componentwise bitwise or. + /// bool3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator | (bool lhs, bool3x3 rhs) { return new bool3x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool3x3 matrices. + /// Left hand side bool3x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool3x3 to use to compute componentwise bitwise exclusive or. + /// bool3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator ^ (bool3x3 lhs, bool3x3 rhs) { return new bool3x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool3x3 matrix and a bool value. + /// Left hand side bool3x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator ^ (bool3x3 lhs, bool rhs) { return new bool3x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool3x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool3x3 to use to compute componentwise bitwise exclusive or. + /// bool3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator ^ (bool lhs, bool3x3 rhs) { return new bool3x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the bool3 element at a specified index. + unsafe public ref bool3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (bool3x3* array = &this) { return ref ((bool3*)array)[index]; } + } + } + + /// Returns true if the bool3x3 is equal to a given bool3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool3x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the bool3x3 is equal to a given bool3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool3x3 converted && Equals(converted); } + + + /// Returns a hash code for the bool3x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool3x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool3x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z); + } + + } + + public static partial class math + { + /// Returns a bool3x3 matrix constructed from three bool3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// bool3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 bool3x3(bool3 c0, bool3 c1, bool3 c2) { return new bool3x3(c0, c1, c2); } + + /// Returns a bool3x3 matrix constructed from from 9 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// bool3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 bool3x3(bool m00, bool m01, bool m02, + bool m10, bool m11, bool m12, + bool m20, bool m21, bool m22) + { + return new bool3x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22); + } + + /// Returns a bool3x3 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 bool3x3(bool v) { return new bool3x3(v); } + + /// Return the bool3x3 transpose of a bool3x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 transpose(bool3x3 v) + { + return bool3x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z); + } + + /// Returns a uint hash code of a bool3x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool3x3 v) + { + return csum(select(uint3(0xE7579997u, 0xEF7D56C7u, 0x66F38F0Bu), uint3(0x624256A3u, 0x5292ADE1u, 0xD2E590E5u), v.c0) + + select(uint3(0xF25BE857u, 0x9BC17CE7u, 0xC8B86851u), uint3(0x64095221u, 0xADF428FFu, 0xA3977109u), v.c1) + + select(uint3(0x745ED837u, 0x9CDC88F5u, 0xFA62D721u), uint3(0x7E4DB1CFu, 0x68EEE0F5u, 0xBC3B0A59u), v.c2)); + } + + /// + /// Returns a uint3 vector hash code of a bool3x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(bool3x3 v) + { + return (select(uint3(0x816EFB5Du, 0xA24E82B7u, 0x45A22087u), uint3(0xFC104C3Bu, 0x5FFF6B19u, 0x5E6CBF3Bu), v.c0) + + select(uint3(0xB546F2A5u, 0xBBCF63E7u, 0xC53F4755u), uint3(0x6985C229u, 0xE133B0B3u, 0xC3E0A3B9u), v.c1) + + select(uint3(0xFE31134Fu, 0x712A34D7u, 0x9D77A59Bu), uint3(0x4942CA39u, 0xB40EC62Du, 0x565ED63Fu), v.c2)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool3x4.gen.cs b/ThirdParty/Unity.Mathematics/bool3x4.gen.cs new file mode 100644 index 0000000..f93f07f --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool3x4.gen.cs @@ -0,0 +1,331 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x4 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool3x4 : System.IEquatable + { + /// Column 0 of the matrix. + public bool3 c0; + /// Column 1 of the matrix. + public bool3 c1; + /// Column 2 of the matrix. + public bool3 c2; + /// Column 3 of the matrix. + public bool3 c3; + + + /// Constructs a bool3x4 matrix from four bool3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x4(bool3 c0, bool3 c1, bool3 c2, bool3 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a bool3x4 matrix from 12 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x4(bool m00, bool m01, bool m02, bool m03, + bool m10, bool m11, bool m12, bool m13, + bool m20, bool m21, bool m22, bool m23) + { + this.c0 = new bool3(m00, m10, m20); + this.c1 = new bool3(m01, m11, m21); + this.c2 = new bool3(m02, m12, m22); + this.c3 = new bool3(m03, m13, m23); + } + + /// Constructs a bool3x4 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3x4(bool v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + + /// Implicitly converts a single bool value to a bool3x4 matrix by assigning it to every component. + /// bool to convert to bool3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool3x4(bool v) { return new bool3x4(v); } + + + /// Returns the result of a componentwise equality operation on two bool3x4 matrices. + /// Left hand side bool3x4 to use to compute componentwise equality. + /// Right hand side bool3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (bool3x4 lhs, bool3x4 rhs) { return new bool3x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a bool3x4 matrix and a bool value. + /// Left hand side bool3x4 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (bool3x4 lhs, bool rhs) { return new bool3x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool3x4 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (bool lhs, bool3x4 rhs) { return new bool3x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two bool3x4 matrices. + /// Left hand side bool3x4 to use to compute componentwise not equal. + /// Right hand side bool3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (bool3x4 lhs, bool3x4 rhs) { return new bool3x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a bool3x4 matrix and a bool value. + /// Left hand side bool3x4 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (bool3x4 lhs, bool rhs) { return new bool3x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool3x4 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (bool lhs, bool3x4 rhs) { return new bool3x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise not operation on a bool3x4 matrix. + /// Value to use when computing the componentwise not. + /// bool3x4 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator ! (bool3x4 val) { return new bool3x4 (!val.c0, !val.c1, !val.c2, !val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two bool3x4 matrices. + /// Left hand side bool3x4 to use to compute componentwise bitwise and. + /// Right hand side bool3x4 to use to compute componentwise bitwise and. + /// bool3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator & (bool3x4 lhs, bool3x4 rhs) { return new bool3x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on a bool3x4 matrix and a bool value. + /// Left hand side bool3x4 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator & (bool3x4 lhs, bool rhs) { return new bool3x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool3x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool3x4 to use to compute componentwise bitwise and. + /// bool3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator & (bool lhs, bool3x4 rhs) { return new bool3x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two bool3x4 matrices. + /// Left hand side bool3x4 to use to compute componentwise bitwise or. + /// Right hand side bool3x4 to use to compute componentwise bitwise or. + /// bool3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator | (bool3x4 lhs, bool3x4 rhs) { return new bool3x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on a bool3x4 matrix and a bool value. + /// Left hand side bool3x4 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator | (bool3x4 lhs, bool rhs) { return new bool3x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool3x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool3x4 to use to compute componentwise bitwise or. + /// bool3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator | (bool lhs, bool3x4 rhs) { return new bool3x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool3x4 matrices. + /// Left hand side bool3x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool3x4 to use to compute componentwise bitwise exclusive or. + /// bool3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator ^ (bool3x4 lhs, bool3x4 rhs) { return new bool3x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool3x4 matrix and a bool value. + /// Left hand side bool3x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator ^ (bool3x4 lhs, bool rhs) { return new bool3x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool3x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool3x4 to use to compute componentwise bitwise exclusive or. + /// bool3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator ^ (bool lhs, bool3x4 rhs) { return new bool3x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the bool3 element at a specified index. + unsafe public ref bool3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (bool3x4* array = &this) { return ref ((bool3*)array)[index]; } + } + } + + /// Returns true if the bool3x4 is equal to a given bool3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool3x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the bool3x4 is equal to a given bool3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool3x4 converted && Equals(converted); } + + + /// Returns a hash code for the bool3x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool3x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool3x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z); + } + + } + + public static partial class math + { + /// Returns a bool3x4 matrix constructed from four bool3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// bool3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 bool3x4(bool3 c0, bool3 c1, bool3 c2, bool3 c3) { return new bool3x4(c0, c1, c2, c3); } + + /// Returns a bool3x4 matrix constructed from from 12 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// bool3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 bool3x4(bool m00, bool m01, bool m02, bool m03, + bool m10, bool m11, bool m12, bool m13, + bool m20, bool m21, bool m22, bool m23) + { + return new bool3x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23); + } + + /// Returns a bool3x4 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 bool3x4(bool v) { return new bool3x4(v); } + + /// Return the bool4x3 transpose of a bool3x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 transpose(bool3x4 v) + { + return bool4x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z, + v.c3.x, v.c3.y, v.c3.z); + } + + /// Returns a uint hash code of a bool3x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool3x4 v) + { + return csum(select(uint3(0x83B58237u, 0x833E3E29u, 0xA9D919BFu), uint3(0xC3EC1D97u, 0xB8B208C7u, 0x5D3ED947u), v.c0) + + select(uint3(0x4473BBB1u, 0xCBA11D5Fu, 0x685835CFu), uint3(0xC3D32AE1u, 0xB966942Fu, 0xFE9856B3u), v.c1) + + select(uint3(0xFA3A3285u, 0xAD55999Du, 0xDCDD5341u), uint3(0x94DDD769u, 0xA1E92D39u, 0x4583C801u), v.c2) + + select(uint3(0x9536A0F5u, 0xAF816615u, 0x9AF8D62Du), uint3(0xE3600729u, 0x5F17300Du, 0x670D6809u), v.c3)); + } + + /// + /// Returns a uint3 vector hash code of a bool3x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(bool3x4 v) + { + return (select(uint3(0x7AF32C49u, 0xAE131389u, 0x5D1B165Bu), uint3(0x87096CD7u, 0x4C7F6DD1u, 0x4822A3E9u), v.c0) + + select(uint3(0xAAC3C25Du, 0xD21D0945u, 0x88FCAB2Du), uint3(0x614DA60Du, 0x5BA2C50Bu, 0x8C455ACBu), v.c1) + + select(uint3(0xCD266C89u, 0xF1852A33u, 0x77E35E77u), uint3(0x863E3729u, 0xE191B035u, 0x68586FAFu), v.c2) + + select(uint3(0xD4DFF6D3u, 0xCB634F4Du, 0x9B13B92Du), uint3(0x4ABF0813u, 0x86068063u, 0xD75513F9u), v.c3)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool4.gen.cs b/ThirdParty/Unity.Mathematics/bool4.gen.cs new file mode 100644 index 0000000..b19f367 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool4.gen.cs @@ -0,0 +1,3662 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4 component vector of bools. + [DebuggerTypeProxy(typeof(bool4.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool4 : System.IEquatable + { + /// x component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool x; + /// y component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool y; + /// z component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool z; + /// w component of the vector. + [MarshalAs(UnmanagedType.U1)] + public bool w; + + + /// Constructs a bool4 vector from four bool values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool x, bool y, bool z, bool w) + { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + /// Constructs a bool4 vector from two bool values and a bool2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool x, bool y, bool2 zw) + { + this.x = x; + this.y = y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a bool4 vector from a bool value, a bool2 vector and a bool value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool x, bool2 yz, bool w) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + this.w = w; + } + + /// Constructs a bool4 vector from a bool value and a bool3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool x, bool3 yzw) + { + this.x = x; + this.y = yzw.x; + this.z = yzw.y; + this.w = yzw.z; + } + + /// Constructs a bool4 vector from a bool2 vector and two bool values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool2 xy, bool z, bool w) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + this.w = w; + } + + /// Constructs a bool4 vector from two bool2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool2 xy, bool2 zw) + { + this.x = xy.x; + this.y = xy.y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a bool4 vector from a bool3 vector and a bool value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool3 xyz, bool w) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + this.w = w; + } + + /// Constructs a bool4 vector from a bool4 vector. + /// The constructed vector's xyzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool4 xyzw) + { + this.x = xyzw.x; + this.y = xyzw.y; + this.z = xyzw.z; + this.w = xyzw.w; + } + + /// Constructs a bool4 vector from a single bool value by assigning it to every component. + /// bool to convert to bool4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4(bool v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + + /// Implicitly converts a single bool value to a bool4 vector by assigning it to every component. + /// bool to convert to bool4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool4(bool v) { return new bool4(v); } + + + /// Returns the result of a componentwise equality operation on two bool4 vectors. + /// Left hand side bool4 to use to compute componentwise equality. + /// Right hand side bool4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (bool4 lhs, bool4 rhs) { return new bool4 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z, lhs.w == rhs.w); } + + /// Returns the result of a componentwise equality operation on a bool4 vector and a bool value. + /// Left hand side bool4 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (bool4 lhs, bool rhs) { return new bool4 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs, lhs.w == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool4 vector. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (bool lhs, bool4 rhs) { return new bool4 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z, lhs == rhs.w); } + + + /// Returns the result of a componentwise not equal operation on two bool4 vectors. + /// Left hand side bool4 to use to compute componentwise not equal. + /// Right hand side bool4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (bool4 lhs, bool4 rhs) { return new bool4 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z, lhs.w != rhs.w); } + + /// Returns the result of a componentwise not equal operation on a bool4 vector and a bool value. + /// Left hand side bool4 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (bool4 lhs, bool rhs) { return new bool4 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs, lhs.w != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool4 vector. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (bool lhs, bool4 rhs) { return new bool4 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z, lhs != rhs.w); } + + + /// Returns the result of a componentwise not operation on a bool4 vector. + /// Value to use when computing the componentwise not. + /// bool4 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator ! (bool4 val) { return new bool4 (!val.x, !val.y, !val.z, !val.w); } + + + /// Returns the result of a componentwise bitwise and operation on two bool4 vectors. + /// Left hand side bool4 to use to compute componentwise bitwise and. + /// Right hand side bool4 to use to compute componentwise bitwise and. + /// bool4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator & (bool4 lhs, bool4 rhs) { return new bool4 (lhs.x & rhs.x, lhs.y & rhs.y, lhs.z & rhs.z, lhs.w & rhs.w); } + + /// Returns the result of a componentwise bitwise and operation on a bool4 vector and a bool value. + /// Left hand side bool4 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator & (bool4 lhs, bool rhs) { return new bool4 (lhs.x & rhs, lhs.y & rhs, lhs.z & rhs, lhs.w & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool4 vector. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool4 to use to compute componentwise bitwise and. + /// bool4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator & (bool lhs, bool4 rhs) { return new bool4 (lhs & rhs.x, lhs & rhs.y, lhs & rhs.z, lhs & rhs.w); } + + + /// Returns the result of a componentwise bitwise or operation on two bool4 vectors. + /// Left hand side bool4 to use to compute componentwise bitwise or. + /// Right hand side bool4 to use to compute componentwise bitwise or. + /// bool4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator | (bool4 lhs, bool4 rhs) { return new bool4 (lhs.x | rhs.x, lhs.y | rhs.y, lhs.z | rhs.z, lhs.w | rhs.w); } + + /// Returns the result of a componentwise bitwise or operation on a bool4 vector and a bool value. + /// Left hand side bool4 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator | (bool4 lhs, bool rhs) { return new bool4 (lhs.x | rhs, lhs.y | rhs, lhs.z | rhs, lhs.w | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool4 vector. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool4 to use to compute componentwise bitwise or. + /// bool4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator | (bool lhs, bool4 rhs) { return new bool4 (lhs | rhs.x, lhs | rhs.y, lhs | rhs.z, lhs | rhs.w); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool4 vectors. + /// Left hand side bool4 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool4 to use to compute componentwise bitwise exclusive or. + /// bool4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator ^ (bool4 lhs, bool4 rhs) { return new bool4 (lhs.x ^ rhs.x, lhs.y ^ rhs.y, lhs.z ^ rhs.z, lhs.w ^ rhs.w); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool4 vector and a bool value. + /// Left hand side bool4 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator ^ (bool4 lhs, bool rhs) { return new bool4 (lhs.x ^ rhs, lhs.y ^ rhs, lhs.z ^ rhs, lhs.w ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool4 vector. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool4 to use to compute componentwise bitwise exclusive or. + /// bool4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator ^ (bool lhs, bool4 rhs) { return new bool4 (lhs ^ rhs.x, lhs ^ rhs.y, lhs ^ rhs.z, lhs ^ rhs.w); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 xwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(x, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 yzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 ywww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(y, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 zwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(z, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool4 wwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool4(w, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 xww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 ywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 ywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 ywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 yww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 zww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 wwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool3 www + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool3(w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 xw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 yw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 zw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 wx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 wy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 wz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public bool2 ww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new bool2(w, w); } + } + + + + /// Returns the bool element at a specified index. + unsafe public bool this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (bool4* array = &this) { return ((bool*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (bool* array = &x) { array[index] = value; } + } + } + + /// Returns true if the bool4 is equal to a given bool4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } + + /// Returns true if the bool4 is equal to a given bool4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool4 converted && Equals(converted); } + + + /// Returns a hash code for the bool4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool4({0}, {1}, {2}, {3})", x, y, z, w); + } + + internal sealed class DebuggerProxy + { + public bool x; + public bool y; + public bool z; + public bool w; + public DebuggerProxy(bool4 v) + { + x = v.x; + y = v.y; + z = v.z; + w = v.w; + } + } + + } + + public static partial class math + { + /// Returns a bool4 vector constructed from four bool values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// bool4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool x, bool y, bool z, bool w) { return new bool4(x, y, z, w); } + + /// Returns a bool4 vector constructed from two bool values and a bool2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// bool4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool x, bool y, bool2 zw) { return new bool4(x, y, zw); } + + /// Returns a bool4 vector constructed from a bool value, a bool2 vector and a bool value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// bool4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool x, bool2 yz, bool w) { return new bool4(x, yz, w); } + + /// Returns a bool4 vector constructed from a bool value and a bool3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + /// bool4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool x, bool3 yzw) { return new bool4(x, yzw); } + + /// Returns a bool4 vector constructed from a bool2 vector and two bool values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// bool4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool2 xy, bool z, bool w) { return new bool4(xy, z, w); } + + /// Returns a bool4 vector constructed from two bool2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// bool4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool2 xy, bool2 zw) { return new bool4(xy, zw); } + + /// Returns a bool4 vector constructed from a bool3 vector and a bool value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// bool4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool3 xyz, bool w) { return new bool4(xyz, w); } + + /// Returns a bool4 vector constructed from a bool4 vector. + /// The constructed vector's xyzw components will be set to this value. + /// bool4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool4 xyzw) { return new bool4(xyzw); } + + /// Returns a bool4 vector constructed from a single bool value by assigning it to every component. + /// bool to convert to bool4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 bool4(bool v) { return new bool4(v); } + + /// Returns a uint hash code of a bool4 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool4 v) + { + return csum(select(uint4(0x5FFF6B19u, 0x5E6CBF3Bu, 0xB546F2A5u, 0xBBCF63E7u), uint4(0xC53F4755u, 0x6985C229u, 0xE133B0B3u, 0xC3E0A3B9u), v)); + } + + /// + /// Returns a uint4 vector hash code of a bool4 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(bool4 v) + { + return (select(uint4(0xFE31134Fu, 0x712A34D7u, 0x9D77A59Bu, 0x4942CA39u), uint4(0xB40EC62Du, 0x565ED63Fu, 0x93C30C2Bu, 0xDCAF0351u), v)); + } + + /// Returns the result of specified shuffling of the components from two bool4 vectors into a bool value. + /// bool4 to use as the left argument of the shuffle operation. + /// bool4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool. + /// bool result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool shuffle(bool4 left, bool4 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two bool4 vectors into a bool2 vector. + /// bool4 to use as the left argument of the shuffle operation. + /// bool4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool2 x component. + /// The ShuffleComponent to use when setting the resulting bool2 y component. + /// bool2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 shuffle(bool4 left, bool4 right, ShuffleComponent x, ShuffleComponent y) + { + return bool2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two bool4 vectors into a bool3 vector. + /// bool4 to use as the left argument of the shuffle operation. + /// bool4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool3 x component. + /// The ShuffleComponent to use when setting the resulting bool3 y component. + /// The ShuffleComponent to use when setting the resulting bool3 z component. + /// bool3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 shuffle(bool4 left, bool4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return bool3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two bool4 vectors into a bool4 vector. + /// bool4 to use as the left argument of the shuffle operation. + /// bool4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting bool4 x component. + /// The ShuffleComponent to use when setting the resulting bool4 y component. + /// The ShuffleComponent to use when setting the resulting bool4 z component. + /// The ShuffleComponent to use when setting the resulting bool4 w component. + /// bool4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 shuffle(bool4 left, bool4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return bool4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static bool select_shuffle_component(bool4 a, bool4 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.LeftW: + return a.w; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + case ShuffleComponent.RightW: + return b.w; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool4x2.gen.cs b/ThirdParty/Unity.Mathematics/bool4x2.gen.cs new file mode 100644 index 0000000..875357d --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool4x2.gen.cs @@ -0,0 +1,306 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x2 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool4x2 : System.IEquatable + { + /// Column 0 of the matrix. + public bool4 c0; + /// Column 1 of the matrix. + public bool4 c1; + + + /// Constructs a bool4x2 matrix from two bool4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x2(bool4 c0, bool4 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a bool4x2 matrix from 8 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x2(bool m00, bool m01, + bool m10, bool m11, + bool m20, bool m21, + bool m30, bool m31) + { + this.c0 = new bool4(m00, m10, m20, m30); + this.c1 = new bool4(m01, m11, m21, m31); + } + + /// Constructs a bool4x2 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x2(bool v) + { + this.c0 = v; + this.c1 = v; + } + + + /// Implicitly converts a single bool value to a bool4x2 matrix by assigning it to every component. + /// bool to convert to bool4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool4x2(bool v) { return new bool4x2(v); } + + + /// Returns the result of a componentwise equality operation on two bool4x2 matrices. + /// Left hand side bool4x2 to use to compute componentwise equality. + /// Right hand side bool4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (bool4x2 lhs, bool4x2 rhs) { return new bool4x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a bool4x2 matrix and a bool value. + /// Left hand side bool4x2 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (bool4x2 lhs, bool rhs) { return new bool4x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool4x2 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (bool lhs, bool4x2 rhs) { return new bool4x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two bool4x2 matrices. + /// Left hand side bool4x2 to use to compute componentwise not equal. + /// Right hand side bool4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (bool4x2 lhs, bool4x2 rhs) { return new bool4x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a bool4x2 matrix and a bool value. + /// Left hand side bool4x2 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (bool4x2 lhs, bool rhs) { return new bool4x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool4x2 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (bool lhs, bool4x2 rhs) { return new bool4x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise not operation on a bool4x2 matrix. + /// Value to use when computing the componentwise not. + /// bool4x2 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator ! (bool4x2 val) { return new bool4x2 (!val.c0, !val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two bool4x2 matrices. + /// Left hand side bool4x2 to use to compute componentwise bitwise and. + /// Right hand side bool4x2 to use to compute componentwise bitwise and. + /// bool4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator & (bool4x2 lhs, bool4x2 rhs) { return new bool4x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on a bool4x2 matrix and a bool value. + /// Left hand side bool4x2 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator & (bool4x2 lhs, bool rhs) { return new bool4x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool4x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool4x2 to use to compute componentwise bitwise and. + /// bool4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator & (bool lhs, bool4x2 rhs) { return new bool4x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two bool4x2 matrices. + /// Left hand side bool4x2 to use to compute componentwise bitwise or. + /// Right hand side bool4x2 to use to compute componentwise bitwise or. + /// bool4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator | (bool4x2 lhs, bool4x2 rhs) { return new bool4x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on a bool4x2 matrix and a bool value. + /// Left hand side bool4x2 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator | (bool4x2 lhs, bool rhs) { return new bool4x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool4x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool4x2 to use to compute componentwise bitwise or. + /// bool4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator | (bool lhs, bool4x2 rhs) { return new bool4x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool4x2 matrices. + /// Left hand side bool4x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool4x2 to use to compute componentwise bitwise exclusive or. + /// bool4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator ^ (bool4x2 lhs, bool4x2 rhs) { return new bool4x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool4x2 matrix and a bool value. + /// Left hand side bool4x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator ^ (bool4x2 lhs, bool rhs) { return new bool4x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool4x2 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool4x2 to use to compute componentwise bitwise exclusive or. + /// bool4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator ^ (bool lhs, bool4x2 rhs) { return new bool4x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the bool4 element at a specified index. + unsafe public ref bool4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (bool4x2* array = &this) { return ref ((bool4*)array)[index]; } + } + } + + /// Returns true if the bool4x2 is equal to a given bool4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool4x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the bool4x2 is equal to a given bool4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool4x2 converted && Equals(converted); } + + + /// Returns a hash code for the bool4x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool4x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool4x2({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z, c0.w, c1.w); + } + + } + + public static partial class math + { + /// Returns a bool4x2 matrix constructed from two bool4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// bool4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 bool4x2(bool4 c0, bool4 c1) { return new bool4x2(c0, c1); } + + /// Returns a bool4x2 matrix constructed from from 8 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// bool4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 bool4x2(bool m00, bool m01, + bool m10, bool m11, + bool m20, bool m21, + bool m30, bool m31) + { + return new bool4x2(m00, m01, + m10, m11, + m20, m21, + m30, m31); + } + + /// Returns a bool4x2 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 bool4x2(bool v) { return new bool4x2(v); } + + /// Return the bool2x4 transpose of a bool4x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 transpose(bool4x2 v) + { + return bool2x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w); + } + + /// Returns a uint hash code of a bool4x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool4x2 v) + { + return csum(select(uint4(0xD19764C7u, 0xB5D0BF63u, 0xF9102C5Fu, 0x9881FB9Fu), uint4(0x56A1530Du, 0x804B722Du, 0x738E50E5u, 0x4FC93C25u), v.c0) + + select(uint4(0xCD0445A5u, 0xD2B90D9Bu, 0xD35C9B2Du, 0xA10D9E27u), uint4(0x568DAAA9u, 0x7530254Fu, 0x9F090439u, 0x5E9F85C9u), v.c1)); + } + + /// + /// Returns a uint4 vector hash code of a bool4x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(bool4x2 v) + { + return (select(uint4(0x8C4CA03Fu, 0xB8D969EDu, 0xAC5DB57Bu, 0xA91A02EDu), uint4(0xB3C49313u, 0xF43A9ABBu, 0x84E7E01Bu, 0x8E055BE5u), v.c0) + + select(uint4(0x6E624EB7u, 0x7383ED49u, 0xDD49C23Bu, 0xEBD0D005u), uint4(0x91475DF7u, 0x55E84827u, 0x90A285BBu, 0x5D19E1D5u), v.c1)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool4x3.gen.cs b/ThirdParty/Unity.Mathematics/bool4x3.gen.cs new file mode 100644 index 0000000..655bfab --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool4x3.gen.cs @@ -0,0 +1,324 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x3 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool4x3 : System.IEquatable + { + /// Column 0 of the matrix. + public bool4 c0; + /// Column 1 of the matrix. + public bool4 c1; + /// Column 2 of the matrix. + public bool4 c2; + + + /// Constructs a bool4x3 matrix from three bool4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x3(bool4 c0, bool4 c1, bool4 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a bool4x3 matrix from 12 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x3(bool m00, bool m01, bool m02, + bool m10, bool m11, bool m12, + bool m20, bool m21, bool m22, + bool m30, bool m31, bool m32) + { + this.c0 = new bool4(m00, m10, m20, m30); + this.c1 = new bool4(m01, m11, m21, m31); + this.c2 = new bool4(m02, m12, m22, m32); + } + + /// Constructs a bool4x3 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x3(bool v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + + /// Implicitly converts a single bool value to a bool4x3 matrix by assigning it to every component. + /// bool to convert to bool4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool4x3(bool v) { return new bool4x3(v); } + + + /// Returns the result of a componentwise equality operation on two bool4x3 matrices. + /// Left hand side bool4x3 to use to compute componentwise equality. + /// Right hand side bool4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (bool4x3 lhs, bool4x3 rhs) { return new bool4x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a bool4x3 matrix and a bool value. + /// Left hand side bool4x3 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (bool4x3 lhs, bool rhs) { return new bool4x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool4x3 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (bool lhs, bool4x3 rhs) { return new bool4x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two bool4x3 matrices. + /// Left hand side bool4x3 to use to compute componentwise not equal. + /// Right hand side bool4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (bool4x3 lhs, bool4x3 rhs) { return new bool4x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a bool4x3 matrix and a bool value. + /// Left hand side bool4x3 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (bool4x3 lhs, bool rhs) { return new bool4x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool4x3 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (bool lhs, bool4x3 rhs) { return new bool4x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise not operation on a bool4x3 matrix. + /// Value to use when computing the componentwise not. + /// bool4x3 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator ! (bool4x3 val) { return new bool4x3 (!val.c0, !val.c1, !val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two bool4x3 matrices. + /// Left hand side bool4x3 to use to compute componentwise bitwise and. + /// Right hand side bool4x3 to use to compute componentwise bitwise and. + /// bool4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator & (bool4x3 lhs, bool4x3 rhs) { return new bool4x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on a bool4x3 matrix and a bool value. + /// Left hand side bool4x3 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator & (bool4x3 lhs, bool rhs) { return new bool4x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool4x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool4x3 to use to compute componentwise bitwise and. + /// bool4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator & (bool lhs, bool4x3 rhs) { return new bool4x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two bool4x3 matrices. + /// Left hand side bool4x3 to use to compute componentwise bitwise or. + /// Right hand side bool4x3 to use to compute componentwise bitwise or. + /// bool4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator | (bool4x3 lhs, bool4x3 rhs) { return new bool4x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on a bool4x3 matrix and a bool value. + /// Left hand side bool4x3 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator | (bool4x3 lhs, bool rhs) { return new bool4x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool4x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool4x3 to use to compute componentwise bitwise or. + /// bool4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator | (bool lhs, bool4x3 rhs) { return new bool4x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool4x3 matrices. + /// Left hand side bool4x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool4x3 to use to compute componentwise bitwise exclusive or. + /// bool4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator ^ (bool4x3 lhs, bool4x3 rhs) { return new bool4x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool4x3 matrix and a bool value. + /// Left hand side bool4x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator ^ (bool4x3 lhs, bool rhs) { return new bool4x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool4x3 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool4x3 to use to compute componentwise bitwise exclusive or. + /// bool4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator ^ (bool lhs, bool4x3 rhs) { return new bool4x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the bool4 element at a specified index. + unsafe public ref bool4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (bool4x3* array = &this) { return ref ((bool4*)array)[index]; } + } + } + + /// Returns true if the bool4x3 is equal to a given bool4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool4x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the bool4x3 is equal to a given bool4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool4x3 converted && Equals(converted); } + + + /// Returns a hash code for the bool4x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool4x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool4x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z, c0.w, c1.w, c2.w); + } + + } + + public static partial class math + { + /// Returns a bool4x3 matrix constructed from three bool4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// bool4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 bool4x3(bool4 c0, bool4 c1, bool4 c2) { return new bool4x3(c0, c1, c2); } + + /// Returns a bool4x3 matrix constructed from from 12 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// bool4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 bool4x3(bool m00, bool m01, bool m02, + bool m10, bool m11, bool m12, + bool m20, bool m21, bool m22, + bool m30, bool m31, bool m32) + { + return new bool4x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22, + m30, m31, m32); + } + + /// Returns a bool4x3 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 bool4x3(bool v) { return new bool4x3(v); } + + /// Return the bool3x4 transpose of a bool4x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 transpose(bool4x3 v) + { + return bool3x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w); + } + + /// Returns a uint hash code of a bool4x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool4x3 v) + { + return csum(select(uint4(0xEADF0775u, 0x747A9D7Bu, 0x4111F799u, 0xB5F05AF1u), uint4(0xFD80290Bu, 0x8B65ADB7u, 0xDFF4F563u, 0x7069770Du), v.c0) + + select(uint4(0xD1224537u, 0xE99ED6F3u, 0x48125549u, 0xEEE2123Bu), uint4(0xE3AD9FE5u, 0xCE1CF8BFu, 0x7BE39F3Bu, 0xFAB9913Fu), v.c1) + + select(uint4(0xB4501269u, 0xE04B89FDu, 0xDB3DE101u, 0x7B6D1B4Bu), uint4(0x58399E77u, 0x5EAC29C9u, 0xFC6014F9u, 0x6BF6693Fu), v.c2)); + } + + /// + /// Returns a uint4 vector hash code of a bool4x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(bool4x3 v) + { + return (select(uint4(0x9D1B1D9Bu, 0xF842F5C1u, 0xA47EC335u, 0xA477DF57u), uint4(0xC4B1493Fu, 0xBA0966D3u, 0xAFBEE253u, 0x5B419C01u), v.c0) + + select(uint4(0x515D90F5u, 0xEC9F68F3u, 0xF9EA92D5u, 0xC2FAFCB9u), uint4(0x616E9CA1u, 0xC5C5394Bu, 0xCAE78587u, 0x7A1541C9u), v.c1) + + select(uint4(0xF83BD927u, 0x6A243BCBu, 0x509B84C9u, 0x91D13847u), uint4(0x52F7230Fu, 0xCF286E83u, 0xE121E6ADu, 0xC9CA1249u), v.c2)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/bool4x4.gen.cs b/ThirdParty/Unity.Mathematics/bool4x4.gen.cs new file mode 100644 index 0000000..9112018 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/bool4x4.gen.cs @@ -0,0 +1,342 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x4 matrix of bools. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct bool4x4 : System.IEquatable + { + /// Column 0 of the matrix. + public bool4 c0; + /// Column 1 of the matrix. + public bool4 c1; + /// Column 2 of the matrix. + public bool4 c2; + /// Column 3 of the matrix. + public bool4 c3; + + + /// Constructs a bool4x4 matrix from four bool4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x4(bool4 c0, bool4 c1, bool4 c2, bool4 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a bool4x4 matrix from 16 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x4(bool m00, bool m01, bool m02, bool m03, + bool m10, bool m11, bool m12, bool m13, + bool m20, bool m21, bool m22, bool m23, + bool m30, bool m31, bool m32, bool m33) + { + this.c0 = new bool4(m00, m10, m20, m30); + this.c1 = new bool4(m01, m11, m21, m31); + this.c2 = new bool4(m02, m12, m22, m32); + this.c3 = new bool4(m03, m13, m23, m33); + } + + /// Constructs a bool4x4 matrix from a single bool value by assigning it to every component. + /// bool to convert to bool4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4x4(bool v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + + /// Implicitly converts a single bool value to a bool4x4 matrix by assigning it to every component. + /// bool to convert to bool4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator bool4x4(bool v) { return new bool4x4(v); } + + + /// Returns the result of a componentwise equality operation on two bool4x4 matrices. + /// Left hand side bool4x4 to use to compute componentwise equality. + /// Right hand side bool4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (bool4x4 lhs, bool4x4 rhs) { return new bool4x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a bool4x4 matrix and a bool value. + /// Left hand side bool4x4 to use to compute componentwise equality. + /// Right hand side bool to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (bool4x4 lhs, bool rhs) { return new bool4x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a bool value and a bool4x4 matrix. + /// Left hand side bool to use to compute componentwise equality. + /// Right hand side bool4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (bool lhs, bool4x4 rhs) { return new bool4x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two bool4x4 matrices. + /// Left hand side bool4x4 to use to compute componentwise not equal. + /// Right hand side bool4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (bool4x4 lhs, bool4x4 rhs) { return new bool4x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a bool4x4 matrix and a bool value. + /// Left hand side bool4x4 to use to compute componentwise not equal. + /// Right hand side bool to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (bool4x4 lhs, bool rhs) { return new bool4x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a bool value and a bool4x4 matrix. + /// Left hand side bool to use to compute componentwise not equal. + /// Right hand side bool4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (bool lhs, bool4x4 rhs) { return new bool4x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise not operation on a bool4x4 matrix. + /// Value to use when computing the componentwise not. + /// bool4x4 result of the componentwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator ! (bool4x4 val) { return new bool4x4 (!val.c0, !val.c1, !val.c2, !val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two bool4x4 matrices. + /// Left hand side bool4x4 to use to compute componentwise bitwise and. + /// Right hand side bool4x4 to use to compute componentwise bitwise and. + /// bool4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator & (bool4x4 lhs, bool4x4 rhs) { return new bool4x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on a bool4x4 matrix and a bool value. + /// Left hand side bool4x4 to use to compute componentwise bitwise and. + /// Right hand side bool to use to compute componentwise bitwise and. + /// bool4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator & (bool4x4 lhs, bool rhs) { return new bool4x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a bool value and a bool4x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise and. + /// Right hand side bool4x4 to use to compute componentwise bitwise and. + /// bool4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator & (bool lhs, bool4x4 rhs) { return new bool4x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two bool4x4 matrices. + /// Left hand side bool4x4 to use to compute componentwise bitwise or. + /// Right hand side bool4x4 to use to compute componentwise bitwise or. + /// bool4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator | (bool4x4 lhs, bool4x4 rhs) { return new bool4x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on a bool4x4 matrix and a bool value. + /// Left hand side bool4x4 to use to compute componentwise bitwise or. + /// Right hand side bool to use to compute componentwise bitwise or. + /// bool4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator | (bool4x4 lhs, bool rhs) { return new bool4x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a bool value and a bool4x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise or. + /// Right hand side bool4x4 to use to compute componentwise bitwise or. + /// bool4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator | (bool lhs, bool4x4 rhs) { return new bool4x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two bool4x4 matrices. + /// Left hand side bool4x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool4x4 to use to compute componentwise bitwise exclusive or. + /// bool4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator ^ (bool4x4 lhs, bool4x4 rhs) { return new bool4x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool4x4 matrix and a bool value. + /// Left hand side bool4x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side bool to use to compute componentwise bitwise exclusive or. + /// bool4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator ^ (bool4x4 lhs, bool rhs) { return new bool4x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool4x4 matrix. + /// Left hand side bool to use to compute componentwise bitwise exclusive or. + /// Right hand side bool4x4 to use to compute componentwise bitwise exclusive or. + /// bool4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator ^ (bool lhs, bool4x4 rhs) { return new bool4x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the bool4 element at a specified index. + unsafe public ref bool4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (bool4x4* array = &this) { return ref ((bool4*)array)[index]; } + } + } + + /// Returns true if the bool4x4 is equal to a given bool4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(bool4x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the bool4x4 is equal to a given bool4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is bool4x4 converted && Equals(converted); } + + + /// Returns a hash code for the bool4x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the bool4x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("bool4x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z, c0.w, c1.w, c2.w, c3.w); + } + + } + + public static partial class math + { + /// Returns a bool4x4 matrix constructed from four bool4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// bool4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 bool4x4(bool4 c0, bool4 c1, bool4 c2, bool4 c3) { return new bool4x4(c0, c1, c2, c3); } + + /// Returns a bool4x4 matrix constructed from from 16 bool values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + /// bool4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 bool4x4(bool m00, bool m01, bool m02, bool m03, + bool m10, bool m11, bool m12, bool m13, + bool m20, bool m21, bool m22, bool m23, + bool m30, bool m31, bool m32, bool m33) + { + return new bool4x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23, + m30, m31, m32, m33); + } + + /// Returns a bool4x4 matrix constructed from a single bool value by assigning it to every component. + /// bool to convert to bool4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 bool4x4(bool v) { return new bool4x4(v); } + + /// Return the bool4x4 transpose of a bool4x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 transpose(bool4x4 v) + { + return bool4x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w, + v.c3.x, v.c3.y, v.c3.z, v.c3.w); + } + + /// Returns a uint hash code of a bool4x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(bool4x4 v) + { + return csum(select(uint4(0xD19764C7u, 0xB5D0BF63u, 0xF9102C5Fu, 0x9881FB9Fu), uint4(0x56A1530Du, 0x804B722Du, 0x738E50E5u, 0x4FC93C25u), v.c0) + + select(uint4(0xCD0445A5u, 0xD2B90D9Bu, 0xD35C9B2Du, 0xA10D9E27u), uint4(0x568DAAA9u, 0x7530254Fu, 0x9F090439u, 0x5E9F85C9u), v.c1) + + select(uint4(0x8C4CA03Fu, 0xB8D969EDu, 0xAC5DB57Bu, 0xA91A02EDu), uint4(0xB3C49313u, 0xF43A9ABBu, 0x84E7E01Bu, 0x8E055BE5u), v.c2) + + select(uint4(0x6E624EB7u, 0x7383ED49u, 0xDD49C23Bu, 0xEBD0D005u), uint4(0x91475DF7u, 0x55E84827u, 0x90A285BBu, 0x5D19E1D5u), v.c3)); + } + + /// + /// Returns a uint4 vector hash code of a bool4x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(bool4x4 v) + { + return (select(uint4(0xFAAF07DDu, 0x625C45BDu, 0xC9F27FCBu, 0x6D2523B1u), uint4(0x6E2BF6A9u, 0xCC74B3B7u, 0x83B58237u, 0x833E3E29u), v.c0) + + select(uint4(0xA9D919BFu, 0xC3EC1D97u, 0xB8B208C7u, 0x5D3ED947u), uint4(0x4473BBB1u, 0xCBA11D5Fu, 0x685835CFu, 0xC3D32AE1u), v.c1) + + select(uint4(0xB966942Fu, 0xFE9856B3u, 0xFA3A3285u, 0xAD55999Du), uint4(0xDCDD5341u, 0x94DDD769u, 0xA1E92D39u, 0x4583C801u), v.c2) + + select(uint4(0x9536A0F5u, 0xAF816615u, 0x9AF8D62Du, 0xE3600729u), uint4(0x5F17300Du, 0x670D6809u, 0x7AF32C49u, 0xAE131389u), v.c3)); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double2.gen.cs b/ThirdParty/Unity.Mathematics/double2.gen.cs new file mode 100644 index 0000000..d4d213f --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double2.gen.cs @@ -0,0 +1,998 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2 component vector of doubles. + [DebuggerTypeProxy(typeof(double2.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double2 : System.IEquatable, IFormattable + { + /// x component of the vector. + public double x; + /// y component of the vector. + public double y; + + /// double2 zero value. + public static readonly double2 zero; + + /// Constructs a double2 vector from two double values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(double x, double y) + { + this.x = x; + this.y = y; + } + + /// Constructs a double2 vector from a double2 vector. + /// The constructed vector's xy components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(double2 xy) + { + this.x = xy.x; + this.y = xy.y; + } + + /// Constructs a double2 vector from a single double value by assigning it to every component. + /// double to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(double v) + { + this.x = v; + this.y = v; + } + + /// Constructs a double2 vector from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(bool v) + { + this.x = v ? 1.0 : 0.0; + this.y = v ? 1.0 : 0.0; + } + + /// Constructs a double2 vector from a bool2 vector by componentwise conversion. + /// bool2 to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(bool2 v) + { + this.x = v.x ? 1.0 : 0.0; + this.y = v.y ? 1.0 : 0.0; + } + + /// Constructs a double2 vector from a single int value by converting it to double and assigning it to every component. + /// int to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(int v) + { + this.x = v; + this.y = v; + } + + /// Constructs a double2 vector from a int2 vector by componentwise conversion. + /// int2 to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(int2 v) + { + this.x = v.x; + this.y = v.y; + } + + /// Constructs a double2 vector from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(uint v) + { + this.x = v; + this.y = v; + } + + /// Constructs a double2 vector from a uint2 vector by componentwise conversion. + /// uint2 to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(uint2 v) + { + this.x = v.x; + this.y = v.y; + } + + /// Constructs a double2 vector from a single half value by converting it to double and assigning it to every component. + /// half to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(half v) + { + this.x = v; + this.y = v; + } + + /// Constructs a double2 vector from a half2 vector by componentwise conversion. + /// half2 to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(half2 v) + { + this.x = v.x; + this.y = v.y; + } + + /// Constructs a double2 vector from a single float value by converting it to double and assigning it to every component. + /// float to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(float v) + { + this.x = v; + this.y = v; + } + + /// Constructs a double2 vector from a float2 vector by componentwise conversion. + /// float2 to convert to double2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2(float2 v) + { + this.x = v.x; + this.y = v.y; + } + + + /// Implicitly converts a single double value to a double2 vector by assigning it to every component. + /// double to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(double v) { return new double2(v); } + + /// Explicitly converts a single bool value to a double2 vector by converting it to double and assigning it to every component. + /// bool to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double2(bool v) { return new double2(v); } + + /// Explicitly converts a bool2 vector to a double2 vector by componentwise conversion. + /// bool2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double2(bool2 v) { return new double2(v); } + + /// Implicitly converts a single int value to a double2 vector by converting it to double and assigning it to every component. + /// int to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(int v) { return new double2(v); } + + /// Implicitly converts a int2 vector to a double2 vector by componentwise conversion. + /// int2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(int2 v) { return new double2(v); } + + /// Implicitly converts a single uint value to a double2 vector by converting it to double and assigning it to every component. + /// uint to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(uint v) { return new double2(v); } + + /// Implicitly converts a uint2 vector to a double2 vector by componentwise conversion. + /// uint2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(uint2 v) { return new double2(v); } + + /// Implicitly converts a single half value to a double2 vector by converting it to double and assigning it to every component. + /// half to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(half v) { return new double2(v); } + + /// Implicitly converts a half2 vector to a double2 vector by componentwise conversion. + /// half2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(half2 v) { return new double2(v); } + + /// Implicitly converts a single float value to a double2 vector by converting it to double and assigning it to every component. + /// float to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(float v) { return new double2(v); } + + /// Implicitly converts a float2 vector to a double2 vector by componentwise conversion. + /// float2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2(float2 v) { return new double2(v); } + + + /// Returns the result of a componentwise multiplication operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise multiplication. + /// Right hand side double2 to use to compute componentwise multiplication. + /// double2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator * (double2 lhs, double2 rhs) { return new double2 (lhs.x * rhs.x, lhs.y * rhs.y); } + + /// Returns the result of a componentwise multiplication operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator * (double2 lhs, double rhs) { return new double2 (lhs.x * rhs, lhs.y * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double2 to use to compute componentwise multiplication. + /// double2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator * (double lhs, double2 rhs) { return new double2 (lhs * rhs.x, lhs * rhs.y); } + + + /// Returns the result of a componentwise addition operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise addition. + /// Right hand side double2 to use to compute componentwise addition. + /// double2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator + (double2 lhs, double2 rhs) { return new double2 (lhs.x + rhs.x, lhs.y + rhs.y); } + + /// Returns the result of a componentwise addition operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator + (double2 lhs, double rhs) { return new double2 (lhs.x + rhs, lhs.y + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double2 to use to compute componentwise addition. + /// double2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator + (double lhs, double2 rhs) { return new double2 (lhs + rhs.x, lhs + rhs.y); } + + + /// Returns the result of a componentwise subtraction operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise subtraction. + /// Right hand side double2 to use to compute componentwise subtraction. + /// double2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator - (double2 lhs, double2 rhs) { return new double2 (lhs.x - rhs.x, lhs.y - rhs.y); } + + /// Returns the result of a componentwise subtraction operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator - (double2 lhs, double rhs) { return new double2 (lhs.x - rhs, lhs.y - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double2 to use to compute componentwise subtraction. + /// double2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator - (double lhs, double2 rhs) { return new double2 (lhs - rhs.x, lhs - rhs.y); } + + + /// Returns the result of a componentwise division operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise division. + /// Right hand side double2 to use to compute componentwise division. + /// double2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator / (double2 lhs, double2 rhs) { return new double2 (lhs.x / rhs.x, lhs.y / rhs.y); } + + /// Returns the result of a componentwise division operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator / (double2 lhs, double rhs) { return new double2 (lhs.x / rhs, lhs.y / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double2 to use to compute componentwise division. + /// double2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator / (double lhs, double2 rhs) { return new double2 (lhs / rhs.x, lhs / rhs.y); } + + + /// Returns the result of a componentwise modulus operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise modulus. + /// Right hand side double2 to use to compute componentwise modulus. + /// double2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator % (double2 lhs, double2 rhs) { return new double2 (lhs.x % rhs.x, lhs.y % rhs.y); } + + /// Returns the result of a componentwise modulus operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator % (double2 lhs, double rhs) { return new double2 (lhs.x % rhs, lhs.y % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double2 to use to compute componentwise modulus. + /// double2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator % (double lhs, double2 rhs) { return new double2 (lhs % rhs.x, lhs % rhs.y); } + + + /// Returns the result of a componentwise increment operation on a double2 vector. + /// Value to use when computing the componentwise increment. + /// double2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator ++ (double2 val) { return new double2 (++val.x, ++val.y); } + + + /// Returns the result of a componentwise decrement operation on a double2 vector. + /// Value to use when computing the componentwise decrement. + /// double2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator -- (double2 val) { return new double2 (--val.x, --val.y); } + + + /// Returns the result of a componentwise less than operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise less than. + /// Right hand side double2 to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (double2 lhs, double2 rhs) { return new bool2 (lhs.x < rhs.x, lhs.y < rhs.y); } + + /// Returns the result of a componentwise less than operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (double2 lhs, double rhs) { return new bool2 (lhs.x < rhs, lhs.y < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double2 to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (double lhs, double2 rhs) { return new bool2 (lhs < rhs.x, lhs < rhs.y); } + + + /// Returns the result of a componentwise less or equal operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise less or equal. + /// Right hand side double2 to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (double2 lhs, double2 rhs) { return new bool2 (lhs.x <= rhs.x, lhs.y <= rhs.y); } + + /// Returns the result of a componentwise less or equal operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (double2 lhs, double rhs) { return new bool2 (lhs.x <= rhs, lhs.y <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double2 to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (double lhs, double2 rhs) { return new bool2 (lhs <= rhs.x, lhs <= rhs.y); } + + + /// Returns the result of a componentwise greater than operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise greater than. + /// Right hand side double2 to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (double2 lhs, double2 rhs) { return new bool2 (lhs.x > rhs.x, lhs.y > rhs.y); } + + /// Returns the result of a componentwise greater than operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (double2 lhs, double rhs) { return new bool2 (lhs.x > rhs, lhs.y > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double2 to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (double lhs, double2 rhs) { return new bool2 (lhs > rhs.x, lhs > rhs.y); } + + + /// Returns the result of a componentwise greater or equal operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise greater or equal. + /// Right hand side double2 to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (double2 lhs, double2 rhs) { return new bool2 (lhs.x >= rhs.x, lhs.y >= rhs.y); } + + /// Returns the result of a componentwise greater or equal operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (double2 lhs, double rhs) { return new bool2 (lhs.x >= rhs, lhs.y >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double2 to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (double lhs, double2 rhs) { return new bool2 (lhs >= rhs.x, lhs >= rhs.y); } + + + /// Returns the result of a componentwise unary minus operation on a double2 vector. + /// Value to use when computing the componentwise unary minus. + /// double2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator - (double2 val) { return new double2 (-val.x, -val.y); } + + + /// Returns the result of a componentwise unary plus operation on a double2 vector. + /// Value to use when computing the componentwise unary plus. + /// double2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 operator + (double2 val) { return new double2 (+val.x, +val.y); } + + + /// Returns the result of a componentwise equality operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise equality. + /// Right hand side double2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (double2 lhs, double2 rhs) { return new bool2 (lhs.x == rhs.x, lhs.y == rhs.y); } + + /// Returns the result of a componentwise equality operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (double2 lhs, double rhs) { return new bool2 (lhs.x == rhs, lhs.y == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (double lhs, double2 rhs) { return new bool2 (lhs == rhs.x, lhs == rhs.y); } + + + /// Returns the result of a componentwise not equal operation on two double2 vectors. + /// Left hand side double2 to use to compute componentwise not equal. + /// Right hand side double2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (double2 lhs, double2 rhs) { return new bool2 (lhs.x != rhs.x, lhs.y != rhs.y); } + + /// Returns the result of a componentwise not equal operation on a double2 vector and a double value. + /// Left hand side double2 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (double2 lhs, double rhs) { return new bool2 (lhs.x != rhs, lhs.y != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double2 vector. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (double lhs, double2 rhs) { return new bool2 (lhs != rhs.x, lhs != rhs.y); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, y); } + } + + + + /// Returns the double element at a specified index. + unsafe public double this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (double2* array = &this) { return ((double*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (double* array = &x) { array[index] = value; } + } + } + + /// Returns true if the double2 is equal to a given double2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double2 rhs) { return x == rhs.x && y == rhs.y; } + + /// Returns true if the double2 is equal to a given double2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double2 converted && Equals(converted); } + + + /// Returns a hash code for the double2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double2({0}, {1})", x, y); + } + + /// Returns a string representation of the double2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double2({0}, {1})", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public double x; + public double y; + public DebuggerProxy(double2 v) + { + x = v.x; + y = v.y; + } + } + + } + + public static partial class math + { + /// Returns a double2 vector constructed from two double values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// double2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(double x, double y) { return new double2(x, y); } + + /// Returns a double2 vector constructed from a double2 vector. + /// The constructed vector's xy components will be set to this value. + /// double2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(double2 xy) { return new double2(xy); } + + /// Returns a double2 vector constructed from a single double value by assigning it to every component. + /// double to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(double v) { return new double2(v); } + + /// Returns a double2 vector constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(bool v) { return new double2(v); } + + /// Return a double2 vector constructed from a bool2 vector by componentwise conversion. + /// bool2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(bool2 v) { return new double2(v); } + + /// Returns a double2 vector constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(int v) { return new double2(v); } + + /// Return a double2 vector constructed from a int2 vector by componentwise conversion. + /// int2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(int2 v) { return new double2(v); } + + /// Returns a double2 vector constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(uint v) { return new double2(v); } + + /// Return a double2 vector constructed from a uint2 vector by componentwise conversion. + /// uint2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(uint2 v) { return new double2(v); } + + /// Returns a double2 vector constructed from a single half value by converting it to double and assigning it to every component. + /// half to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(half v) { return new double2(v); } + + /// Return a double2 vector constructed from a half2 vector by componentwise conversion. + /// half2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(half2 v) { return new double2(v); } + + /// Returns a double2 vector constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(float v) { return new double2(v); } + + /// Return a double2 vector constructed from a float2 vector by componentwise conversion. + /// float2 to convert to double2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 double2(float2 v) { return new double2(v); } + + /// Returns a uint hash code of a double2 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double2 v) + { + return csum(fold_to_uint(v) * uint2(0x9536A0F5u, 0xAF816615u)) + 0x9AF8D62Du; + } + + /// + /// Returns a uint2 vector hash code of a double2 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(double2 v) + { + return (fold_to_uint(v) * uint2(0xE3600729u, 0x5F17300Du)) + 0x670D6809u; + } + + /// Returns the result of specified shuffling of the components from two double2 vectors into a double value. + /// double2 to use as the left argument of the shuffle operation. + /// double2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double. + /// double result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double shuffle(double2 left, double2 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two double2 vectors into a double2 vector. + /// double2 to use as the left argument of the shuffle operation. + /// double2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double2 x component. + /// The ShuffleComponent to use when setting the resulting double2 y component. + /// double2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 shuffle(double2 left, double2 right, ShuffleComponent x, ShuffleComponent y) + { + return double2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two double2 vectors into a double3 vector. + /// double2 to use as the left argument of the shuffle operation. + /// double2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double3 x component. + /// The ShuffleComponent to use when setting the resulting double3 y component. + /// The ShuffleComponent to use when setting the resulting double3 z component. + /// double3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 shuffle(double2 left, double2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return double3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two double2 vectors into a double4 vector. + /// double2 to use as the left argument of the shuffle operation. + /// double2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double4 x component. + /// The ShuffleComponent to use when setting the resulting double4 y component. + /// The ShuffleComponent to use when setting the resulting double4 z component. + /// The ShuffleComponent to use when setting the resulting double4 w component. + /// double4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 shuffle(double2 left, double2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return double4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double select_shuffle_component(double2 a, double2 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double2x2.gen.cs b/ThirdParty/Unity.Mathematics/double2x2.gen.cs new file mode 100644 index 0000000..57328b3 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double2x2.gen.cs @@ -0,0 +1,658 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x2 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double2x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double2 c0; + /// Column 1 of the matrix. + public double2 c1; + + /// double2x2 identity transform. + public static readonly double2x2 identity = new double2x2(1.0, 0.0, 0.0, 1.0); + + /// double2x2 zero value. + public static readonly double2x2 zero; + + /// Constructs a double2x2 matrix from two double2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(double2 c0, double2 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a double2x2 matrix from 4 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(double m00, double m01, + double m10, double m11) + { + this.c0 = new double2(m00, m10); + this.c1 = new double2(m01, m11); + } + + /// Constructs a double2x2 matrix from a single double value by assigning it to every component. + /// double to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(double v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double2x2 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(bool v) + { + this.c0 = math.select(new double2(0.0), new double2(1.0), v); + this.c1 = math.select(new double2(0.0), new double2(1.0), v); + } + + /// Constructs a double2x2 matrix from a bool2x2 matrix by componentwise conversion. + /// bool2x2 to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(bool2x2 v) + { + this.c0 = math.select(new double2(0.0), new double2(1.0), v.c0); + this.c1 = math.select(new double2(0.0), new double2(1.0), v.c1); + } + + /// Constructs a double2x2 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double2x2 matrix from a int2x2 matrix by componentwise conversion. + /// int2x2 to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(int2x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a double2x2 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double2x2 matrix from a uint2x2 matrix by componentwise conversion. + /// uint2x2 to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(uint2x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a double2x2 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(float v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double2x2 matrix from a float2x2 matrix by componentwise conversion. + /// float2x2 to convert to double2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x2(float2x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + + /// Implicitly converts a single double value to a double2x2 matrix by assigning it to every component. + /// double to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x2(double v) { return new double2x2(v); } + + /// Explicitly converts a single bool value to a double2x2 matrix by converting it to double and assigning it to every component. + /// bool to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double2x2(bool v) { return new double2x2(v); } + + /// Explicitly converts a bool2x2 matrix to a double2x2 matrix by componentwise conversion. + /// bool2x2 to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double2x2(bool2x2 v) { return new double2x2(v); } + + /// Implicitly converts a single int value to a double2x2 matrix by converting it to double and assigning it to every component. + /// int to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x2(int v) { return new double2x2(v); } + + /// Implicitly converts a int2x2 matrix to a double2x2 matrix by componentwise conversion. + /// int2x2 to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x2(int2x2 v) { return new double2x2(v); } + + /// Implicitly converts a single uint value to a double2x2 matrix by converting it to double and assigning it to every component. + /// uint to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x2(uint v) { return new double2x2(v); } + + /// Implicitly converts a uint2x2 matrix to a double2x2 matrix by componentwise conversion. + /// uint2x2 to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x2(uint2x2 v) { return new double2x2(v); } + + /// Implicitly converts a single float value to a double2x2 matrix by converting it to double and assigning it to every component. + /// float to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x2(float v) { return new double2x2(v); } + + /// Implicitly converts a float2x2 matrix to a double2x2 matrix by componentwise conversion. + /// float2x2 to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x2(float2x2 v) { return new double2x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise multiplication. + /// Right hand side double2x2 to use to compute componentwise multiplication. + /// double2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator * (double2x2 lhs, double2x2 rhs) { return new double2x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator * (double2x2 lhs, double rhs) { return new double2x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double2x2 to use to compute componentwise multiplication. + /// double2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator * (double lhs, double2x2 rhs) { return new double2x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise addition. + /// Right hand side double2x2 to use to compute componentwise addition. + /// double2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator + (double2x2 lhs, double2x2 rhs) { return new double2x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator + (double2x2 lhs, double rhs) { return new double2x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double2x2 to use to compute componentwise addition. + /// double2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator + (double lhs, double2x2 rhs) { return new double2x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise subtraction. + /// Right hand side double2x2 to use to compute componentwise subtraction. + /// double2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator - (double2x2 lhs, double2x2 rhs) { return new double2x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator - (double2x2 lhs, double rhs) { return new double2x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double2x2 to use to compute componentwise subtraction. + /// double2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator - (double lhs, double2x2 rhs) { return new double2x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise division. + /// Right hand side double2x2 to use to compute componentwise division. + /// double2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator / (double2x2 lhs, double2x2 rhs) { return new double2x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator / (double2x2 lhs, double rhs) { return new double2x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double2x2 to use to compute componentwise division. + /// double2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator / (double lhs, double2x2 rhs) { return new double2x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise modulus. + /// Right hand side double2x2 to use to compute componentwise modulus. + /// double2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator % (double2x2 lhs, double2x2 rhs) { return new double2x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator % (double2x2 lhs, double rhs) { return new double2x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double2x2 to use to compute componentwise modulus. + /// double2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator % (double lhs, double2x2 rhs) { return new double2x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a double2x2 matrix. + /// Value to use when computing the componentwise increment. + /// double2x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator ++ (double2x2 val) { return new double2x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a double2x2 matrix. + /// Value to use when computing the componentwise decrement. + /// double2x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator -- (double2x2 val) { return new double2x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise less than. + /// Right hand side double2x2 to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (double2x2 lhs, double2x2 rhs) { return new bool2x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (double2x2 lhs, double rhs) { return new bool2x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double2x2 to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (double lhs, double2x2 rhs) { return new bool2x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise less or equal. + /// Right hand side double2x2 to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (double2x2 lhs, double2x2 rhs) { return new bool2x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (double2x2 lhs, double rhs) { return new bool2x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double2x2 to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (double lhs, double2x2 rhs) { return new bool2x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise greater than. + /// Right hand side double2x2 to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (double2x2 lhs, double2x2 rhs) { return new bool2x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (double2x2 lhs, double rhs) { return new bool2x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double2x2 to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (double lhs, double2x2 rhs) { return new bool2x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise greater or equal. + /// Right hand side double2x2 to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (double2x2 lhs, double2x2 rhs) { return new bool2x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (double2x2 lhs, double rhs) { return new bool2x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double2x2 to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (double lhs, double2x2 rhs) { return new bool2x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a double2x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// double2x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator - (double2x2 val) { return new double2x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a double2x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// double2x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 operator + (double2x2 val) { return new double2x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise equality operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise equality. + /// Right hand side double2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (double2x2 lhs, double2x2 rhs) { return new bool2x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (double2x2 lhs, double rhs) { return new bool2x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (double lhs, double2x2 rhs) { return new bool2x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two double2x2 matrices. + /// Left hand side double2x2 to use to compute componentwise not equal. + /// Right hand side double2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (double2x2 lhs, double2x2 rhs) { return new bool2x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a double2x2 matrix and a double value. + /// Left hand side double2x2 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (double2x2 lhs, double rhs) { return new bool2x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double2x2 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (double lhs, double2x2 rhs) { return new bool2x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + + /// Returns the double2 element at a specified index. + unsafe public ref double2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (double2x2* array = &this) { return ref ((double2*)array)[index]; } + } + } + + /// Returns true if the double2x2 is equal to a given double2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double2x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the double2x2 is equal to a given double2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double2x2 converted && Equals(converted); } + + + /// Returns a hash code for the double2x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double2x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double2x2({0}, {1}, {2}, {3})", c0.x, c1.x, c0.y, c1.y); + } + + /// Returns a string representation of the double2x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double2x2({0}, {1}, {2}, {3})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double2x2 matrix constructed from two double2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// double2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(double2 c0, double2 c1) { return new double2x2(c0, c1); } + + /// Returns a double2x2 matrix constructed from from 4 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// double2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(double m00, double m01, + double m10, double m11) + { + return new double2x2(m00, m01, + m10, m11); + } + + /// Returns a double2x2 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(double v) { return new double2x2(v); } + + /// Returns a double2x2 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(bool v) { return new double2x2(v); } + + /// Return a double2x2 matrix constructed from a bool2x2 matrix by componentwise conversion. + /// bool2x2 to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(bool2x2 v) { return new double2x2(v); } + + /// Returns a double2x2 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(int v) { return new double2x2(v); } + + /// Return a double2x2 matrix constructed from a int2x2 matrix by componentwise conversion. + /// int2x2 to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(int2x2 v) { return new double2x2(v); } + + /// Returns a double2x2 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(uint v) { return new double2x2(v); } + + /// Return a double2x2 matrix constructed from a uint2x2 matrix by componentwise conversion. + /// uint2x2 to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(uint2x2 v) { return new double2x2(v); } + + /// Returns a double2x2 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(float v) { return new double2x2(v); } + + /// Return a double2x2 matrix constructed from a float2x2 matrix by componentwise conversion. + /// float2x2 to convert to double2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 double2x2(float2x2 v) { return new double2x2(v); } + + /// Return the double2x2 transpose of a double2x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 transpose(double2x2 v) + { + return double2x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y); + } + + /// Returns the double2x2 full inverse of a double2x2 matrix. + /// Matrix to invert. + /// The inverted matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 inverse(double2x2 m) + { + double a = m.c0.x; + double b = m.c1.x; + double c = m.c0.y; + double d = m.c1.y; + + double det = a * d - b * c; + + return double2x2(d, -b, -c, a) * (1.0 / det); + } + + /// Returns the determinant of a double2x2 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double determinant(double2x2 m) + { + double a = m.c0.x; + double b = m.c1.x; + double c = m.c0.y; + double d = m.c1.y; + + return a * d - b * c; + } + + /// Returns a uint hash code of a double2x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double2x2 v) + { + return csum(fold_to_uint(v.c0) * uint2(0xFD80290Bu, 0x8B65ADB7u) + + fold_to_uint(v.c1) * uint2(0xDFF4F563u, 0x7069770Du)) + 0xD1224537u; + } + + /// + /// Returns a uint2 vector hash code of a double2x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(double2x2 v) + { + return (fold_to_uint(v.c0) * uint2(0xE99ED6F3u, 0x48125549u) + + fold_to_uint(v.c1) * uint2(0xEEE2123Bu, 0xE3AD9FE5u)) + 0xCE1CF8BFu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double2x3.gen.cs b/ThirdParty/Unity.Mathematics/double2x3.gen.cs new file mode 100644 index 0000000..f6a3490 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double2x3.gen.cs @@ -0,0 +1,647 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x3 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double2x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double2 c0; + /// Column 1 of the matrix. + public double2 c1; + /// Column 2 of the matrix. + public double2 c2; + + /// double2x3 zero value. + public static readonly double2x3 zero; + + /// Constructs a double2x3 matrix from three double2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(double2 c0, double2 c1, double2 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a double2x3 matrix from 6 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(double m00, double m01, double m02, + double m10, double m11, double m12) + { + this.c0 = new double2(m00, m10); + this.c1 = new double2(m01, m11); + this.c2 = new double2(m02, m12); + } + + /// Constructs a double2x3 matrix from a single double value by assigning it to every component. + /// double to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(double v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double2x3 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(bool v) + { + this.c0 = math.select(new double2(0.0), new double2(1.0), v); + this.c1 = math.select(new double2(0.0), new double2(1.0), v); + this.c2 = math.select(new double2(0.0), new double2(1.0), v); + } + + /// Constructs a double2x3 matrix from a bool2x3 matrix by componentwise conversion. + /// bool2x3 to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(bool2x3 v) + { + this.c0 = math.select(new double2(0.0), new double2(1.0), v.c0); + this.c1 = math.select(new double2(0.0), new double2(1.0), v.c1); + this.c2 = math.select(new double2(0.0), new double2(1.0), v.c2); + } + + /// Constructs a double2x3 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double2x3 matrix from a int2x3 matrix by componentwise conversion. + /// int2x3 to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(int2x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a double2x3 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double2x3 matrix from a uint2x3 matrix by componentwise conversion. + /// uint2x3 to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(uint2x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a double2x3 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double2x3 matrix from a float2x3 matrix by componentwise conversion. + /// float2x3 to convert to double2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x3(float2x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + + /// Implicitly converts a single double value to a double2x3 matrix by assigning it to every component. + /// double to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x3(double v) { return new double2x3(v); } + + /// Explicitly converts a single bool value to a double2x3 matrix by converting it to double and assigning it to every component. + /// bool to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double2x3(bool v) { return new double2x3(v); } + + /// Explicitly converts a bool2x3 matrix to a double2x3 matrix by componentwise conversion. + /// bool2x3 to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double2x3(bool2x3 v) { return new double2x3(v); } + + /// Implicitly converts a single int value to a double2x3 matrix by converting it to double and assigning it to every component. + /// int to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x3(int v) { return new double2x3(v); } + + /// Implicitly converts a int2x3 matrix to a double2x3 matrix by componentwise conversion. + /// int2x3 to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x3(int2x3 v) { return new double2x3(v); } + + /// Implicitly converts a single uint value to a double2x3 matrix by converting it to double and assigning it to every component. + /// uint to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x3(uint v) { return new double2x3(v); } + + /// Implicitly converts a uint2x3 matrix to a double2x3 matrix by componentwise conversion. + /// uint2x3 to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x3(uint2x3 v) { return new double2x3(v); } + + /// Implicitly converts a single float value to a double2x3 matrix by converting it to double and assigning it to every component. + /// float to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x3(float v) { return new double2x3(v); } + + /// Implicitly converts a float2x3 matrix to a double2x3 matrix by componentwise conversion. + /// float2x3 to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x3(float2x3 v) { return new double2x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise multiplication. + /// Right hand side double2x3 to use to compute componentwise multiplication. + /// double2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator * (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator * (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double2x3 to use to compute componentwise multiplication. + /// double2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator * (double lhs, double2x3 rhs) { return new double2x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise addition. + /// Right hand side double2x3 to use to compute componentwise addition. + /// double2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator + (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator + (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double2x3 to use to compute componentwise addition. + /// double2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator + (double lhs, double2x3 rhs) { return new double2x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise subtraction. + /// Right hand side double2x3 to use to compute componentwise subtraction. + /// double2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator - (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator - (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double2x3 to use to compute componentwise subtraction. + /// double2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator - (double lhs, double2x3 rhs) { return new double2x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise division. + /// Right hand side double2x3 to use to compute componentwise division. + /// double2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator / (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator / (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double2x3 to use to compute componentwise division. + /// double2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator / (double lhs, double2x3 rhs) { return new double2x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise modulus. + /// Right hand side double2x3 to use to compute componentwise modulus. + /// double2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator % (double2x3 lhs, double2x3 rhs) { return new double2x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator % (double2x3 lhs, double rhs) { return new double2x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double2x3 to use to compute componentwise modulus. + /// double2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator % (double lhs, double2x3 rhs) { return new double2x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a double2x3 matrix. + /// Value to use when computing the componentwise increment. + /// double2x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator ++ (double2x3 val) { return new double2x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a double2x3 matrix. + /// Value to use when computing the componentwise decrement. + /// double2x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator -- (double2x3 val) { return new double2x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise less than. + /// Right hand side double2x3 to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double2x3 to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (double lhs, double2x3 rhs) { return new bool2x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise less or equal. + /// Right hand side double2x3 to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double2x3 to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (double lhs, double2x3 rhs) { return new bool2x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise greater than. + /// Right hand side double2x3 to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double2x3 to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (double lhs, double2x3 rhs) { return new bool2x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise greater or equal. + /// Right hand side double2x3 to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double2x3 to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (double lhs, double2x3 rhs) { return new bool2x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a double2x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// double2x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator - (double2x3 val) { return new double2x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a double2x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// double2x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 operator + (double2x3 val) { return new double2x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise equality operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise equality. + /// Right hand side double2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (double lhs, double2x3 rhs) { return new bool2x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two double2x3 matrices. + /// Left hand side double2x3 to use to compute componentwise not equal. + /// Right hand side double2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (double2x3 lhs, double2x3 rhs) { return new bool2x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a double2x3 matrix and a double value. + /// Left hand side double2x3 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (double2x3 lhs, double rhs) { return new bool2x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double2x3 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (double lhs, double2x3 rhs) { return new bool2x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + + /// Returns the double2 element at a specified index. + unsafe public ref double2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (double2x3* array = &this) { return ref ((double2*)array)[index]; } + } + } + + /// Returns true if the double2x3 is equal to a given double2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double2x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the double2x3 is equal to a given double2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double2x3 converted && Equals(converted); } + + + /// Returns a hash code for the double2x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double2x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y); + } + + /// Returns a string representation of the double2x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double2x3 matrix constructed from three double2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// double2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(double2 c0, double2 c1, double2 c2) { return new double2x3(c0, c1, c2); } + + /// Returns a double2x3 matrix constructed from from 6 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// double2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(double m00, double m01, double m02, + double m10, double m11, double m12) + { + return new double2x3(m00, m01, m02, + m10, m11, m12); + } + + /// Returns a double2x3 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(double v) { return new double2x3(v); } + + /// Returns a double2x3 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(bool v) { return new double2x3(v); } + + /// Return a double2x3 matrix constructed from a bool2x3 matrix by componentwise conversion. + /// bool2x3 to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(bool2x3 v) { return new double2x3(v); } + + /// Returns a double2x3 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(int v) { return new double2x3(v); } + + /// Return a double2x3 matrix constructed from a int2x3 matrix by componentwise conversion. + /// int2x3 to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(int2x3 v) { return new double2x3(v); } + + /// Returns a double2x3 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(uint v) { return new double2x3(v); } + + /// Return a double2x3 matrix constructed from a uint2x3 matrix by componentwise conversion. + /// uint2x3 to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(uint2x3 v) { return new double2x3(v); } + + /// Returns a double2x3 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(float v) { return new double2x3(v); } + + /// Return a double2x3 matrix constructed from a float2x3 matrix by componentwise conversion. + /// float2x3 to convert to double2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 double2x3(float2x3 v) { return new double2x3(v); } + + /// Return the double3x2 transpose of a double2x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 transpose(double2x3 v) + { + return double3x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y); + } + + /// Returns a uint hash code of a double2x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double2x3 v) + { + return csum(fold_to_uint(v.c0) * uint2(0xF25BE857u, 0x9BC17CE7u) + + fold_to_uint(v.c1) * uint2(0xC8B86851u, 0x64095221u) + + fold_to_uint(v.c2) * uint2(0xADF428FFu, 0xA3977109u)) + 0x745ED837u; + } + + /// + /// Returns a uint2 vector hash code of a double2x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(double2x3 v) + { + return (fold_to_uint(v.c0) * uint2(0x9CDC88F5u, 0xFA62D721u) + + fold_to_uint(v.c1) * uint2(0x7E4DB1CFu, 0x68EEE0F5u) + + fold_to_uint(v.c2) * uint2(0xBC3B0A59u, 0x816EFB5Du)) + 0xA24E82B7u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double2x4.gen.cs b/ThirdParty/Unity.Mathematics/double2x4.gen.cs new file mode 100644 index 0000000..00e91ec --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double2x4.gen.cs @@ -0,0 +1,669 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x4 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double2x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double2 c0; + /// Column 1 of the matrix. + public double2 c1; + /// Column 2 of the matrix. + public double2 c2; + /// Column 3 of the matrix. + public double2 c3; + + /// double2x4 zero value. + public static readonly double2x4 zero; + + /// Constructs a double2x4 matrix from four double2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(double2 c0, double2 c1, double2 c2, double2 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a double2x4 matrix from 8 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(double m00, double m01, double m02, double m03, + double m10, double m11, double m12, double m13) + { + this.c0 = new double2(m00, m10); + this.c1 = new double2(m01, m11); + this.c2 = new double2(m02, m12); + this.c3 = new double2(m03, m13); + } + + /// Constructs a double2x4 matrix from a single double value by assigning it to every component. + /// double to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(double v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double2x4 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(bool v) + { + this.c0 = math.select(new double2(0.0), new double2(1.0), v); + this.c1 = math.select(new double2(0.0), new double2(1.0), v); + this.c2 = math.select(new double2(0.0), new double2(1.0), v); + this.c3 = math.select(new double2(0.0), new double2(1.0), v); + } + + /// Constructs a double2x4 matrix from a bool2x4 matrix by componentwise conversion. + /// bool2x4 to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(bool2x4 v) + { + this.c0 = math.select(new double2(0.0), new double2(1.0), v.c0); + this.c1 = math.select(new double2(0.0), new double2(1.0), v.c1); + this.c2 = math.select(new double2(0.0), new double2(1.0), v.c2); + this.c3 = math.select(new double2(0.0), new double2(1.0), v.c3); + } + + /// Constructs a double2x4 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double2x4 matrix from a int2x4 matrix by componentwise conversion. + /// int2x4 to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(int2x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a double2x4 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double2x4 matrix from a uint2x4 matrix by componentwise conversion. + /// uint2x4 to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(uint2x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a double2x4 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double2x4 matrix from a float2x4 matrix by componentwise conversion. + /// float2x4 to convert to double2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2x4(float2x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + + /// Implicitly converts a single double value to a double2x4 matrix by assigning it to every component. + /// double to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x4(double v) { return new double2x4(v); } + + /// Explicitly converts a single bool value to a double2x4 matrix by converting it to double and assigning it to every component. + /// bool to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double2x4(bool v) { return new double2x4(v); } + + /// Explicitly converts a bool2x4 matrix to a double2x4 matrix by componentwise conversion. + /// bool2x4 to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double2x4(bool2x4 v) { return new double2x4(v); } + + /// Implicitly converts a single int value to a double2x4 matrix by converting it to double and assigning it to every component. + /// int to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x4(int v) { return new double2x4(v); } + + /// Implicitly converts a int2x4 matrix to a double2x4 matrix by componentwise conversion. + /// int2x4 to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x4(int2x4 v) { return new double2x4(v); } + + /// Implicitly converts a single uint value to a double2x4 matrix by converting it to double and assigning it to every component. + /// uint to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x4(uint v) { return new double2x4(v); } + + /// Implicitly converts a uint2x4 matrix to a double2x4 matrix by componentwise conversion. + /// uint2x4 to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x4(uint2x4 v) { return new double2x4(v); } + + /// Implicitly converts a single float value to a double2x4 matrix by converting it to double and assigning it to every component. + /// float to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x4(float v) { return new double2x4(v); } + + /// Implicitly converts a float2x4 matrix to a double2x4 matrix by componentwise conversion. + /// float2x4 to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double2x4(float2x4 v) { return new double2x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise multiplication. + /// Right hand side double2x4 to use to compute componentwise multiplication. + /// double2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator * (double2x4 lhs, double2x4 rhs) { return new double2x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator * (double2x4 lhs, double rhs) { return new double2x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double2x4 to use to compute componentwise multiplication. + /// double2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator * (double lhs, double2x4 rhs) { return new double2x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise addition. + /// Right hand side double2x4 to use to compute componentwise addition. + /// double2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator + (double2x4 lhs, double2x4 rhs) { return new double2x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator + (double2x4 lhs, double rhs) { return new double2x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double2x4 to use to compute componentwise addition. + /// double2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator + (double lhs, double2x4 rhs) { return new double2x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise subtraction. + /// Right hand side double2x4 to use to compute componentwise subtraction. + /// double2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator - (double2x4 lhs, double2x4 rhs) { return new double2x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator - (double2x4 lhs, double rhs) { return new double2x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double2x4 to use to compute componentwise subtraction. + /// double2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator - (double lhs, double2x4 rhs) { return new double2x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise division. + /// Right hand side double2x4 to use to compute componentwise division. + /// double2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator / (double2x4 lhs, double2x4 rhs) { return new double2x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator / (double2x4 lhs, double rhs) { return new double2x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double2x4 to use to compute componentwise division. + /// double2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator / (double lhs, double2x4 rhs) { return new double2x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise modulus. + /// Right hand side double2x4 to use to compute componentwise modulus. + /// double2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator % (double2x4 lhs, double2x4 rhs) { return new double2x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator % (double2x4 lhs, double rhs) { return new double2x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double2x4 to use to compute componentwise modulus. + /// double2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator % (double lhs, double2x4 rhs) { return new double2x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a double2x4 matrix. + /// Value to use when computing the componentwise increment. + /// double2x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator ++ (double2x4 val) { return new double2x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a double2x4 matrix. + /// Value to use when computing the componentwise decrement. + /// double2x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator -- (double2x4 val) { return new double2x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise less than. + /// Right hand side double2x4 to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (double2x4 lhs, double2x4 rhs) { return new bool2x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (double2x4 lhs, double rhs) { return new bool2x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double2x4 to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (double lhs, double2x4 rhs) { return new bool2x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise less or equal. + /// Right hand side double2x4 to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (double2x4 lhs, double2x4 rhs) { return new bool2x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (double2x4 lhs, double rhs) { return new bool2x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double2x4 to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (double lhs, double2x4 rhs) { return new bool2x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise greater than. + /// Right hand side double2x4 to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (double2x4 lhs, double2x4 rhs) { return new bool2x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (double2x4 lhs, double rhs) { return new bool2x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double2x4 to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (double lhs, double2x4 rhs) { return new bool2x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise greater or equal. + /// Right hand side double2x4 to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (double2x4 lhs, double2x4 rhs) { return new bool2x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (double2x4 lhs, double rhs) { return new bool2x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double2x4 to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (double lhs, double2x4 rhs) { return new bool2x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a double2x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// double2x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator - (double2x4 val) { return new double2x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a double2x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// double2x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 operator + (double2x4 val) { return new double2x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise equality operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise equality. + /// Right hand side double2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (double2x4 lhs, double2x4 rhs) { return new bool2x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (double2x4 lhs, double rhs) { return new bool2x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (double lhs, double2x4 rhs) { return new bool2x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two double2x4 matrices. + /// Left hand side double2x4 to use to compute componentwise not equal. + /// Right hand side double2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (double2x4 lhs, double2x4 rhs) { return new bool2x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a double2x4 matrix and a double value. + /// Left hand side double2x4 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (double2x4 lhs, double rhs) { return new bool2x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double2x4 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (double lhs, double2x4 rhs) { return new bool2x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + + /// Returns the double2 element at a specified index. + unsafe public ref double2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (double2x4* array = &this) { return ref ((double2*)array)[index]; } + } + } + + /// Returns true if the double2x4 is equal to a given double2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double2x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the double2x4 is equal to a given double2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double2x4 converted && Equals(converted); } + + + /// Returns a hash code for the double2x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double2x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double2x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y); + } + + /// Returns a string representation of the double2x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double2x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double2x4 matrix constructed from four double2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// double2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(double2 c0, double2 c1, double2 c2, double2 c3) { return new double2x4(c0, c1, c2, c3); } + + /// Returns a double2x4 matrix constructed from from 8 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// double2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(double m00, double m01, double m02, double m03, + double m10, double m11, double m12, double m13) + { + return new double2x4(m00, m01, m02, m03, + m10, m11, m12, m13); + } + + /// Returns a double2x4 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(double v) { return new double2x4(v); } + + /// Returns a double2x4 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(bool v) { return new double2x4(v); } + + /// Return a double2x4 matrix constructed from a bool2x4 matrix by componentwise conversion. + /// bool2x4 to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(bool2x4 v) { return new double2x4(v); } + + /// Returns a double2x4 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(int v) { return new double2x4(v); } + + /// Return a double2x4 matrix constructed from a int2x4 matrix by componentwise conversion. + /// int2x4 to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(int2x4 v) { return new double2x4(v); } + + /// Returns a double2x4 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(uint v) { return new double2x4(v); } + + /// Return a double2x4 matrix constructed from a uint2x4 matrix by componentwise conversion. + /// uint2x4 to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(uint2x4 v) { return new double2x4(v); } + + /// Returns a double2x4 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(float v) { return new double2x4(v); } + + /// Return a double2x4 matrix constructed from a float2x4 matrix by componentwise conversion. + /// float2x4 to convert to double2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 double2x4(float2x4 v) { return new double2x4(v); } + + /// Return the double4x2 transpose of a double2x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 transpose(double2x4 v) + { + return double4x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y, + v.c3.x, v.c3.y); + } + + /// Returns a uint hash code of a double2x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double2x4 v) + { + return csum(fold_to_uint(v.c0) * uint2(0x91475DF7u, 0x55E84827u) + + fold_to_uint(v.c1) * uint2(0x90A285BBu, 0x5D19E1D5u) + + fold_to_uint(v.c2) * uint2(0xFAAF07DDu, 0x625C45BDu) + + fold_to_uint(v.c3) * uint2(0xC9F27FCBu, 0x6D2523B1u)) + 0x6E2BF6A9u; + } + + /// + /// Returns a uint2 vector hash code of a double2x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(double2x4 v) + { + return (fold_to_uint(v.c0) * uint2(0xCC74B3B7u, 0x83B58237u) + + fold_to_uint(v.c1) * uint2(0x833E3E29u, 0xA9D919BFu) + + fold_to_uint(v.c2) * uint2(0xC3EC1D97u, 0xB8B208C7u) + + fold_to_uint(v.c3) * uint2(0x5D3ED947u, 0x4473BBB1u)) + 0xCBA11D5Fu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double3.gen.cs b/ThirdParty/Unity.Mathematics/double3.gen.cs new file mode 100644 index 0000000..3468bbf --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double3.gen.cs @@ -0,0 +1,1878 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3 component vector of doubles. + [DebuggerTypeProxy(typeof(double3.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double3 : System.IEquatable, IFormattable + { + /// x component of the vector. + public double x; + /// y component of the vector. + public double y; + /// z component of the vector. + public double z; + + /// double3 zero value. + public static readonly double3 zero; + + /// Constructs a double3 vector from three double values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(double x, double y, double z) + { + this.x = x; + this.y = y; + this.z = z; + } + + /// Constructs a double3 vector from a double value and a double2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(double x, double2 yz) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + } + + /// Constructs a double3 vector from a double2 vector and a double value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(double2 xy, double z) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + } + + /// Constructs a double3 vector from a double3 vector. + /// The constructed vector's xyz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(double3 xyz) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + } + + /// Constructs a double3 vector from a single double value by assigning it to every component. + /// double to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(double v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a double3 vector from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(bool v) + { + this.x = v ? 1.0 : 0.0; + this.y = v ? 1.0 : 0.0; + this.z = v ? 1.0 : 0.0; + } + + /// Constructs a double3 vector from a bool3 vector by componentwise conversion. + /// bool3 to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(bool3 v) + { + this.x = v.x ? 1.0 : 0.0; + this.y = v.y ? 1.0 : 0.0; + this.z = v.z ? 1.0 : 0.0; + } + + /// Constructs a double3 vector from a single int value by converting it to double and assigning it to every component. + /// int to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(int v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a double3 vector from a int3 vector by componentwise conversion. + /// int3 to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(int3 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + /// Constructs a double3 vector from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(uint v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a double3 vector from a uint3 vector by componentwise conversion. + /// uint3 to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(uint3 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + /// Constructs a double3 vector from a single half value by converting it to double and assigning it to every component. + /// half to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(half v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a double3 vector from a half3 vector by componentwise conversion. + /// half3 to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(half3 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + /// Constructs a double3 vector from a single float value by converting it to double and assigning it to every component. + /// float to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(float v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a double3 vector from a float3 vector by componentwise conversion. + /// float3 to convert to double3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3(float3 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + + /// Implicitly converts a single double value to a double3 vector by assigning it to every component. + /// double to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(double v) { return new double3(v); } + + /// Explicitly converts a single bool value to a double3 vector by converting it to double and assigning it to every component. + /// bool to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double3(bool v) { return new double3(v); } + + /// Explicitly converts a bool3 vector to a double3 vector by componentwise conversion. + /// bool3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double3(bool3 v) { return new double3(v); } + + /// Implicitly converts a single int value to a double3 vector by converting it to double and assigning it to every component. + /// int to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(int v) { return new double3(v); } + + /// Implicitly converts a int3 vector to a double3 vector by componentwise conversion. + /// int3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(int3 v) { return new double3(v); } + + /// Implicitly converts a single uint value to a double3 vector by converting it to double and assigning it to every component. + /// uint to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(uint v) { return new double3(v); } + + /// Implicitly converts a uint3 vector to a double3 vector by componentwise conversion. + /// uint3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(uint3 v) { return new double3(v); } + + /// Implicitly converts a single half value to a double3 vector by converting it to double and assigning it to every component. + /// half to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(half v) { return new double3(v); } + + /// Implicitly converts a half3 vector to a double3 vector by componentwise conversion. + /// half3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(half3 v) { return new double3(v); } + + /// Implicitly converts a single float value to a double3 vector by converting it to double and assigning it to every component. + /// float to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(float v) { return new double3(v); } + + /// Implicitly converts a float3 vector to a double3 vector by componentwise conversion. + /// float3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3(float3 v) { return new double3(v); } + + + /// Returns the result of a componentwise multiplication operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise multiplication. + /// Right hand side double3 to use to compute componentwise multiplication. + /// double3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator * (double3 lhs, double3 rhs) { return new double3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } + + /// Returns the result of a componentwise multiplication operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator * (double3 lhs, double rhs) { return new double3 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double3 to use to compute componentwise multiplication. + /// double3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator * (double lhs, double3 rhs) { return new double3 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); } + + + /// Returns the result of a componentwise addition operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise addition. + /// Right hand side double3 to use to compute componentwise addition. + /// double3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator + (double3 lhs, double3 rhs) { return new double3 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); } + + /// Returns the result of a componentwise addition operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator + (double3 lhs, double rhs) { return new double3 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double3 to use to compute componentwise addition. + /// double3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator + (double lhs, double3 rhs) { return new double3 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z); } + + + /// Returns the result of a componentwise subtraction operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise subtraction. + /// Right hand side double3 to use to compute componentwise subtraction. + /// double3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator - (double3 lhs, double3 rhs) { return new double3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); } + + /// Returns the result of a componentwise subtraction operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator - (double3 lhs, double rhs) { return new double3 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double3 to use to compute componentwise subtraction. + /// double3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator - (double lhs, double3 rhs) { return new double3 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z); } + + + /// Returns the result of a componentwise division operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise division. + /// Right hand side double3 to use to compute componentwise division. + /// double3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator / (double3 lhs, double3 rhs) { return new double3 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z); } + + /// Returns the result of a componentwise division operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator / (double3 lhs, double rhs) { return new double3 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double3 to use to compute componentwise division. + /// double3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator / (double lhs, double3 rhs) { return new double3 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z); } + + + /// Returns the result of a componentwise modulus operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise modulus. + /// Right hand side double3 to use to compute componentwise modulus. + /// double3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator % (double3 lhs, double3 rhs) { return new double3 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z); } + + /// Returns the result of a componentwise modulus operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator % (double3 lhs, double rhs) { return new double3 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double3 to use to compute componentwise modulus. + /// double3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator % (double lhs, double3 rhs) { return new double3 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z); } + + + /// Returns the result of a componentwise increment operation on a double3 vector. + /// Value to use when computing the componentwise increment. + /// double3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator ++ (double3 val) { return new double3 (++val.x, ++val.y, ++val.z); } + + + /// Returns the result of a componentwise decrement operation on a double3 vector. + /// Value to use when computing the componentwise decrement. + /// double3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator -- (double3 val) { return new double3 (--val.x, --val.y, --val.z); } + + + /// Returns the result of a componentwise less than operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise less than. + /// Right hand side double3 to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (double3 lhs, double3 rhs) { return new bool3 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z); } + + /// Returns the result of a componentwise less than operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (double3 lhs, double rhs) { return new bool3 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double3 to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (double lhs, double3 rhs) { return new bool3 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z); } + + + /// Returns the result of a componentwise less or equal operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise less or equal. + /// Right hand side double3 to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (double3 lhs, double3 rhs) { return new bool3 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z); } + + /// Returns the result of a componentwise less or equal operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (double3 lhs, double rhs) { return new bool3 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double3 to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (double lhs, double3 rhs) { return new bool3 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z); } + + + /// Returns the result of a componentwise greater than operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise greater than. + /// Right hand side double3 to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (double3 lhs, double3 rhs) { return new bool3 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z); } + + /// Returns the result of a componentwise greater than operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (double3 lhs, double rhs) { return new bool3 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double3 to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (double lhs, double3 rhs) { return new bool3 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z); } + + + /// Returns the result of a componentwise greater or equal operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise greater or equal. + /// Right hand side double3 to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (double3 lhs, double3 rhs) { return new bool3 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z); } + + /// Returns the result of a componentwise greater or equal operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (double3 lhs, double rhs) { return new bool3 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double3 to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (double lhs, double3 rhs) { return new bool3 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z); } + + + /// Returns the result of a componentwise unary minus operation on a double3 vector. + /// Value to use when computing the componentwise unary minus. + /// double3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator - (double3 val) { return new double3 (-val.x, -val.y, -val.z); } + + + /// Returns the result of a componentwise unary plus operation on a double3 vector. + /// Value to use when computing the componentwise unary plus. + /// double3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 operator + (double3 val) { return new double3 (+val.x, +val.y, +val.z); } + + + /// Returns the result of a componentwise equality operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise equality. + /// Right hand side double3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (double3 lhs, double3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); } + + /// Returns the result of a componentwise equality operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (double3 lhs, double rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (double lhs, double3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); } + + + /// Returns the result of a componentwise not equal operation on two double3 vectors. + /// Left hand side double3 to use to compute componentwise not equal. + /// Right hand side double3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (double3 lhs, double3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); } + + /// Returns the result of a componentwise not equal operation on a double3 vector and a double value. + /// Left hand side double3 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (double3 lhs, double rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double3 vector. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (double lhs, double3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(z, z); } + } + + + + /// Returns the double element at a specified index. + unsafe public double this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (double3* array = &this) { return ((double*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (double* array = &x) { array[index] = value; } + } + } + + /// Returns true if the double3 is equal to a given double3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } + + /// Returns true if the double3 is equal to a given double3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double3 converted && Equals(converted); } + + + /// Returns a hash code for the double3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double3({0}, {1}, {2})", x, y, z); + } + + /// Returns a string representation of the double3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double3({0}, {1}, {2})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public double x; + public double y; + public double z; + public DebuggerProxy(double3 v) + { + x = v.x; + y = v.y; + z = v.z; + } + } + + } + + public static partial class math + { + /// Returns a double3 vector constructed from three double values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// double3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(double x, double y, double z) { return new double3(x, y, z); } + + /// Returns a double3 vector constructed from a double value and a double2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// double3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(double x, double2 yz) { return new double3(x, yz); } + + /// Returns a double3 vector constructed from a double2 vector and a double value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// double3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(double2 xy, double z) { return new double3(xy, z); } + + /// Returns a double3 vector constructed from a double3 vector. + /// The constructed vector's xyz components will be set to this value. + /// double3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(double3 xyz) { return new double3(xyz); } + + /// Returns a double3 vector constructed from a single double value by assigning it to every component. + /// double to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(double v) { return new double3(v); } + + /// Returns a double3 vector constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(bool v) { return new double3(v); } + + /// Return a double3 vector constructed from a bool3 vector by componentwise conversion. + /// bool3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(bool3 v) { return new double3(v); } + + /// Returns a double3 vector constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(int v) { return new double3(v); } + + /// Return a double3 vector constructed from a int3 vector by componentwise conversion. + /// int3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(int3 v) { return new double3(v); } + + /// Returns a double3 vector constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(uint v) { return new double3(v); } + + /// Return a double3 vector constructed from a uint3 vector by componentwise conversion. + /// uint3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(uint3 v) { return new double3(v); } + + /// Returns a double3 vector constructed from a single half value by converting it to double and assigning it to every component. + /// half to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(half v) { return new double3(v); } + + /// Return a double3 vector constructed from a half3 vector by componentwise conversion. + /// half3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(half3 v) { return new double3(v); } + + /// Returns a double3 vector constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(float v) { return new double3(v); } + + /// Return a double3 vector constructed from a float3 vector by componentwise conversion. + /// float3 to convert to double3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 double3(float3 v) { return new double3(v); } + + /// Returns a uint hash code of a double3 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double3 v) + { + return csum(fold_to_uint(v) * uint3(0xAF0F3103u, 0xE4A056C7u, 0x841D8225u)) + 0xC9393C7Du; + } + + /// + /// Returns a uint3 vector hash code of a double3 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(double3 v) + { + return (fold_to_uint(v) * uint3(0xD42EAFA3u, 0xD9AFD06Du, 0x97A65421u)) + 0x7809205Fu; + } + + /// Returns the result of specified shuffling of the components from two double3 vectors into a double value. + /// double3 to use as the left argument of the shuffle operation. + /// double3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double. + /// double result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double shuffle(double3 left, double3 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two double3 vectors into a double2 vector. + /// double3 to use as the left argument of the shuffle operation. + /// double3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double2 x component. + /// The ShuffleComponent to use when setting the resulting double2 y component. + /// double2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 shuffle(double3 left, double3 right, ShuffleComponent x, ShuffleComponent y) + { + return double2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two double3 vectors into a double3 vector. + /// double3 to use as the left argument of the shuffle operation. + /// double3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double3 x component. + /// The ShuffleComponent to use when setting the resulting double3 y component. + /// The ShuffleComponent to use when setting the resulting double3 z component. + /// double3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 shuffle(double3 left, double3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return double3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two double3 vectors into a double4 vector. + /// double3 to use as the left argument of the shuffle operation. + /// double3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double4 x component. + /// The ShuffleComponent to use when setting the resulting double4 y component. + /// The ShuffleComponent to use when setting the resulting double4 z component. + /// The ShuffleComponent to use when setting the resulting double4 w component. + /// double4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 shuffle(double3 left, double3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return double4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double select_shuffle_component(double3 a, double3 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double3x2.gen.cs b/ThirdParty/Unity.Mathematics/double3x2.gen.cs new file mode 100644 index 0000000..50e477e --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double3x2.gen.cs @@ -0,0 +1,632 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x2 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double3x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double3 c0; + /// Column 1 of the matrix. + public double3 c1; + + /// double3x2 zero value. + public static readonly double3x2 zero; + + /// Constructs a double3x2 matrix from two double3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(double3 c0, double3 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a double3x2 matrix from 6 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(double m00, double m01, + double m10, double m11, + double m20, double m21) + { + this.c0 = new double3(m00, m10, m20); + this.c1 = new double3(m01, m11, m21); + } + + /// Constructs a double3x2 matrix from a single double value by assigning it to every component. + /// double to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(double v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double3x2 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(bool v) + { + this.c0 = math.select(new double3(0.0), new double3(1.0), v); + this.c1 = math.select(new double3(0.0), new double3(1.0), v); + } + + /// Constructs a double3x2 matrix from a bool3x2 matrix by componentwise conversion. + /// bool3x2 to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(bool3x2 v) + { + this.c0 = math.select(new double3(0.0), new double3(1.0), v.c0); + this.c1 = math.select(new double3(0.0), new double3(1.0), v.c1); + } + + /// Constructs a double3x2 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double3x2 matrix from a int3x2 matrix by componentwise conversion. + /// int3x2 to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(int3x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a double3x2 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double3x2 matrix from a uint3x2 matrix by componentwise conversion. + /// uint3x2 to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(uint3x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a double3x2 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(float v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double3x2 matrix from a float3x2 matrix by componentwise conversion. + /// float3x2 to convert to double3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x2(float3x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + + /// Implicitly converts a single double value to a double3x2 matrix by assigning it to every component. + /// double to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x2(double v) { return new double3x2(v); } + + /// Explicitly converts a single bool value to a double3x2 matrix by converting it to double and assigning it to every component. + /// bool to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double3x2(bool v) { return new double3x2(v); } + + /// Explicitly converts a bool3x2 matrix to a double3x2 matrix by componentwise conversion. + /// bool3x2 to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double3x2(bool3x2 v) { return new double3x2(v); } + + /// Implicitly converts a single int value to a double3x2 matrix by converting it to double and assigning it to every component. + /// int to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x2(int v) { return new double3x2(v); } + + /// Implicitly converts a int3x2 matrix to a double3x2 matrix by componentwise conversion. + /// int3x2 to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x2(int3x2 v) { return new double3x2(v); } + + /// Implicitly converts a single uint value to a double3x2 matrix by converting it to double and assigning it to every component. + /// uint to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x2(uint v) { return new double3x2(v); } + + /// Implicitly converts a uint3x2 matrix to a double3x2 matrix by componentwise conversion. + /// uint3x2 to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x2(uint3x2 v) { return new double3x2(v); } + + /// Implicitly converts a single float value to a double3x2 matrix by converting it to double and assigning it to every component. + /// float to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x2(float v) { return new double3x2(v); } + + /// Implicitly converts a float3x2 matrix to a double3x2 matrix by componentwise conversion. + /// float3x2 to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x2(float3x2 v) { return new double3x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise multiplication. + /// Right hand side double3x2 to use to compute componentwise multiplication. + /// double3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator * (double3x2 lhs, double3x2 rhs) { return new double3x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator * (double3x2 lhs, double rhs) { return new double3x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double3x2 to use to compute componentwise multiplication. + /// double3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator * (double lhs, double3x2 rhs) { return new double3x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise addition. + /// Right hand side double3x2 to use to compute componentwise addition. + /// double3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator + (double3x2 lhs, double3x2 rhs) { return new double3x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator + (double3x2 lhs, double rhs) { return new double3x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double3x2 to use to compute componentwise addition. + /// double3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator + (double lhs, double3x2 rhs) { return new double3x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise subtraction. + /// Right hand side double3x2 to use to compute componentwise subtraction. + /// double3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator - (double3x2 lhs, double3x2 rhs) { return new double3x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator - (double3x2 lhs, double rhs) { return new double3x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double3x2 to use to compute componentwise subtraction. + /// double3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator - (double lhs, double3x2 rhs) { return new double3x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise division. + /// Right hand side double3x2 to use to compute componentwise division. + /// double3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator / (double3x2 lhs, double3x2 rhs) { return new double3x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator / (double3x2 lhs, double rhs) { return new double3x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double3x2 to use to compute componentwise division. + /// double3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator / (double lhs, double3x2 rhs) { return new double3x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise modulus. + /// Right hand side double3x2 to use to compute componentwise modulus. + /// double3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator % (double3x2 lhs, double3x2 rhs) { return new double3x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator % (double3x2 lhs, double rhs) { return new double3x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double3x2 to use to compute componentwise modulus. + /// double3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator % (double lhs, double3x2 rhs) { return new double3x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a double3x2 matrix. + /// Value to use when computing the componentwise increment. + /// double3x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator ++ (double3x2 val) { return new double3x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a double3x2 matrix. + /// Value to use when computing the componentwise decrement. + /// double3x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator -- (double3x2 val) { return new double3x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise less than. + /// Right hand side double3x2 to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (double3x2 lhs, double3x2 rhs) { return new bool3x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (double3x2 lhs, double rhs) { return new bool3x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double3x2 to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (double lhs, double3x2 rhs) { return new bool3x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise less or equal. + /// Right hand side double3x2 to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (double3x2 lhs, double3x2 rhs) { return new bool3x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (double3x2 lhs, double rhs) { return new bool3x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double3x2 to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (double lhs, double3x2 rhs) { return new bool3x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise greater than. + /// Right hand side double3x2 to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (double3x2 lhs, double3x2 rhs) { return new bool3x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (double3x2 lhs, double rhs) { return new bool3x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double3x2 to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (double lhs, double3x2 rhs) { return new bool3x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise greater or equal. + /// Right hand side double3x2 to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (double3x2 lhs, double3x2 rhs) { return new bool3x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (double3x2 lhs, double rhs) { return new bool3x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double3x2 to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (double lhs, double3x2 rhs) { return new bool3x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a double3x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// double3x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator - (double3x2 val) { return new double3x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a double3x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// double3x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 operator + (double3x2 val) { return new double3x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise equality operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise equality. + /// Right hand side double3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (double3x2 lhs, double3x2 rhs) { return new bool3x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (double3x2 lhs, double rhs) { return new bool3x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (double lhs, double3x2 rhs) { return new bool3x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two double3x2 matrices. + /// Left hand side double3x2 to use to compute componentwise not equal. + /// Right hand side double3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (double3x2 lhs, double3x2 rhs) { return new bool3x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a double3x2 matrix and a double value. + /// Left hand side double3x2 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (double3x2 lhs, double rhs) { return new bool3x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double3x2 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (double lhs, double3x2 rhs) { return new bool3x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + + /// Returns the double3 element at a specified index. + unsafe public ref double3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (double3x2* array = &this) { return ref ((double3*)array)[index]; } + } + } + + /// Returns true if the double3x2 is equal to a given double3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double3x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the double3x2 is equal to a given double3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double3x2 converted && Equals(converted); } + + + /// Returns a hash code for the double3x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double3x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double3x2({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z); + } + + /// Returns a string representation of the double3x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double3x2({0}, {1}, {2}, {3}, {4}, {5})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double3x2 matrix constructed from two double3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// double3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(double3 c0, double3 c1) { return new double3x2(c0, c1); } + + /// Returns a double3x2 matrix constructed from from 6 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// double3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(double m00, double m01, + double m10, double m11, + double m20, double m21) + { + return new double3x2(m00, m01, + m10, m11, + m20, m21); + } + + /// Returns a double3x2 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(double v) { return new double3x2(v); } + + /// Returns a double3x2 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(bool v) { return new double3x2(v); } + + /// Return a double3x2 matrix constructed from a bool3x2 matrix by componentwise conversion. + /// bool3x2 to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(bool3x2 v) { return new double3x2(v); } + + /// Returns a double3x2 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(int v) { return new double3x2(v); } + + /// Return a double3x2 matrix constructed from a int3x2 matrix by componentwise conversion. + /// int3x2 to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(int3x2 v) { return new double3x2(v); } + + /// Returns a double3x2 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(uint v) { return new double3x2(v); } + + /// Return a double3x2 matrix constructed from a uint3x2 matrix by componentwise conversion. + /// uint3x2 to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(uint3x2 v) { return new double3x2(v); } + + /// Returns a double3x2 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(float v) { return new double3x2(v); } + + /// Return a double3x2 matrix constructed from a float3x2 matrix by componentwise conversion. + /// float3x2 to convert to double3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 double3x2(float3x2 v) { return new double3x2(v); } + + /// Return the double2x3 transpose of a double3x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 transpose(double3x2 v) + { + return double2x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z); + } + + /// Returns a uint hash code of a double3x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double3x2 v) + { + return csum(fold_to_uint(v.c0) * uint3(0xEE390C97u, 0x9C8A2F05u, 0x4DDC6509u) + + fold_to_uint(v.c1) * uint3(0x7CF083CBu, 0x5C4D6CEDu, 0xF9137117u)) + 0xE857DCE1u; + } + + /// + /// Returns a uint3 vector hash code of a double3x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(double3x2 v) + { + return (fold_to_uint(v.c0) * uint3(0xF62213C5u, 0x9CDAA959u, 0xAA269ABFu) + + fold_to_uint(v.c1) * uint3(0xD54BA36Fu, 0xFD0847B9u, 0x8189A683u)) + 0xB139D651u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double3x3.gen.cs b/ThirdParty/Unity.Mathematics/double3x3.gen.cs new file mode 100644 index 0000000..1bdeb13 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double3x3.gen.cs @@ -0,0 +1,697 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x3 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double3x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double3 c0; + /// Column 1 of the matrix. + public double3 c1; + /// Column 2 of the matrix. + public double3 c2; + + /// double3x3 identity transform. + public static readonly double3x3 identity = new double3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); + + /// double3x3 zero value. + public static readonly double3x3 zero; + + /// Constructs a double3x3 matrix from three double3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(double3 c0, double3 c1, double3 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a double3x3 matrix from 9 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(double m00, double m01, double m02, + double m10, double m11, double m12, + double m20, double m21, double m22) + { + this.c0 = new double3(m00, m10, m20); + this.c1 = new double3(m01, m11, m21); + this.c2 = new double3(m02, m12, m22); + } + + /// Constructs a double3x3 matrix from a single double value by assigning it to every component. + /// double to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(double v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double3x3 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(bool v) + { + this.c0 = math.select(new double3(0.0), new double3(1.0), v); + this.c1 = math.select(new double3(0.0), new double3(1.0), v); + this.c2 = math.select(new double3(0.0), new double3(1.0), v); + } + + /// Constructs a double3x3 matrix from a bool3x3 matrix by componentwise conversion. + /// bool3x3 to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(bool3x3 v) + { + this.c0 = math.select(new double3(0.0), new double3(1.0), v.c0); + this.c1 = math.select(new double3(0.0), new double3(1.0), v.c1); + this.c2 = math.select(new double3(0.0), new double3(1.0), v.c2); + } + + /// Constructs a double3x3 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double3x3 matrix from a int3x3 matrix by componentwise conversion. + /// int3x3 to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(int3x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a double3x3 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double3x3 matrix from a uint3x3 matrix by componentwise conversion. + /// uint3x3 to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(uint3x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a double3x3 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double3x3 matrix from a float3x3 matrix by componentwise conversion. + /// float3x3 to convert to double3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x3(float3x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + + /// Implicitly converts a single double value to a double3x3 matrix by assigning it to every component. + /// double to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x3(double v) { return new double3x3(v); } + + /// Explicitly converts a single bool value to a double3x3 matrix by converting it to double and assigning it to every component. + /// bool to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double3x3(bool v) { return new double3x3(v); } + + /// Explicitly converts a bool3x3 matrix to a double3x3 matrix by componentwise conversion. + /// bool3x3 to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double3x3(bool3x3 v) { return new double3x3(v); } + + /// Implicitly converts a single int value to a double3x3 matrix by converting it to double and assigning it to every component. + /// int to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x3(int v) { return new double3x3(v); } + + /// Implicitly converts a int3x3 matrix to a double3x3 matrix by componentwise conversion. + /// int3x3 to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x3(int3x3 v) { return new double3x3(v); } + + /// Implicitly converts a single uint value to a double3x3 matrix by converting it to double and assigning it to every component. + /// uint to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x3(uint v) { return new double3x3(v); } + + /// Implicitly converts a uint3x3 matrix to a double3x3 matrix by componentwise conversion. + /// uint3x3 to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x3(uint3x3 v) { return new double3x3(v); } + + /// Implicitly converts a single float value to a double3x3 matrix by converting it to double and assigning it to every component. + /// float to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x3(float v) { return new double3x3(v); } + + /// Implicitly converts a float3x3 matrix to a double3x3 matrix by componentwise conversion. + /// float3x3 to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x3(float3x3 v) { return new double3x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise multiplication. + /// Right hand side double3x3 to use to compute componentwise multiplication. + /// double3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator * (double3x3 lhs, double3x3 rhs) { return new double3x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator * (double3x3 lhs, double rhs) { return new double3x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double3x3 to use to compute componentwise multiplication. + /// double3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator * (double lhs, double3x3 rhs) { return new double3x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise addition. + /// Right hand side double3x3 to use to compute componentwise addition. + /// double3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator + (double3x3 lhs, double3x3 rhs) { return new double3x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator + (double3x3 lhs, double rhs) { return new double3x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double3x3 to use to compute componentwise addition. + /// double3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator + (double lhs, double3x3 rhs) { return new double3x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise subtraction. + /// Right hand side double3x3 to use to compute componentwise subtraction. + /// double3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator - (double3x3 lhs, double3x3 rhs) { return new double3x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator - (double3x3 lhs, double rhs) { return new double3x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double3x3 to use to compute componentwise subtraction. + /// double3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator - (double lhs, double3x3 rhs) { return new double3x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise division. + /// Right hand side double3x3 to use to compute componentwise division. + /// double3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator / (double3x3 lhs, double3x3 rhs) { return new double3x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator / (double3x3 lhs, double rhs) { return new double3x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double3x3 to use to compute componentwise division. + /// double3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator / (double lhs, double3x3 rhs) { return new double3x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise modulus. + /// Right hand side double3x3 to use to compute componentwise modulus. + /// double3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator % (double3x3 lhs, double3x3 rhs) { return new double3x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator % (double3x3 lhs, double rhs) { return new double3x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double3x3 to use to compute componentwise modulus. + /// double3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator % (double lhs, double3x3 rhs) { return new double3x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a double3x3 matrix. + /// Value to use when computing the componentwise increment. + /// double3x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator ++ (double3x3 val) { return new double3x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a double3x3 matrix. + /// Value to use when computing the componentwise decrement. + /// double3x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator -- (double3x3 val) { return new double3x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise less than. + /// Right hand side double3x3 to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (double3x3 lhs, double3x3 rhs) { return new bool3x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (double3x3 lhs, double rhs) { return new bool3x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double3x3 to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (double lhs, double3x3 rhs) { return new bool3x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise less or equal. + /// Right hand side double3x3 to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (double3x3 lhs, double3x3 rhs) { return new bool3x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (double3x3 lhs, double rhs) { return new bool3x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double3x3 to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (double lhs, double3x3 rhs) { return new bool3x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise greater than. + /// Right hand side double3x3 to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (double3x3 lhs, double3x3 rhs) { return new bool3x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (double3x3 lhs, double rhs) { return new bool3x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double3x3 to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (double lhs, double3x3 rhs) { return new bool3x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise greater or equal. + /// Right hand side double3x3 to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (double3x3 lhs, double3x3 rhs) { return new bool3x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (double3x3 lhs, double rhs) { return new bool3x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double3x3 to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (double lhs, double3x3 rhs) { return new bool3x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a double3x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// double3x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator - (double3x3 val) { return new double3x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a double3x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// double3x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 operator + (double3x3 val) { return new double3x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise equality operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise equality. + /// Right hand side double3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (double3x3 lhs, double3x3 rhs) { return new bool3x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (double3x3 lhs, double rhs) { return new bool3x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (double lhs, double3x3 rhs) { return new bool3x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two double3x3 matrices. + /// Left hand side double3x3 to use to compute componentwise not equal. + /// Right hand side double3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (double3x3 lhs, double3x3 rhs) { return new bool3x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a double3x3 matrix and a double value. + /// Left hand side double3x3 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (double3x3 lhs, double rhs) { return new bool3x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double3x3 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (double lhs, double3x3 rhs) { return new bool3x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + + /// Returns the double3 element at a specified index. + unsafe public ref double3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (double3x3* array = &this) { return ref ((double3*)array)[index]; } + } + } + + /// Returns true if the double3x3 is equal to a given double3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double3x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the double3x3 is equal to a given double3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double3x3 converted && Equals(converted); } + + + /// Returns a hash code for the double3x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double3x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double3x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z); + } + + /// Returns a string representation of the double3x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double3x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double3x3 matrix constructed from three double3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// double3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(double3 c0, double3 c1, double3 c2) { return new double3x3(c0, c1, c2); } + + /// Returns a double3x3 matrix constructed from from 9 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// double3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(double m00, double m01, double m02, + double m10, double m11, double m12, + double m20, double m21, double m22) + { + return new double3x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22); + } + + /// Returns a double3x3 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(double v) { return new double3x3(v); } + + /// Returns a double3x3 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(bool v) { return new double3x3(v); } + + /// Return a double3x3 matrix constructed from a bool3x3 matrix by componentwise conversion. + /// bool3x3 to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(bool3x3 v) { return new double3x3(v); } + + /// Returns a double3x3 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(int v) { return new double3x3(v); } + + /// Return a double3x3 matrix constructed from a int3x3 matrix by componentwise conversion. + /// int3x3 to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(int3x3 v) { return new double3x3(v); } + + /// Returns a double3x3 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(uint v) { return new double3x3(v); } + + /// Return a double3x3 matrix constructed from a uint3x3 matrix by componentwise conversion. + /// uint3x3 to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(uint3x3 v) { return new double3x3(v); } + + /// Returns a double3x3 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(float v) { return new double3x3(v); } + + /// Return a double3x3 matrix constructed from a float3x3 matrix by componentwise conversion. + /// float3x3 to convert to double3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 double3x3(float3x3 v) { return new double3x3(v); } + + /// Return the double3x3 transpose of a double3x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 transpose(double3x3 v) + { + return double3x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z); + } + + /// Returns the double3x3 full inverse of a double3x3 matrix. + /// Matrix to invert. + /// The inverted matrix. + public static double3x3 inverse(double3x3 m) + { + double3 c0 = m.c0; + double3 c1 = m.c1; + double3 c2 = m.c2; + + double3 t0 = double3(c1.x, c2.x, c0.x); + double3 t1 = double3(c1.y, c2.y, c0.y); + double3 t2 = double3(c1.z, c2.z, c0.z); + + double3 m0 = t1 * t2.yzx - t1.yzx * t2; + double3 m1 = t0.yzx * t2 - t0 * t2.yzx; + double3 m2 = t0 * t1.yzx - t0.yzx * t1; + + double rcpDet = 1.0 / csum(t0.zxy * m0); + return double3x3(m0, m1, m2) * rcpDet; + } + + /// Returns the determinant of a double3x3 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double determinant(double3x3 m) + { + double3 c0 = m.c0; + double3 c1 = m.c1; + double3 c2 = m.c2; + + double m00 = c1.y * c2.z - c1.z * c2.y; + double m01 = c0.y * c2.z - c0.z * c2.y; + double m02 = c0.y * c1.z - c0.z * c1.y; + + return c0.x * m00 - c1.x * m01 + c2.x * m02; + } + + /// Returns a uint hash code of a double3x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double3x3 v) + { + return csum(fold_to_uint(v.c0) * uint3(0xAC5DB57Bu, 0xA91A02EDu, 0xB3C49313u) + + fold_to_uint(v.c1) * uint3(0xF43A9ABBu, 0x84E7E01Bu, 0x8E055BE5u) + + fold_to_uint(v.c2) * uint3(0x6E624EB7u, 0x7383ED49u, 0xDD49C23Bu)) + 0xEBD0D005u; + } + + /// + /// Returns a uint3 vector hash code of a double3x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(double3x3 v) + { + return (fold_to_uint(v.c0) * uint3(0x91475DF7u, 0x55E84827u, 0x90A285BBu) + + fold_to_uint(v.c1) * uint3(0x5D19E1D5u, 0xFAAF07DDu, 0x625C45BDu) + + fold_to_uint(v.c2) * uint3(0xC9F27FCBu, 0x6D2523B1u, 0x6E2BF6A9u)) + 0xCC74B3B7u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double3x4.gen.cs b/ThirdParty/Unity.Mathematics/double3x4.gen.cs new file mode 100644 index 0000000..5e687dc --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double3x4.gen.cs @@ -0,0 +1,699 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x4 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double3x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double3 c0; + /// Column 1 of the matrix. + public double3 c1; + /// Column 2 of the matrix. + public double3 c2; + /// Column 3 of the matrix. + public double3 c3; + + /// double3x4 zero value. + public static readonly double3x4 zero; + + /// Constructs a double3x4 matrix from four double3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(double3 c0, double3 c1, double3 c2, double3 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a double3x4 matrix from 12 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(double m00, double m01, double m02, double m03, + double m10, double m11, double m12, double m13, + double m20, double m21, double m22, double m23) + { + this.c0 = new double3(m00, m10, m20); + this.c1 = new double3(m01, m11, m21); + this.c2 = new double3(m02, m12, m22); + this.c3 = new double3(m03, m13, m23); + } + + /// Constructs a double3x4 matrix from a single double value by assigning it to every component. + /// double to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(double v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double3x4 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(bool v) + { + this.c0 = math.select(new double3(0.0), new double3(1.0), v); + this.c1 = math.select(new double3(0.0), new double3(1.0), v); + this.c2 = math.select(new double3(0.0), new double3(1.0), v); + this.c3 = math.select(new double3(0.0), new double3(1.0), v); + } + + /// Constructs a double3x4 matrix from a bool3x4 matrix by componentwise conversion. + /// bool3x4 to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(bool3x4 v) + { + this.c0 = math.select(new double3(0.0), new double3(1.0), v.c0); + this.c1 = math.select(new double3(0.0), new double3(1.0), v.c1); + this.c2 = math.select(new double3(0.0), new double3(1.0), v.c2); + this.c3 = math.select(new double3(0.0), new double3(1.0), v.c3); + } + + /// Constructs a double3x4 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double3x4 matrix from a int3x4 matrix by componentwise conversion. + /// int3x4 to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(int3x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a double3x4 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double3x4 matrix from a uint3x4 matrix by componentwise conversion. + /// uint3x4 to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(uint3x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a double3x4 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double3x4 matrix from a float3x4 matrix by componentwise conversion. + /// float3x4 to convert to double3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3x4(float3x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + + /// Implicitly converts a single double value to a double3x4 matrix by assigning it to every component. + /// double to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x4(double v) { return new double3x4(v); } + + /// Explicitly converts a single bool value to a double3x4 matrix by converting it to double and assigning it to every component. + /// bool to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double3x4(bool v) { return new double3x4(v); } + + /// Explicitly converts a bool3x4 matrix to a double3x4 matrix by componentwise conversion. + /// bool3x4 to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double3x4(bool3x4 v) { return new double3x4(v); } + + /// Implicitly converts a single int value to a double3x4 matrix by converting it to double and assigning it to every component. + /// int to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x4(int v) { return new double3x4(v); } + + /// Implicitly converts a int3x4 matrix to a double3x4 matrix by componentwise conversion. + /// int3x4 to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x4(int3x4 v) { return new double3x4(v); } + + /// Implicitly converts a single uint value to a double3x4 matrix by converting it to double and assigning it to every component. + /// uint to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x4(uint v) { return new double3x4(v); } + + /// Implicitly converts a uint3x4 matrix to a double3x4 matrix by componentwise conversion. + /// uint3x4 to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x4(uint3x4 v) { return new double3x4(v); } + + /// Implicitly converts a single float value to a double3x4 matrix by converting it to double and assigning it to every component. + /// float to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x4(float v) { return new double3x4(v); } + + /// Implicitly converts a float3x4 matrix to a double3x4 matrix by componentwise conversion. + /// float3x4 to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double3x4(float3x4 v) { return new double3x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise multiplication. + /// Right hand side double3x4 to use to compute componentwise multiplication. + /// double3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator * (double3x4 lhs, double3x4 rhs) { return new double3x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator * (double3x4 lhs, double rhs) { return new double3x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double3x4 to use to compute componentwise multiplication. + /// double3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator * (double lhs, double3x4 rhs) { return new double3x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise addition. + /// Right hand side double3x4 to use to compute componentwise addition. + /// double3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator + (double3x4 lhs, double3x4 rhs) { return new double3x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator + (double3x4 lhs, double rhs) { return new double3x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double3x4 to use to compute componentwise addition. + /// double3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator + (double lhs, double3x4 rhs) { return new double3x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise subtraction. + /// Right hand side double3x4 to use to compute componentwise subtraction. + /// double3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator - (double3x4 lhs, double3x4 rhs) { return new double3x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator - (double3x4 lhs, double rhs) { return new double3x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double3x4 to use to compute componentwise subtraction. + /// double3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator - (double lhs, double3x4 rhs) { return new double3x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise division. + /// Right hand side double3x4 to use to compute componentwise division. + /// double3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator / (double3x4 lhs, double3x4 rhs) { return new double3x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator / (double3x4 lhs, double rhs) { return new double3x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double3x4 to use to compute componentwise division. + /// double3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator / (double lhs, double3x4 rhs) { return new double3x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise modulus. + /// Right hand side double3x4 to use to compute componentwise modulus. + /// double3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator % (double3x4 lhs, double3x4 rhs) { return new double3x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator % (double3x4 lhs, double rhs) { return new double3x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double3x4 to use to compute componentwise modulus. + /// double3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator % (double lhs, double3x4 rhs) { return new double3x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a double3x4 matrix. + /// Value to use when computing the componentwise increment. + /// double3x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator ++ (double3x4 val) { return new double3x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a double3x4 matrix. + /// Value to use when computing the componentwise decrement. + /// double3x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator -- (double3x4 val) { return new double3x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise less than. + /// Right hand side double3x4 to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (double3x4 lhs, double3x4 rhs) { return new bool3x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (double3x4 lhs, double rhs) { return new bool3x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double3x4 to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (double lhs, double3x4 rhs) { return new bool3x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise less or equal. + /// Right hand side double3x4 to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (double3x4 lhs, double3x4 rhs) { return new bool3x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (double3x4 lhs, double rhs) { return new bool3x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double3x4 to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (double lhs, double3x4 rhs) { return new bool3x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise greater than. + /// Right hand side double3x4 to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (double3x4 lhs, double3x4 rhs) { return new bool3x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (double3x4 lhs, double rhs) { return new bool3x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double3x4 to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (double lhs, double3x4 rhs) { return new bool3x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise greater or equal. + /// Right hand side double3x4 to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (double3x4 lhs, double3x4 rhs) { return new bool3x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (double3x4 lhs, double rhs) { return new bool3x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double3x4 to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (double lhs, double3x4 rhs) { return new bool3x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a double3x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// double3x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator - (double3x4 val) { return new double3x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a double3x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// double3x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 operator + (double3x4 val) { return new double3x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise equality operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise equality. + /// Right hand side double3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (double3x4 lhs, double3x4 rhs) { return new bool3x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (double3x4 lhs, double rhs) { return new bool3x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (double lhs, double3x4 rhs) { return new bool3x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two double3x4 matrices. + /// Left hand side double3x4 to use to compute componentwise not equal. + /// Right hand side double3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (double3x4 lhs, double3x4 rhs) { return new bool3x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a double3x4 matrix and a double value. + /// Left hand side double3x4 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (double3x4 lhs, double rhs) { return new bool3x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double3x4 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (double lhs, double3x4 rhs) { return new bool3x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + + /// Returns the double3 element at a specified index. + unsafe public ref double3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (double3x4* array = &this) { return ref ((double3*)array)[index]; } + } + } + + /// Returns true if the double3x4 is equal to a given double3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double3x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the double3x4 is equal to a given double3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double3x4 converted && Equals(converted); } + + + /// Returns a hash code for the double3x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double3x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double3x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z); + } + + /// Returns a string representation of the double3x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double3x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c3.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double3x4 matrix constructed from four double3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// double3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(double3 c0, double3 c1, double3 c2, double3 c3) { return new double3x4(c0, c1, c2, c3); } + + /// Returns a double3x4 matrix constructed from from 12 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// double3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(double m00, double m01, double m02, double m03, + double m10, double m11, double m12, double m13, + double m20, double m21, double m22, double m23) + { + return new double3x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23); + } + + /// Returns a double3x4 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(double v) { return new double3x4(v); } + + /// Returns a double3x4 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(bool v) { return new double3x4(v); } + + /// Return a double3x4 matrix constructed from a bool3x4 matrix by componentwise conversion. + /// bool3x4 to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(bool3x4 v) { return new double3x4(v); } + + /// Returns a double3x4 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(int v) { return new double3x4(v); } + + /// Return a double3x4 matrix constructed from a int3x4 matrix by componentwise conversion. + /// int3x4 to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(int3x4 v) { return new double3x4(v); } + + /// Returns a double3x4 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(uint v) { return new double3x4(v); } + + /// Return a double3x4 matrix constructed from a uint3x4 matrix by componentwise conversion. + /// uint3x4 to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(uint3x4 v) { return new double3x4(v); } + + /// Returns a double3x4 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(float v) { return new double3x4(v); } + + /// Return a double3x4 matrix constructed from a float3x4 matrix by componentwise conversion. + /// float3x4 to convert to double3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 double3x4(float3x4 v) { return new double3x4(v); } + + /// Return the double4x3 transpose of a double3x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 transpose(double3x4 v) + { + return double4x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z, + v.c3.x, v.c3.y, v.c3.z); + } + + /// Fast matrix inverse for rigid transforms (orthonormal basis and translation) + /// Matrix to invert. + /// The inverted matrix. + public static double3x4 fastinverse(double3x4 m) + { + double3 c0 = m.c0; + double3 c1 = m.c1; + double3 c2 = m.c2; + double3 pos = m.c3; + + double3 r0 = double3(c0.x, c1.x, c2.x); + double3 r1 = double3(c0.y, c1.y, c2.y); + double3 r2 = double3(c0.z, c1.z, c2.z); + + pos = -(r0 * pos.x + r1 * pos.y + r2 * pos.z); + + return double3x4(r0, r1, r2, pos); + } + + /// Returns a uint hash code of a double3x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double3x4 v) + { + return csum(fold_to_uint(v.c0) * uint3(0xEE390C97u, 0x9C8A2F05u, 0x4DDC6509u) + + fold_to_uint(v.c1) * uint3(0x7CF083CBu, 0x5C4D6CEDu, 0xF9137117u) + + fold_to_uint(v.c2) * uint3(0xE857DCE1u, 0xF62213C5u, 0x9CDAA959u) + + fold_to_uint(v.c3) * uint3(0xAA269ABFu, 0xD54BA36Fu, 0xFD0847B9u)) + 0x8189A683u; + } + + /// + /// Returns a uint3 vector hash code of a double3x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(double3x4 v) + { + return (fold_to_uint(v.c0) * uint3(0xB139D651u, 0xE7579997u, 0xEF7D56C7u) + + fold_to_uint(v.c1) * uint3(0x66F38F0Bu, 0x624256A3u, 0x5292ADE1u) + + fold_to_uint(v.c2) * uint3(0xD2E590E5u, 0xF25BE857u, 0x9BC17CE7u) + + fold_to_uint(v.c3) * uint3(0xC8B86851u, 0x64095221u, 0xADF428FFu)) + 0xA3977109u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double4.gen.cs b/ThirdParty/Unity.Mathematics/double4.gen.cs new file mode 100644 index 0000000..b5a1381 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double4.gen.cs @@ -0,0 +1,4052 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4 component vector of doubles. + [DebuggerTypeProxy(typeof(double4.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double4 : System.IEquatable, IFormattable + { + /// x component of the vector. + public double x; + /// y component of the vector. + public double y; + /// z component of the vector. + public double z; + /// w component of the vector. + public double w; + + /// double4 zero value. + public static readonly double4 zero; + + /// Constructs a double4 vector from four double values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double x, double y, double z, double w) + { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + /// Constructs a double4 vector from two double values and a double2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double x, double y, double2 zw) + { + this.x = x; + this.y = y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a double4 vector from a double value, a double2 vector and a double value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double x, double2 yz, double w) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + this.w = w; + } + + /// Constructs a double4 vector from a double value and a double3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double x, double3 yzw) + { + this.x = x; + this.y = yzw.x; + this.z = yzw.y; + this.w = yzw.z; + } + + /// Constructs a double4 vector from a double2 vector and two double values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double2 xy, double z, double w) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + this.w = w; + } + + /// Constructs a double4 vector from two double2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double2 xy, double2 zw) + { + this.x = xy.x; + this.y = xy.y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a double4 vector from a double3 vector and a double value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double3 xyz, double w) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + this.w = w; + } + + /// Constructs a double4 vector from a double4 vector. + /// The constructed vector's xyzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double4 xyzw) + { + this.x = xyzw.x; + this.y = xyzw.y; + this.z = xyzw.z; + this.w = xyzw.w; + } + + /// Constructs a double4 vector from a single double value by assigning it to every component. + /// double to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(double v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a double4 vector from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(bool v) + { + this.x = v ? 1.0 : 0.0; + this.y = v ? 1.0 : 0.0; + this.z = v ? 1.0 : 0.0; + this.w = v ? 1.0 : 0.0; + } + + /// Constructs a double4 vector from a bool4 vector by componentwise conversion. + /// bool4 to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(bool4 v) + { + this.x = v.x ? 1.0 : 0.0; + this.y = v.y ? 1.0 : 0.0; + this.z = v.z ? 1.0 : 0.0; + this.w = v.w ? 1.0 : 0.0; + } + + /// Constructs a double4 vector from a single int value by converting it to double and assigning it to every component. + /// int to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(int v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a double4 vector from a int4 vector by componentwise conversion. + /// int4 to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(int4 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = v.w; + } + + /// Constructs a double4 vector from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(uint v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a double4 vector from a uint4 vector by componentwise conversion. + /// uint4 to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(uint4 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = v.w; + } + + /// Constructs a double4 vector from a single half value by converting it to double and assigning it to every component. + /// half to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(half v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a double4 vector from a half4 vector by componentwise conversion. + /// half4 to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(half4 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = v.w; + } + + /// Constructs a double4 vector from a single float value by converting it to double and assigning it to every component. + /// float to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(float v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a double4 vector from a float4 vector by componentwise conversion. + /// float4 to convert to double4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4(float4 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = v.w; + } + + + /// Implicitly converts a single double value to a double4 vector by assigning it to every component. + /// double to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(double v) { return new double4(v); } + + /// Explicitly converts a single bool value to a double4 vector by converting it to double and assigning it to every component. + /// bool to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double4(bool v) { return new double4(v); } + + /// Explicitly converts a bool4 vector to a double4 vector by componentwise conversion. + /// bool4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double4(bool4 v) { return new double4(v); } + + /// Implicitly converts a single int value to a double4 vector by converting it to double and assigning it to every component. + /// int to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(int v) { return new double4(v); } + + /// Implicitly converts a int4 vector to a double4 vector by componentwise conversion. + /// int4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(int4 v) { return new double4(v); } + + /// Implicitly converts a single uint value to a double4 vector by converting it to double and assigning it to every component. + /// uint to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(uint v) { return new double4(v); } + + /// Implicitly converts a uint4 vector to a double4 vector by componentwise conversion. + /// uint4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(uint4 v) { return new double4(v); } + + /// Implicitly converts a single half value to a double4 vector by converting it to double and assigning it to every component. + /// half to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(half v) { return new double4(v); } + + /// Implicitly converts a half4 vector to a double4 vector by componentwise conversion. + /// half4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(half4 v) { return new double4(v); } + + /// Implicitly converts a single float value to a double4 vector by converting it to double and assigning it to every component. + /// float to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(float v) { return new double4(v); } + + /// Implicitly converts a float4 vector to a double4 vector by componentwise conversion. + /// float4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4(float4 v) { return new double4(v); } + + + /// Returns the result of a componentwise multiplication operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise multiplication. + /// Right hand side double4 to use to compute componentwise multiplication. + /// double4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator * (double4 lhs, double4 rhs) { return new double4 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z, lhs.w * rhs.w); } + + /// Returns the result of a componentwise multiplication operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator * (double4 lhs, double rhs) { return new double4 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs, lhs.w * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double4 to use to compute componentwise multiplication. + /// double4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator * (double lhs, double4 rhs) { return new double4 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z, lhs * rhs.w); } + + + /// Returns the result of a componentwise addition operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise addition. + /// Right hand side double4 to use to compute componentwise addition. + /// double4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator + (double4 lhs, double4 rhs) { return new double4 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z, lhs.w + rhs.w); } + + /// Returns the result of a componentwise addition operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator + (double4 lhs, double rhs) { return new double4 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs, lhs.w + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double4 to use to compute componentwise addition. + /// double4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator + (double lhs, double4 rhs) { return new double4 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z, lhs + rhs.w); } + + + /// Returns the result of a componentwise subtraction operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise subtraction. + /// Right hand side double4 to use to compute componentwise subtraction. + /// double4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator - (double4 lhs, double4 rhs) { return new double4 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z, lhs.w - rhs.w); } + + /// Returns the result of a componentwise subtraction operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator - (double4 lhs, double rhs) { return new double4 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs, lhs.w - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double4 to use to compute componentwise subtraction. + /// double4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator - (double lhs, double4 rhs) { return new double4 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z, lhs - rhs.w); } + + + /// Returns the result of a componentwise division operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise division. + /// Right hand side double4 to use to compute componentwise division. + /// double4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator / (double4 lhs, double4 rhs) { return new double4 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z, lhs.w / rhs.w); } + + /// Returns the result of a componentwise division operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator / (double4 lhs, double rhs) { return new double4 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs, lhs.w / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double4 to use to compute componentwise division. + /// double4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator / (double lhs, double4 rhs) { return new double4 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z, lhs / rhs.w); } + + + /// Returns the result of a componentwise modulus operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise modulus. + /// Right hand side double4 to use to compute componentwise modulus. + /// double4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator % (double4 lhs, double4 rhs) { return new double4 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z, lhs.w % rhs.w); } + + /// Returns the result of a componentwise modulus operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator % (double4 lhs, double rhs) { return new double4 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs, lhs.w % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double4 to use to compute componentwise modulus. + /// double4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator % (double lhs, double4 rhs) { return new double4 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z, lhs % rhs.w); } + + + /// Returns the result of a componentwise increment operation on a double4 vector. + /// Value to use when computing the componentwise increment. + /// double4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator ++ (double4 val) { return new double4 (++val.x, ++val.y, ++val.z, ++val.w); } + + + /// Returns the result of a componentwise decrement operation on a double4 vector. + /// Value to use when computing the componentwise decrement. + /// double4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator -- (double4 val) { return new double4 (--val.x, --val.y, --val.z, --val.w); } + + + /// Returns the result of a componentwise less than operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise less than. + /// Right hand side double4 to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (double4 lhs, double4 rhs) { return new bool4 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z, lhs.w < rhs.w); } + + /// Returns the result of a componentwise less than operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (double4 lhs, double rhs) { return new bool4 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs, lhs.w < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double4 to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (double lhs, double4 rhs) { return new bool4 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z, lhs < rhs.w); } + + + /// Returns the result of a componentwise less or equal operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise less or equal. + /// Right hand side double4 to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (double4 lhs, double4 rhs) { return new bool4 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z, lhs.w <= rhs.w); } + + /// Returns the result of a componentwise less or equal operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (double4 lhs, double rhs) { return new bool4 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs, lhs.w <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double4 to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (double lhs, double4 rhs) { return new bool4 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z, lhs <= rhs.w); } + + + /// Returns the result of a componentwise greater than operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise greater than. + /// Right hand side double4 to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (double4 lhs, double4 rhs) { return new bool4 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z, lhs.w > rhs.w); } + + /// Returns the result of a componentwise greater than operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (double4 lhs, double rhs) { return new bool4 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs, lhs.w > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double4 to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (double lhs, double4 rhs) { return new bool4 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z, lhs > rhs.w); } + + + /// Returns the result of a componentwise greater or equal operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise greater or equal. + /// Right hand side double4 to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (double4 lhs, double4 rhs) { return new bool4 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z, lhs.w >= rhs.w); } + + /// Returns the result of a componentwise greater or equal operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (double4 lhs, double rhs) { return new bool4 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs, lhs.w >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double4 to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (double lhs, double4 rhs) { return new bool4 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z, lhs >= rhs.w); } + + + /// Returns the result of a componentwise unary minus operation on a double4 vector. + /// Value to use when computing the componentwise unary minus. + /// double4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator - (double4 val) { return new double4 (-val.x, -val.y, -val.z, -val.w); } + + + /// Returns the result of a componentwise unary plus operation on a double4 vector. + /// Value to use when computing the componentwise unary plus. + /// double4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 operator + (double4 val) { return new double4 (+val.x, +val.y, +val.z, +val.w); } + + + /// Returns the result of a componentwise equality operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise equality. + /// Right hand side double4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (double4 lhs, double4 rhs) { return new bool4 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z, lhs.w == rhs.w); } + + /// Returns the result of a componentwise equality operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (double4 lhs, double rhs) { return new bool4 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs, lhs.w == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (double lhs, double4 rhs) { return new bool4 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z, lhs == rhs.w); } + + + /// Returns the result of a componentwise not equal operation on two double4 vectors. + /// Left hand side double4 to use to compute componentwise not equal. + /// Right hand side double4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (double4 lhs, double4 rhs) { return new bool4 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z, lhs.w != rhs.w); } + + /// Returns the result of a componentwise not equal operation on a double4 vector and a double value. + /// Left hand side double4 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (double4 lhs, double rhs) { return new bool4 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs, lhs.w != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double4 vector. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (double lhs, double4 rhs) { return new bool4 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z, lhs != rhs.w); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 xwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(x, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 yzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 ywww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(y, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 zwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(z, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double4 wwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double4(w, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 xww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 ywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 ywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 ywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 yww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 zww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 wwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double3 www + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double3(w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 xw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 yw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 zw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 wx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 wy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 wz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public double2 ww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new double2(w, w); } + } + + + + /// Returns the double element at a specified index. + unsafe public double this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (double4* array = &this) { return ((double*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (double* array = &x) { array[index] = value; } + } + } + + /// Returns true if the double4 is equal to a given double4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } + + /// Returns true if the double4 is equal to a given double4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double4 converted && Equals(converted); } + + + /// Returns a hash code for the double4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double4({0}, {1}, {2}, {3})", x, y, z, w); + } + + /// Returns a string representation of the double4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double4({0}, {1}, {2}, {3})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public double x; + public double y; + public double z; + public double w; + public DebuggerProxy(double4 v) + { + x = v.x; + y = v.y; + z = v.z; + w = v.w; + } + } + + } + + public static partial class math + { + /// Returns a double4 vector constructed from four double values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// double4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double x, double y, double z, double w) { return new double4(x, y, z, w); } + + /// Returns a double4 vector constructed from two double values and a double2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// double4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double x, double y, double2 zw) { return new double4(x, y, zw); } + + /// Returns a double4 vector constructed from a double value, a double2 vector and a double value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// double4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double x, double2 yz, double w) { return new double4(x, yz, w); } + + /// Returns a double4 vector constructed from a double value and a double3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + /// double4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double x, double3 yzw) { return new double4(x, yzw); } + + /// Returns a double4 vector constructed from a double2 vector and two double values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// double4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double2 xy, double z, double w) { return new double4(xy, z, w); } + + /// Returns a double4 vector constructed from two double2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// double4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double2 xy, double2 zw) { return new double4(xy, zw); } + + /// Returns a double4 vector constructed from a double3 vector and a double value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// double4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double3 xyz, double w) { return new double4(xyz, w); } + + /// Returns a double4 vector constructed from a double4 vector. + /// The constructed vector's xyzw components will be set to this value. + /// double4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double4 xyzw) { return new double4(xyzw); } + + /// Returns a double4 vector constructed from a single double value by assigning it to every component. + /// double to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(double v) { return new double4(v); } + + /// Returns a double4 vector constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(bool v) { return new double4(v); } + + /// Return a double4 vector constructed from a bool4 vector by componentwise conversion. + /// bool4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(bool4 v) { return new double4(v); } + + /// Returns a double4 vector constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(int v) { return new double4(v); } + + /// Return a double4 vector constructed from a int4 vector by componentwise conversion. + /// int4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(int4 v) { return new double4(v); } + + /// Returns a double4 vector constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(uint v) { return new double4(v); } + + /// Return a double4 vector constructed from a uint4 vector by componentwise conversion. + /// uint4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(uint4 v) { return new double4(v); } + + /// Returns a double4 vector constructed from a single half value by converting it to double and assigning it to every component. + /// half to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(half v) { return new double4(v); } + + /// Return a double4 vector constructed from a half4 vector by componentwise conversion. + /// half4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(half4 v) { return new double4(v); } + + /// Returns a double4 vector constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(float v) { return new double4(v); } + + /// Return a double4 vector constructed from a float4 vector by componentwise conversion. + /// float4 to convert to double4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 double4(float4 v) { return new double4(v); } + + /// Returns a uint hash code of a double4 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double4 v) + { + return csum(fold_to_uint(v) * uint4(0x9F1C739Bu, 0x4B1BD187u, 0x9DF50593u, 0xF18EEB85u)) + 0x9E19BFC3u; + } + + /// + /// Returns a uint4 vector hash code of a double4 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(double4 v) + { + return (fold_to_uint(v) * uint4(0x8196B06Fu, 0xD24EFA19u, 0x7D8048BBu, 0x713BD06Fu)) + 0x753AD6ADu; + } + + /// Returns the result of specified shuffling of the components from two double4 vectors into a double value. + /// double4 to use as the left argument of the shuffle operation. + /// double4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double. + /// double result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double shuffle(double4 left, double4 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two double4 vectors into a double2 vector. + /// double4 to use as the left argument of the shuffle operation. + /// double4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double2 x component. + /// The ShuffleComponent to use when setting the resulting double2 y component. + /// double2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 shuffle(double4 left, double4 right, ShuffleComponent x, ShuffleComponent y) + { + return double2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two double4 vectors into a double3 vector. + /// double4 to use as the left argument of the shuffle operation. + /// double4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double3 x component. + /// The ShuffleComponent to use when setting the resulting double3 y component. + /// The ShuffleComponent to use when setting the resulting double3 z component. + /// double3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 shuffle(double4 left, double4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return double3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two double4 vectors into a double4 vector. + /// double4 to use as the left argument of the shuffle operation. + /// double4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting double4 x component. + /// The ShuffleComponent to use when setting the resulting double4 y component. + /// The ShuffleComponent to use when setting the resulting double4 z component. + /// The ShuffleComponent to use when setting the resulting double4 w component. + /// double4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 shuffle(double4 left, double4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return double4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double select_shuffle_component(double4 a, double4 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.LeftW: + return a.w; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + case ShuffleComponent.RightW: + return b.w; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double4x2.gen.cs b/ThirdParty/Unity.Mathematics/double4x2.gen.cs new file mode 100644 index 0000000..77005ce --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double4x2.gen.cs @@ -0,0 +1,639 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x2 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double4x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double4 c0; + /// Column 1 of the matrix. + public double4 c1; + + /// double4x2 zero value. + public static readonly double4x2 zero; + + /// Constructs a double4x2 matrix from two double4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(double4 c0, double4 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a double4x2 matrix from 8 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(double m00, double m01, + double m10, double m11, + double m20, double m21, + double m30, double m31) + { + this.c0 = new double4(m00, m10, m20, m30); + this.c1 = new double4(m01, m11, m21, m31); + } + + /// Constructs a double4x2 matrix from a single double value by assigning it to every component. + /// double to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(double v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double4x2 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(bool v) + { + this.c0 = math.select(new double4(0.0), new double4(1.0), v); + this.c1 = math.select(new double4(0.0), new double4(1.0), v); + } + + /// Constructs a double4x2 matrix from a bool4x2 matrix by componentwise conversion. + /// bool4x2 to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(bool4x2 v) + { + this.c0 = math.select(new double4(0.0), new double4(1.0), v.c0); + this.c1 = math.select(new double4(0.0), new double4(1.0), v.c1); + } + + /// Constructs a double4x2 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double4x2 matrix from a int4x2 matrix by componentwise conversion. + /// int4x2 to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(int4x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a double4x2 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double4x2 matrix from a uint4x2 matrix by componentwise conversion. + /// uint4x2 to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(uint4x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a double4x2 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(float v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a double4x2 matrix from a float4x2 matrix by componentwise conversion. + /// float4x2 to convert to double4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x2(float4x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + + /// Implicitly converts a single double value to a double4x2 matrix by assigning it to every component. + /// double to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x2(double v) { return new double4x2(v); } + + /// Explicitly converts a single bool value to a double4x2 matrix by converting it to double and assigning it to every component. + /// bool to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double4x2(bool v) { return new double4x2(v); } + + /// Explicitly converts a bool4x2 matrix to a double4x2 matrix by componentwise conversion. + /// bool4x2 to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double4x2(bool4x2 v) { return new double4x2(v); } + + /// Implicitly converts a single int value to a double4x2 matrix by converting it to double and assigning it to every component. + /// int to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x2(int v) { return new double4x2(v); } + + /// Implicitly converts a int4x2 matrix to a double4x2 matrix by componentwise conversion. + /// int4x2 to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x2(int4x2 v) { return new double4x2(v); } + + /// Implicitly converts a single uint value to a double4x2 matrix by converting it to double and assigning it to every component. + /// uint to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x2(uint v) { return new double4x2(v); } + + /// Implicitly converts a uint4x2 matrix to a double4x2 matrix by componentwise conversion. + /// uint4x2 to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x2(uint4x2 v) { return new double4x2(v); } + + /// Implicitly converts a single float value to a double4x2 matrix by converting it to double and assigning it to every component. + /// float to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x2(float v) { return new double4x2(v); } + + /// Implicitly converts a float4x2 matrix to a double4x2 matrix by componentwise conversion. + /// float4x2 to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x2(float4x2 v) { return new double4x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise multiplication. + /// Right hand side double4x2 to use to compute componentwise multiplication. + /// double4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator * (double4x2 lhs, double4x2 rhs) { return new double4x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator * (double4x2 lhs, double rhs) { return new double4x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double4x2 to use to compute componentwise multiplication. + /// double4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator * (double lhs, double4x2 rhs) { return new double4x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise addition. + /// Right hand side double4x2 to use to compute componentwise addition. + /// double4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator + (double4x2 lhs, double4x2 rhs) { return new double4x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator + (double4x2 lhs, double rhs) { return new double4x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double4x2 to use to compute componentwise addition. + /// double4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator + (double lhs, double4x2 rhs) { return new double4x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise subtraction. + /// Right hand side double4x2 to use to compute componentwise subtraction. + /// double4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator - (double4x2 lhs, double4x2 rhs) { return new double4x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator - (double4x2 lhs, double rhs) { return new double4x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double4x2 to use to compute componentwise subtraction. + /// double4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator - (double lhs, double4x2 rhs) { return new double4x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise division. + /// Right hand side double4x2 to use to compute componentwise division. + /// double4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator / (double4x2 lhs, double4x2 rhs) { return new double4x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator / (double4x2 lhs, double rhs) { return new double4x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double4x2 to use to compute componentwise division. + /// double4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator / (double lhs, double4x2 rhs) { return new double4x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise modulus. + /// Right hand side double4x2 to use to compute componentwise modulus. + /// double4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator % (double4x2 lhs, double4x2 rhs) { return new double4x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator % (double4x2 lhs, double rhs) { return new double4x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double4x2 to use to compute componentwise modulus. + /// double4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator % (double lhs, double4x2 rhs) { return new double4x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a double4x2 matrix. + /// Value to use when computing the componentwise increment. + /// double4x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator ++ (double4x2 val) { return new double4x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a double4x2 matrix. + /// Value to use when computing the componentwise decrement. + /// double4x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator -- (double4x2 val) { return new double4x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise less than. + /// Right hand side double4x2 to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (double4x2 lhs, double4x2 rhs) { return new bool4x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (double4x2 lhs, double rhs) { return new bool4x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double4x2 to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (double lhs, double4x2 rhs) { return new bool4x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise less or equal. + /// Right hand side double4x2 to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (double4x2 lhs, double4x2 rhs) { return new bool4x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (double4x2 lhs, double rhs) { return new bool4x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double4x2 to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (double lhs, double4x2 rhs) { return new bool4x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise greater than. + /// Right hand side double4x2 to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (double4x2 lhs, double4x2 rhs) { return new bool4x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (double4x2 lhs, double rhs) { return new bool4x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double4x2 to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (double lhs, double4x2 rhs) { return new bool4x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise greater or equal. + /// Right hand side double4x2 to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (double4x2 lhs, double4x2 rhs) { return new bool4x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (double4x2 lhs, double rhs) { return new bool4x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double4x2 to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (double lhs, double4x2 rhs) { return new bool4x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a double4x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// double4x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator - (double4x2 val) { return new double4x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a double4x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// double4x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 operator + (double4x2 val) { return new double4x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise equality operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise equality. + /// Right hand side double4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (double4x2 lhs, double4x2 rhs) { return new bool4x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (double4x2 lhs, double rhs) { return new bool4x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (double lhs, double4x2 rhs) { return new bool4x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two double4x2 matrices. + /// Left hand side double4x2 to use to compute componentwise not equal. + /// Right hand side double4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (double4x2 lhs, double4x2 rhs) { return new bool4x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a double4x2 matrix and a double value. + /// Left hand side double4x2 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (double4x2 lhs, double rhs) { return new bool4x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double4x2 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (double lhs, double4x2 rhs) { return new bool4x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + + /// Returns the double4 element at a specified index. + unsafe public ref double4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (double4x2* array = &this) { return ref ((double4*)array)[index]; } + } + } + + /// Returns true if the double4x2 is equal to a given double4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double4x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the double4x2 is equal to a given double4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double4x2 converted && Equals(converted); } + + + /// Returns a hash code for the double4x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double4x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double4x2({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z, c0.w, c1.w); + } + + /// Returns a string representation of the double4x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double4x2({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double4x2 matrix constructed from two double4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// double4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(double4 c0, double4 c1) { return new double4x2(c0, c1); } + + /// Returns a double4x2 matrix constructed from from 8 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// double4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(double m00, double m01, + double m10, double m11, + double m20, double m21, + double m30, double m31) + { + return new double4x2(m00, m01, + m10, m11, + m20, m21, + m30, m31); + } + + /// Returns a double4x2 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(double v) { return new double4x2(v); } + + /// Returns a double4x2 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(bool v) { return new double4x2(v); } + + /// Return a double4x2 matrix constructed from a bool4x2 matrix by componentwise conversion. + /// bool4x2 to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(bool4x2 v) { return new double4x2(v); } + + /// Returns a double4x2 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(int v) { return new double4x2(v); } + + /// Return a double4x2 matrix constructed from a int4x2 matrix by componentwise conversion. + /// int4x2 to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(int4x2 v) { return new double4x2(v); } + + /// Returns a double4x2 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(uint v) { return new double4x2(v); } + + /// Return a double4x2 matrix constructed from a uint4x2 matrix by componentwise conversion. + /// uint4x2 to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(uint4x2 v) { return new double4x2(v); } + + /// Returns a double4x2 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(float v) { return new double4x2(v); } + + /// Return a double4x2 matrix constructed from a float4x2 matrix by componentwise conversion. + /// float4x2 to convert to double4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 double4x2(float4x2 v) { return new double4x2(v); } + + /// Return the double2x4 transpose of a double4x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 transpose(double4x2 v) + { + return double2x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w); + } + + /// Returns a uint hash code of a double4x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double4x2 v) + { + return csum(fold_to_uint(v.c0) * uint4(0x5AB3E8CDu, 0x676E8407u, 0xB36DE767u, 0x6FCA387Du) + + fold_to_uint(v.c1) * uint4(0xAF0F3103u, 0xE4A056C7u, 0x841D8225u, 0xC9393C7Du)) + 0xD42EAFA3u; + } + + /// + /// Returns a uint4 vector hash code of a double4x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(double4x2 v) + { + return (fold_to_uint(v.c0) * uint4(0xD9AFD06Du, 0x97A65421u, 0x7809205Fu, 0x9C9F0823u) + + fold_to_uint(v.c1) * uint4(0x5A9CA13Bu, 0xAFCDD5EFu, 0xA88D187Du, 0xCF6EBA1Du)) + 0x9D88E5A1u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double4x3.gen.cs b/ThirdParty/Unity.Mathematics/double4x3.gen.cs new file mode 100644 index 0000000..54e6cfe --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double4x3.gen.cs @@ -0,0 +1,665 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x3 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double4x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double4 c0; + /// Column 1 of the matrix. + public double4 c1; + /// Column 2 of the matrix. + public double4 c2; + + /// double4x3 zero value. + public static readonly double4x3 zero; + + /// Constructs a double4x3 matrix from three double4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(double4 c0, double4 c1, double4 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a double4x3 matrix from 12 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(double m00, double m01, double m02, + double m10, double m11, double m12, + double m20, double m21, double m22, + double m30, double m31, double m32) + { + this.c0 = new double4(m00, m10, m20, m30); + this.c1 = new double4(m01, m11, m21, m31); + this.c2 = new double4(m02, m12, m22, m32); + } + + /// Constructs a double4x3 matrix from a single double value by assigning it to every component. + /// double to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(double v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double4x3 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(bool v) + { + this.c0 = math.select(new double4(0.0), new double4(1.0), v); + this.c1 = math.select(new double4(0.0), new double4(1.0), v); + this.c2 = math.select(new double4(0.0), new double4(1.0), v); + } + + /// Constructs a double4x3 matrix from a bool4x3 matrix by componentwise conversion. + /// bool4x3 to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(bool4x3 v) + { + this.c0 = math.select(new double4(0.0), new double4(1.0), v.c0); + this.c1 = math.select(new double4(0.0), new double4(1.0), v.c1); + this.c2 = math.select(new double4(0.0), new double4(1.0), v.c2); + } + + /// Constructs a double4x3 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double4x3 matrix from a int4x3 matrix by componentwise conversion. + /// int4x3 to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(int4x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a double4x3 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double4x3 matrix from a uint4x3 matrix by componentwise conversion. + /// uint4x3 to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(uint4x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a double4x3 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a double4x3 matrix from a float4x3 matrix by componentwise conversion. + /// float4x3 to convert to double4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x3(float4x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + + /// Implicitly converts a single double value to a double4x3 matrix by assigning it to every component. + /// double to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x3(double v) { return new double4x3(v); } + + /// Explicitly converts a single bool value to a double4x3 matrix by converting it to double and assigning it to every component. + /// bool to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double4x3(bool v) { return new double4x3(v); } + + /// Explicitly converts a bool4x3 matrix to a double4x3 matrix by componentwise conversion. + /// bool4x3 to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double4x3(bool4x3 v) { return new double4x3(v); } + + /// Implicitly converts a single int value to a double4x3 matrix by converting it to double and assigning it to every component. + /// int to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x3(int v) { return new double4x3(v); } + + /// Implicitly converts a int4x3 matrix to a double4x3 matrix by componentwise conversion. + /// int4x3 to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x3(int4x3 v) { return new double4x3(v); } + + /// Implicitly converts a single uint value to a double4x3 matrix by converting it to double and assigning it to every component. + /// uint to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x3(uint v) { return new double4x3(v); } + + /// Implicitly converts a uint4x3 matrix to a double4x3 matrix by componentwise conversion. + /// uint4x3 to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x3(uint4x3 v) { return new double4x3(v); } + + /// Implicitly converts a single float value to a double4x3 matrix by converting it to double and assigning it to every component. + /// float to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x3(float v) { return new double4x3(v); } + + /// Implicitly converts a float4x3 matrix to a double4x3 matrix by componentwise conversion. + /// float4x3 to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x3(float4x3 v) { return new double4x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise multiplication. + /// Right hand side double4x3 to use to compute componentwise multiplication. + /// double4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator * (double4x3 lhs, double4x3 rhs) { return new double4x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator * (double4x3 lhs, double rhs) { return new double4x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double4x3 to use to compute componentwise multiplication. + /// double4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator * (double lhs, double4x3 rhs) { return new double4x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise addition. + /// Right hand side double4x3 to use to compute componentwise addition. + /// double4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator + (double4x3 lhs, double4x3 rhs) { return new double4x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator + (double4x3 lhs, double rhs) { return new double4x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double4x3 to use to compute componentwise addition. + /// double4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator + (double lhs, double4x3 rhs) { return new double4x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise subtraction. + /// Right hand side double4x3 to use to compute componentwise subtraction. + /// double4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator - (double4x3 lhs, double4x3 rhs) { return new double4x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator - (double4x3 lhs, double rhs) { return new double4x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double4x3 to use to compute componentwise subtraction. + /// double4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator - (double lhs, double4x3 rhs) { return new double4x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise division. + /// Right hand side double4x3 to use to compute componentwise division. + /// double4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator / (double4x3 lhs, double4x3 rhs) { return new double4x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator / (double4x3 lhs, double rhs) { return new double4x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double4x3 to use to compute componentwise division. + /// double4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator / (double lhs, double4x3 rhs) { return new double4x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise modulus. + /// Right hand side double4x3 to use to compute componentwise modulus. + /// double4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator % (double4x3 lhs, double4x3 rhs) { return new double4x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator % (double4x3 lhs, double rhs) { return new double4x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double4x3 to use to compute componentwise modulus. + /// double4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator % (double lhs, double4x3 rhs) { return new double4x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a double4x3 matrix. + /// Value to use when computing the componentwise increment. + /// double4x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator ++ (double4x3 val) { return new double4x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a double4x3 matrix. + /// Value to use when computing the componentwise decrement. + /// double4x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator -- (double4x3 val) { return new double4x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise less than. + /// Right hand side double4x3 to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (double4x3 lhs, double4x3 rhs) { return new bool4x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (double4x3 lhs, double rhs) { return new bool4x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double4x3 to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (double lhs, double4x3 rhs) { return new bool4x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise less or equal. + /// Right hand side double4x3 to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (double4x3 lhs, double4x3 rhs) { return new bool4x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (double4x3 lhs, double rhs) { return new bool4x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double4x3 to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (double lhs, double4x3 rhs) { return new bool4x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise greater than. + /// Right hand side double4x3 to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (double4x3 lhs, double4x3 rhs) { return new bool4x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (double4x3 lhs, double rhs) { return new bool4x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double4x3 to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (double lhs, double4x3 rhs) { return new bool4x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise greater or equal. + /// Right hand side double4x3 to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (double4x3 lhs, double4x3 rhs) { return new bool4x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (double4x3 lhs, double rhs) { return new bool4x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double4x3 to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (double lhs, double4x3 rhs) { return new bool4x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a double4x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// double4x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator - (double4x3 val) { return new double4x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a double4x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// double4x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 operator + (double4x3 val) { return new double4x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise equality operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise equality. + /// Right hand side double4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (double4x3 lhs, double4x3 rhs) { return new bool4x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (double4x3 lhs, double rhs) { return new bool4x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (double lhs, double4x3 rhs) { return new bool4x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two double4x3 matrices. + /// Left hand side double4x3 to use to compute componentwise not equal. + /// Right hand side double4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (double4x3 lhs, double4x3 rhs) { return new bool4x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a double4x3 matrix and a double value. + /// Left hand side double4x3 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (double4x3 lhs, double rhs) { return new bool4x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double4x3 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (double lhs, double4x3 rhs) { return new bool4x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + + /// Returns the double4 element at a specified index. + unsafe public ref double4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (double4x3* array = &this) { return ref ((double4*)array)[index]; } + } + } + + /// Returns true if the double4x3 is equal to a given double4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double4x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the double4x3 is equal to a given double4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double4x3 converted && Equals(converted); } + + + /// Returns a hash code for the double4x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double4x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double4x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z, c0.w, c1.w, c2.w); + } + + /// Returns a string representation of the double4x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double4x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider), c2.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double4x3 matrix constructed from three double4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// double4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(double4 c0, double4 c1, double4 c2) { return new double4x3(c0, c1, c2); } + + /// Returns a double4x3 matrix constructed from from 12 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// double4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(double m00, double m01, double m02, + double m10, double m11, double m12, + double m20, double m21, double m22, + double m30, double m31, double m32) + { + return new double4x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22, + m30, m31, m32); + } + + /// Returns a double4x3 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(double v) { return new double4x3(v); } + + /// Returns a double4x3 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(bool v) { return new double4x3(v); } + + /// Return a double4x3 matrix constructed from a bool4x3 matrix by componentwise conversion. + /// bool4x3 to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(bool4x3 v) { return new double4x3(v); } + + /// Returns a double4x3 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(int v) { return new double4x3(v); } + + /// Return a double4x3 matrix constructed from a int4x3 matrix by componentwise conversion. + /// int4x3 to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(int4x3 v) { return new double4x3(v); } + + /// Returns a double4x3 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(uint v) { return new double4x3(v); } + + /// Return a double4x3 matrix constructed from a uint4x3 matrix by componentwise conversion. + /// uint4x3 to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(uint4x3 v) { return new double4x3(v); } + + /// Returns a double4x3 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(float v) { return new double4x3(v); } + + /// Return a double4x3 matrix constructed from a float4x3 matrix by componentwise conversion. + /// float4x3 to convert to double4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 double4x3(float4x3 v) { return new double4x3(v); } + + /// Return the double3x4 transpose of a double4x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 transpose(double4x3 v) + { + return double3x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w); + } + + /// Returns a uint hash code of a double4x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double4x3 v) + { + return csum(fold_to_uint(v.c0) * uint4(0x7AA07CD3u, 0xAF642BA9u, 0xA8F2213Bu, 0x9F3FDC37u) + + fold_to_uint(v.c1) * uint4(0xAC60D0C3u, 0x9263662Fu, 0xE69626FFu, 0xBD010EEBu) + + fold_to_uint(v.c2) * uint4(0x9CEDE1D1u, 0x43BE0B51u, 0xAF836EE1u, 0xB130C137u)) + 0x54834775u; + } + + /// + /// Returns a uint4 vector hash code of a double4x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(double4x3 v) + { + return (fold_to_uint(v.c0) * uint4(0x7C022221u, 0xA2D00EDFu, 0xA8977779u, 0x9F1C739Bu) + + fold_to_uint(v.c1) * uint4(0x4B1BD187u, 0x9DF50593u, 0xF18EEB85u, 0x9E19BFC3u) + + fold_to_uint(v.c2) * uint4(0x8196B06Fu, 0xD24EFA19u, 0x7D8048BBu, 0x713BD06Fu)) + 0x753AD6ADu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/double4x4.gen.cs b/ThirdParty/Unity.Mathematics/double4x4.gen.cs new file mode 100644 index 0000000..1380a77 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/double4x4.gen.cs @@ -0,0 +1,824 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x4 matrix of doubles. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct double4x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public double4 c0; + /// Column 1 of the matrix. + public double4 c1; + /// Column 2 of the matrix. + public double4 c2; + /// Column 3 of the matrix. + public double4 c3; + + /// double4x4 identity transform. + public static readonly double4x4 identity = new double4x4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0); + + /// double4x4 zero value. + public static readonly double4x4 zero; + + /// Constructs a double4x4 matrix from four double4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(double4 c0, double4 c1, double4 c2, double4 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a double4x4 matrix from 16 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(double m00, double m01, double m02, double m03, + double m10, double m11, double m12, double m13, + double m20, double m21, double m22, double m23, + double m30, double m31, double m32, double m33) + { + this.c0 = new double4(m00, m10, m20, m30); + this.c1 = new double4(m01, m11, m21, m31); + this.c2 = new double4(m02, m12, m22, m32); + this.c3 = new double4(m03, m13, m23, m33); + } + + /// Constructs a double4x4 matrix from a single double value by assigning it to every component. + /// double to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(double v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double4x4 matrix from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(bool v) + { + this.c0 = math.select(new double4(0.0), new double4(1.0), v); + this.c1 = math.select(new double4(0.0), new double4(1.0), v); + this.c2 = math.select(new double4(0.0), new double4(1.0), v); + this.c3 = math.select(new double4(0.0), new double4(1.0), v); + } + + /// Constructs a double4x4 matrix from a bool4x4 matrix by componentwise conversion. + /// bool4x4 to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(bool4x4 v) + { + this.c0 = math.select(new double4(0.0), new double4(1.0), v.c0); + this.c1 = math.select(new double4(0.0), new double4(1.0), v.c1); + this.c2 = math.select(new double4(0.0), new double4(1.0), v.c2); + this.c3 = math.select(new double4(0.0), new double4(1.0), v.c3); + } + + /// Constructs a double4x4 matrix from a single int value by converting it to double and assigning it to every component. + /// int to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double4x4 matrix from a int4x4 matrix by componentwise conversion. + /// int4x4 to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(int4x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a double4x4 matrix from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double4x4 matrix from a uint4x4 matrix by componentwise conversion. + /// uint4x4 to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(uint4x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a double4x4 matrix from a single float value by converting it to double and assigning it to every component. + /// float to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a double4x4 matrix from a float4x4 matrix by componentwise conversion. + /// float4x4 to convert to double4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4x4(float4x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + + /// Implicitly converts a single double value to a double4x4 matrix by assigning it to every component. + /// double to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x4(double v) { return new double4x4(v); } + + /// Explicitly converts a single bool value to a double4x4 matrix by converting it to double and assigning it to every component. + /// bool to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double4x4(bool v) { return new double4x4(v); } + + /// Explicitly converts a bool4x4 matrix to a double4x4 matrix by componentwise conversion. + /// bool4x4 to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator double4x4(bool4x4 v) { return new double4x4(v); } + + /// Implicitly converts a single int value to a double4x4 matrix by converting it to double and assigning it to every component. + /// int to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x4(int v) { return new double4x4(v); } + + /// Implicitly converts a int4x4 matrix to a double4x4 matrix by componentwise conversion. + /// int4x4 to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x4(int4x4 v) { return new double4x4(v); } + + /// Implicitly converts a single uint value to a double4x4 matrix by converting it to double and assigning it to every component. + /// uint to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x4(uint v) { return new double4x4(v); } + + /// Implicitly converts a uint4x4 matrix to a double4x4 matrix by componentwise conversion. + /// uint4x4 to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x4(uint4x4 v) { return new double4x4(v); } + + /// Implicitly converts a single float value to a double4x4 matrix by converting it to double and assigning it to every component. + /// float to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x4(float v) { return new double4x4(v); } + + /// Implicitly converts a float4x4 matrix to a double4x4 matrix by componentwise conversion. + /// float4x4 to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double4x4(float4x4 v) { return new double4x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise multiplication. + /// Right hand side double4x4 to use to compute componentwise multiplication. + /// double4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator * (double4x4 lhs, double4x4 rhs) { return new double4x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise multiplication. + /// Right hand side double to use to compute componentwise multiplication. + /// double4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator * (double4x4 lhs, double rhs) { return new double4x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise multiplication. + /// Right hand side double4x4 to use to compute componentwise multiplication. + /// double4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator * (double lhs, double4x4 rhs) { return new double4x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise addition. + /// Right hand side double4x4 to use to compute componentwise addition. + /// double4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator + (double4x4 lhs, double4x4 rhs) { return new double4x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise addition. + /// Right hand side double to use to compute componentwise addition. + /// double4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator + (double4x4 lhs, double rhs) { return new double4x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise addition. + /// Right hand side double4x4 to use to compute componentwise addition. + /// double4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator + (double lhs, double4x4 rhs) { return new double4x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise subtraction. + /// Right hand side double4x4 to use to compute componentwise subtraction. + /// double4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator - (double4x4 lhs, double4x4 rhs) { return new double4x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise subtraction. + /// Right hand side double to use to compute componentwise subtraction. + /// double4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator - (double4x4 lhs, double rhs) { return new double4x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise subtraction. + /// Right hand side double4x4 to use to compute componentwise subtraction. + /// double4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator - (double lhs, double4x4 rhs) { return new double4x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise division. + /// Right hand side double4x4 to use to compute componentwise division. + /// double4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator / (double4x4 lhs, double4x4 rhs) { return new double4x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise division. + /// Right hand side double to use to compute componentwise division. + /// double4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator / (double4x4 lhs, double rhs) { return new double4x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise division. + /// Right hand side double4x4 to use to compute componentwise division. + /// double4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator / (double lhs, double4x4 rhs) { return new double4x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise modulus. + /// Right hand side double4x4 to use to compute componentwise modulus. + /// double4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator % (double4x4 lhs, double4x4 rhs) { return new double4x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise modulus. + /// Right hand side double to use to compute componentwise modulus. + /// double4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator % (double4x4 lhs, double rhs) { return new double4x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise modulus. + /// Right hand side double4x4 to use to compute componentwise modulus. + /// double4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator % (double lhs, double4x4 rhs) { return new double4x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a double4x4 matrix. + /// Value to use when computing the componentwise increment. + /// double4x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator ++ (double4x4 val) { return new double4x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a double4x4 matrix. + /// Value to use when computing the componentwise decrement. + /// double4x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator -- (double4x4 val) { return new double4x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise less than. + /// Right hand side double4x4 to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (double4x4 lhs, double4x4 rhs) { return new bool4x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise less than. + /// Right hand side double to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (double4x4 lhs, double rhs) { return new bool4x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise less than. + /// Right hand side double4x4 to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (double lhs, double4x4 rhs) { return new bool4x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise less or equal. + /// Right hand side double4x4 to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (double4x4 lhs, double4x4 rhs) { return new bool4x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise less or equal. + /// Right hand side double to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (double4x4 lhs, double rhs) { return new bool4x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise less or equal. + /// Right hand side double4x4 to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (double lhs, double4x4 rhs) { return new bool4x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise greater than. + /// Right hand side double4x4 to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (double4x4 lhs, double4x4 rhs) { return new bool4x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise greater than. + /// Right hand side double to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (double4x4 lhs, double rhs) { return new bool4x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise greater than. + /// Right hand side double4x4 to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (double lhs, double4x4 rhs) { return new bool4x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise greater or equal. + /// Right hand side double4x4 to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (double4x4 lhs, double4x4 rhs) { return new bool4x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise greater or equal. + /// Right hand side double to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (double4x4 lhs, double rhs) { return new bool4x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise greater or equal. + /// Right hand side double4x4 to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (double lhs, double4x4 rhs) { return new bool4x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a double4x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// double4x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator - (double4x4 val) { return new double4x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a double4x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// double4x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 operator + (double4x4 val) { return new double4x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise equality operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise equality. + /// Right hand side double4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (double4x4 lhs, double4x4 rhs) { return new bool4x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise equality. + /// Right hand side double to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (double4x4 lhs, double rhs) { return new bool4x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise equality. + /// Right hand side double4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (double lhs, double4x4 rhs) { return new bool4x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two double4x4 matrices. + /// Left hand side double4x4 to use to compute componentwise not equal. + /// Right hand side double4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (double4x4 lhs, double4x4 rhs) { return new bool4x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a double4x4 matrix and a double value. + /// Left hand side double4x4 to use to compute componentwise not equal. + /// Right hand side double to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (double4x4 lhs, double rhs) { return new bool4x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a double value and a double4x4 matrix. + /// Left hand side double to use to compute componentwise not equal. + /// Right hand side double4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (double lhs, double4x4 rhs) { return new bool4x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + + /// Returns the double4 element at a specified index. + unsafe public ref double4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (double4x4* array = &this) { return ref ((double4*)array)[index]; } + } + } + + /// Returns true if the double4x4 is equal to a given double4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(double4x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the double4x4 is equal to a given double4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is double4x4 converted && Equals(converted); } + + + /// Returns a hash code for the double4x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the double4x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("double4x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z, c0.w, c1.w, c2.w, c3.w); + } + + /// Returns a string representation of the double4x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("double4x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c3.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider), c2.w.ToString(format, formatProvider), c3.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a double4x4 matrix constructed from four double4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// double4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(double4 c0, double4 c1, double4 c2, double4 c3) { return new double4x4(c0, c1, c2, c3); } + + /// Returns a double4x4 matrix constructed from from 16 double values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + /// double4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(double m00, double m01, double m02, double m03, + double m10, double m11, double m12, double m13, + double m20, double m21, double m22, double m23, + double m30, double m31, double m32, double m33) + { + return new double4x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23, + m30, m31, m32, m33); + } + + /// Returns a double4x4 matrix constructed from a single double value by assigning it to every component. + /// double to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(double v) { return new double4x4(v); } + + /// Returns a double4x4 matrix constructed from a single bool value by converting it to double and assigning it to every component. + /// bool to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(bool v) { return new double4x4(v); } + + /// Return a double4x4 matrix constructed from a bool4x4 matrix by componentwise conversion. + /// bool4x4 to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(bool4x4 v) { return new double4x4(v); } + + /// Returns a double4x4 matrix constructed from a single int value by converting it to double and assigning it to every component. + /// int to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(int v) { return new double4x4(v); } + + /// Return a double4x4 matrix constructed from a int4x4 matrix by componentwise conversion. + /// int4x4 to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(int4x4 v) { return new double4x4(v); } + + /// Returns a double4x4 matrix constructed from a single uint value by converting it to double and assigning it to every component. + /// uint to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(uint v) { return new double4x4(v); } + + /// Return a double4x4 matrix constructed from a uint4x4 matrix by componentwise conversion. + /// uint4x4 to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(uint4x4 v) { return new double4x4(v); } + + /// Returns a double4x4 matrix constructed from a single float value by converting it to double and assigning it to every component. + /// float to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(float v) { return new double4x4(v); } + + /// Return a double4x4 matrix constructed from a float4x4 matrix by componentwise conversion. + /// float4x4 to convert to double4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 double4x4(float4x4 v) { return new double4x4(v); } + + /// Return the result of rotating a double3 vector by a double4x4 matrix + /// Left hand side matrix argument that specifies the rotation. + /// Right hand side vector argument to be rotated. + /// The rotated vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 rotate(double4x4 a, double3 b) + { + return (a.c0 * b.x + a.c1 * b.y + a.c2 * b.z).xyz; + } + + /// Return the result of transforming a double3 point by a double4x4 matrix + /// Left hand side matrix argument that specifies the transformation. + /// Right hand side point argument to be transformed. + /// The transformed point. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 transform(double4x4 a, double3 b) + { + return (a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3).xyz; + } + + /// Return the double4x4 transpose of a double4x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 transpose(double4x4 v) + { + return double4x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w, + v.c3.x, v.c3.y, v.c3.z, v.c3.w); + } + + /// Returns the double4x4 full inverse of a double4x4 matrix. + /// Matrix to invert. + /// The inverted matrix. + public static double4x4 inverse(double4x4 m) + { + double4 c0 = m.c0; + double4 c1 = m.c1; + double4 c2 = m.c2; + double4 c3 = m.c3; + + double4 r0y_r1y_r0x_r1x = movelh(c1, c0); + double4 r0z_r1z_r0w_r1w = movelh(c2, c3); + double4 r2y_r3y_r2x_r3x = movehl(c0, c1); + double4 r2z_r3z_r2w_r3w = movehl(c3, c2); + + double4 r1y_r2y_r1x_r2x = shuffle(c1, c0, ShuffleComponent.LeftY, ShuffleComponent.LeftZ, ShuffleComponent.RightY, ShuffleComponent.RightZ); + double4 r1z_r2z_r1w_r2w = shuffle(c2, c3, ShuffleComponent.LeftY, ShuffleComponent.LeftZ, ShuffleComponent.RightY, ShuffleComponent.RightZ); + double4 r3y_r0y_r3x_r0x = shuffle(c1, c0, ShuffleComponent.LeftW, ShuffleComponent.LeftX, ShuffleComponent.RightW, ShuffleComponent.RightX); + double4 r3z_r0z_r3w_r0w = shuffle(c2, c3, ShuffleComponent.LeftW, ShuffleComponent.LeftX, ShuffleComponent.RightW, ShuffleComponent.RightX); + + double4 r0_wzyx = shuffle(r0z_r1z_r0w_r1w, r0y_r1y_r0x_r1x, ShuffleComponent.LeftZ, ShuffleComponent.LeftX, ShuffleComponent.RightX, ShuffleComponent.RightZ); + double4 r1_wzyx = shuffle(r0z_r1z_r0w_r1w, r0y_r1y_r0x_r1x, ShuffleComponent.LeftW, ShuffleComponent.LeftY, ShuffleComponent.RightY, ShuffleComponent.RightW); + double4 r2_wzyx = shuffle(r2z_r3z_r2w_r3w, r2y_r3y_r2x_r3x, ShuffleComponent.LeftZ, ShuffleComponent.LeftX, ShuffleComponent.RightX, ShuffleComponent.RightZ); + double4 r3_wzyx = shuffle(r2z_r3z_r2w_r3w, r2y_r3y_r2x_r3x, ShuffleComponent.LeftW, ShuffleComponent.LeftY, ShuffleComponent.RightY, ShuffleComponent.RightW); + double4 r0_xyzw = shuffle(r0y_r1y_r0x_r1x, r0z_r1z_r0w_r1w, ShuffleComponent.LeftZ, ShuffleComponent.LeftX, ShuffleComponent.RightX, ShuffleComponent.RightZ); + + // Calculate remaining inner term pairs. inner terms have zw=-xy, so we only have to calculate xy and can pack two pairs per vector. + double4 inner12_23 = r1y_r2y_r1x_r2x * r2z_r3z_r2w_r3w - r1z_r2z_r1w_r2w * r2y_r3y_r2x_r3x; + double4 inner02_13 = r0y_r1y_r0x_r1x * r2z_r3z_r2w_r3w - r0z_r1z_r0w_r1w * r2y_r3y_r2x_r3x; + double4 inner30_01 = r3z_r0z_r3w_r0w * r0y_r1y_r0x_r1x - r3y_r0y_r3x_r0x * r0z_r1z_r0w_r1w; + + // Expand inner terms back to 4 components. zw signs still need to be flipped + double4 inner12 = shuffle(inner12_23, inner12_23, ShuffleComponent.LeftX, ShuffleComponent.LeftZ, ShuffleComponent.RightZ, ShuffleComponent.RightX); + double4 inner23 = shuffle(inner12_23, inner12_23, ShuffleComponent.LeftY, ShuffleComponent.LeftW, ShuffleComponent.RightW, ShuffleComponent.RightY); + + double4 inner02 = shuffle(inner02_13, inner02_13, ShuffleComponent.LeftX, ShuffleComponent.LeftZ, ShuffleComponent.RightZ, ShuffleComponent.RightX); + double4 inner13 = shuffle(inner02_13, inner02_13, ShuffleComponent.LeftY, ShuffleComponent.LeftW, ShuffleComponent.RightW, ShuffleComponent.RightY); + + // Calculate minors + double4 minors0 = r3_wzyx * inner12 - r2_wzyx * inner13 + r1_wzyx * inner23; + + double4 denom = r0_xyzw * minors0; + + // Horizontal sum of denominator. Free sign flip of z and w compensates for missing flip in inner terms. + denom = denom + shuffle(denom, denom, ShuffleComponent.LeftY, ShuffleComponent.LeftX, ShuffleComponent.RightW, ShuffleComponent.RightZ); // x+y x+y z+w z+w + denom = denom - shuffle(denom, denom, ShuffleComponent.LeftZ, ShuffleComponent.LeftZ, ShuffleComponent.RightX, ShuffleComponent.RightX); // x+y-z-w x+y-z-w z+w-x-y z+w-x-y + + double4 rcp_denom_ppnn = double4(1.0) / denom; + double4x4 res; + res.c0 = minors0 * rcp_denom_ppnn; + + double4 inner30 = shuffle(inner30_01, inner30_01, ShuffleComponent.LeftX, ShuffleComponent.LeftZ, ShuffleComponent.RightZ, ShuffleComponent.RightX); + double4 inner01 = shuffle(inner30_01, inner30_01, ShuffleComponent.LeftY, ShuffleComponent.LeftW, ShuffleComponent.RightW, ShuffleComponent.RightY); + + double4 minors1 = r2_wzyx * inner30 - r0_wzyx * inner23 - r3_wzyx * inner02; + res.c1 = minors1 * rcp_denom_ppnn; + + double4 minors2 = r0_wzyx * inner13 - r1_wzyx * inner30 - r3_wzyx * inner01; + res.c2 = minors2 * rcp_denom_ppnn; + + double4 minors3 = r1_wzyx * inner02 - r0_wzyx * inner12 + r2_wzyx * inner01; + res.c3 = minors3 * rcp_denom_ppnn; + return res; + } + + /// Fast matrix inverse for rigid transforms (orthonormal basis and translation) + /// Matrix to invert. + /// The inverted matrix. + public static double4x4 fastinverse(double4x4 m) + { + double4 c0 = m.c0; + double4 c1 = m.c1; + double4 c2 = m.c2; + double4 pos = m.c3; + + double4 zero = double4(0); + + double4 t0 = unpacklo(c0, c2); + double4 t1 = unpacklo(c1, zero); + double4 t2 = unpackhi(c0, c2); + double4 t3 = unpackhi(c1, zero); + + double4 r0 = unpacklo(t0, t1); + double4 r1 = unpackhi(t0, t1); + double4 r2 = unpacklo(t2, t3); + + pos = -(r0 * pos.x + r1 * pos.y + r2 * pos.z); + pos.w = 1.0f; + + return double4x4(r0, r1, r2, pos); + } + + /// Returns the determinant of a double4x4 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + public static double determinant(double4x4 m) + { + double4 c0 = m.c0; + double4 c1 = m.c1; + double4 c2 = m.c2; + double4 c3 = m.c3; + + double m00 = c1.y * (c2.z * c3.w - c2.w * c3.z) - c2.y * (c1.z * c3.w - c1.w * c3.z) + c3.y * (c1.z * c2.w - c1.w * c2.z); + double m01 = c0.y * (c2.z * c3.w - c2.w * c3.z) - c2.y * (c0.z * c3.w - c0.w * c3.z) + c3.y * (c0.z * c2.w - c0.w * c2.z); + double m02 = c0.y * (c1.z * c3.w - c1.w * c3.z) - c1.y * (c0.z * c3.w - c0.w * c3.z) + c3.y * (c0.z * c1.w - c0.w * c1.z); + double m03 = c0.y * (c1.z * c2.w - c1.w * c2.z) - c1.y * (c0.z * c2.w - c0.w * c2.z) + c2.y * (c0.z * c1.w - c0.w * c1.z); + + return c0.x * m00 - c1.x * m01 + c2.x * m02 - c3.x * m03; + } + + /// Returns a uint hash code of a double4x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(double4x4 v) + { + return csum(fold_to_uint(v.c0) * uint4(0x4DDC6509u, 0x7CF083CBu, 0x5C4D6CEDu, 0xF9137117u) + + fold_to_uint(v.c1) * uint4(0xE857DCE1u, 0xF62213C5u, 0x9CDAA959u, 0xAA269ABFu) + + fold_to_uint(v.c2) * uint4(0xD54BA36Fu, 0xFD0847B9u, 0x8189A683u, 0xB139D651u) + + fold_to_uint(v.c3) * uint4(0xE7579997u, 0xEF7D56C7u, 0x66F38F0Bu, 0x624256A3u)) + 0x5292ADE1u; + } + + /// + /// Returns a uint4 vector hash code of a double4x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(double4x4 v) + { + return (fold_to_uint(v.c0) * uint4(0xD2E590E5u, 0xF25BE857u, 0x9BC17CE7u, 0xC8B86851u) + + fold_to_uint(v.c1) * uint4(0x64095221u, 0xADF428FFu, 0xA3977109u, 0x745ED837u) + + fold_to_uint(v.c2) * uint4(0x9CDC88F5u, 0xFA62D721u, 0x7E4DB1CFu, 0x68EEE0F5u) + + fold_to_uint(v.c3) * uint4(0xBC3B0A59u, 0x816EFB5Du, 0xA24E82B7u, 0x45A22087u)) + 0xFC104C3Bu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float2.gen.cs b/ThirdParty/Unity.Mathematics/float2.gen.cs new file mode 100644 index 0000000..f935949 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float2.gen.cs @@ -0,0 +1,998 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2 component vector of floats. + [DebuggerTypeProxy(typeof(float2.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float2 : System.IEquatable, IFormattable + { + /// x component of the vector. + public float x; + /// y component of the vector. + public float y; + + /// float2 zero value. + public static readonly float2 zero; + + /// Constructs a float2 vector from two float values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(float x, float y) + { + this.x = x; + this.y = y; + } + + /// Constructs a float2 vector from a float2 vector. + /// The constructed vector's xy components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(float2 xy) + { + this.x = xy.x; + this.y = xy.y; + } + + /// Constructs a float2 vector from a single float value by assigning it to every component. + /// float to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(float v) + { + this.x = v; + this.y = v; + } + + /// Constructs a float2 vector from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(bool v) + { + this.x = v ? 1.0f : 0.0f; + this.y = v ? 1.0f : 0.0f; + } + + /// Constructs a float2 vector from a bool2 vector by componentwise conversion. + /// bool2 to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(bool2 v) + { + this.x = v.x ? 1.0f : 0.0f; + this.y = v.y ? 1.0f : 0.0f; + } + + /// Constructs a float2 vector from a single int value by converting it to float and assigning it to every component. + /// int to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(int v) + { + this.x = v; + this.y = v; + } + + /// Constructs a float2 vector from a int2 vector by componentwise conversion. + /// int2 to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(int2 v) + { + this.x = v.x; + this.y = v.y; + } + + /// Constructs a float2 vector from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(uint v) + { + this.x = v; + this.y = v; + } + + /// Constructs a float2 vector from a uint2 vector by componentwise conversion. + /// uint2 to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(uint2 v) + { + this.x = v.x; + this.y = v.y; + } + + /// Constructs a float2 vector from a single half value by converting it to float and assigning it to every component. + /// half to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(half v) + { + this.x = v; + this.y = v; + } + + /// Constructs a float2 vector from a half2 vector by componentwise conversion. + /// half2 to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(half2 v) + { + this.x = v.x; + this.y = v.y; + } + + /// Constructs a float2 vector from a single double value by converting it to float and assigning it to every component. + /// double to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(double v) + { + this.x = (float)v; + this.y = (float)v; + } + + /// Constructs a float2 vector from a double2 vector by componentwise conversion. + /// double2 to convert to float2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2(double2 v) + { + this.x = (float)v.x; + this.y = (float)v.y; + } + + + /// Implicitly converts a single float value to a float2 vector by assigning it to every component. + /// float to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2(float v) { return new float2(v); } + + /// Explicitly converts a single bool value to a float2 vector by converting it to float and assigning it to every component. + /// bool to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2(bool v) { return new float2(v); } + + /// Explicitly converts a bool2 vector to a float2 vector by componentwise conversion. + /// bool2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2(bool2 v) { return new float2(v); } + + /// Implicitly converts a single int value to a float2 vector by converting it to float and assigning it to every component. + /// int to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2(int v) { return new float2(v); } + + /// Implicitly converts a int2 vector to a float2 vector by componentwise conversion. + /// int2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2(int2 v) { return new float2(v); } + + /// Implicitly converts a single uint value to a float2 vector by converting it to float and assigning it to every component. + /// uint to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2(uint v) { return new float2(v); } + + /// Implicitly converts a uint2 vector to a float2 vector by componentwise conversion. + /// uint2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2(uint2 v) { return new float2(v); } + + /// Implicitly converts a single half value to a float2 vector by converting it to float and assigning it to every component. + /// half to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2(half v) { return new float2(v); } + + /// Implicitly converts a half2 vector to a float2 vector by componentwise conversion. + /// half2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2(half2 v) { return new float2(v); } + + /// Explicitly converts a single double value to a float2 vector by converting it to float and assigning it to every component. + /// double to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2(double v) { return new float2(v); } + + /// Explicitly converts a double2 vector to a float2 vector by componentwise conversion. + /// double2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2(double2 v) { return new float2(v); } + + + /// Returns the result of a componentwise multiplication operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise multiplication. + /// Right hand side float2 to use to compute componentwise multiplication. + /// float2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator * (float2 lhs, float2 rhs) { return new float2 (lhs.x * rhs.x, lhs.y * rhs.y); } + + /// Returns the result of a componentwise multiplication operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator * (float2 lhs, float rhs) { return new float2 (lhs.x * rhs, lhs.y * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float2 to use to compute componentwise multiplication. + /// float2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator * (float lhs, float2 rhs) { return new float2 (lhs * rhs.x, lhs * rhs.y); } + + + /// Returns the result of a componentwise addition operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise addition. + /// Right hand side float2 to use to compute componentwise addition. + /// float2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator + (float2 lhs, float2 rhs) { return new float2 (lhs.x + rhs.x, lhs.y + rhs.y); } + + /// Returns the result of a componentwise addition operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator + (float2 lhs, float rhs) { return new float2 (lhs.x + rhs, lhs.y + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float2 to use to compute componentwise addition. + /// float2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator + (float lhs, float2 rhs) { return new float2 (lhs + rhs.x, lhs + rhs.y); } + + + /// Returns the result of a componentwise subtraction operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise subtraction. + /// Right hand side float2 to use to compute componentwise subtraction. + /// float2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator - (float2 lhs, float2 rhs) { return new float2 (lhs.x - rhs.x, lhs.y - rhs.y); } + + /// Returns the result of a componentwise subtraction operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator - (float2 lhs, float rhs) { return new float2 (lhs.x - rhs, lhs.y - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float2 to use to compute componentwise subtraction. + /// float2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator - (float lhs, float2 rhs) { return new float2 (lhs - rhs.x, lhs - rhs.y); } + + + /// Returns the result of a componentwise division operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise division. + /// Right hand side float2 to use to compute componentwise division. + /// float2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator / (float2 lhs, float2 rhs) { return new float2 (lhs.x / rhs.x, lhs.y / rhs.y); } + + /// Returns the result of a componentwise division operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator / (float2 lhs, float rhs) { return new float2 (lhs.x / rhs, lhs.y / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float2 to use to compute componentwise division. + /// float2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator / (float lhs, float2 rhs) { return new float2 (lhs / rhs.x, lhs / rhs.y); } + + + /// Returns the result of a componentwise modulus operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise modulus. + /// Right hand side float2 to use to compute componentwise modulus. + /// float2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator % (float2 lhs, float2 rhs) { return new float2 (lhs.x % rhs.x, lhs.y % rhs.y); } + + /// Returns the result of a componentwise modulus operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator % (float2 lhs, float rhs) { return new float2 (lhs.x % rhs, lhs.y % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float2 to use to compute componentwise modulus. + /// float2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator % (float lhs, float2 rhs) { return new float2 (lhs % rhs.x, lhs % rhs.y); } + + + /// Returns the result of a componentwise increment operation on a float2 vector. + /// Value to use when computing the componentwise increment. + /// float2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator ++ (float2 val) { return new float2 (++val.x, ++val.y); } + + + /// Returns the result of a componentwise decrement operation on a float2 vector. + /// Value to use when computing the componentwise decrement. + /// float2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator -- (float2 val) { return new float2 (--val.x, --val.y); } + + + /// Returns the result of a componentwise less than operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise less than. + /// Right hand side float2 to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (float2 lhs, float2 rhs) { return new bool2 (lhs.x < rhs.x, lhs.y < rhs.y); } + + /// Returns the result of a componentwise less than operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (float2 lhs, float rhs) { return new bool2 (lhs.x < rhs, lhs.y < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float2 to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (float lhs, float2 rhs) { return new bool2 (lhs < rhs.x, lhs < rhs.y); } + + + /// Returns the result of a componentwise less or equal operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise less or equal. + /// Right hand side float2 to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (float2 lhs, float2 rhs) { return new bool2 (lhs.x <= rhs.x, lhs.y <= rhs.y); } + + /// Returns the result of a componentwise less or equal operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (float2 lhs, float rhs) { return new bool2 (lhs.x <= rhs, lhs.y <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float2 to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (float lhs, float2 rhs) { return new bool2 (lhs <= rhs.x, lhs <= rhs.y); } + + + /// Returns the result of a componentwise greater than operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise greater than. + /// Right hand side float2 to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (float2 lhs, float2 rhs) { return new bool2 (lhs.x > rhs.x, lhs.y > rhs.y); } + + /// Returns the result of a componentwise greater than operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (float2 lhs, float rhs) { return new bool2 (lhs.x > rhs, lhs.y > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float2 to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (float lhs, float2 rhs) { return new bool2 (lhs > rhs.x, lhs > rhs.y); } + + + /// Returns the result of a componentwise greater or equal operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise greater or equal. + /// Right hand side float2 to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (float2 lhs, float2 rhs) { return new bool2 (lhs.x >= rhs.x, lhs.y >= rhs.y); } + + /// Returns the result of a componentwise greater or equal operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (float2 lhs, float rhs) { return new bool2 (lhs.x >= rhs, lhs.y >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float2 to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (float lhs, float2 rhs) { return new bool2 (lhs >= rhs.x, lhs >= rhs.y); } + + + /// Returns the result of a componentwise unary minus operation on a float2 vector. + /// Value to use when computing the componentwise unary minus. + /// float2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator - (float2 val) { return new float2 (-val.x, -val.y); } + + + /// Returns the result of a componentwise unary plus operation on a float2 vector. + /// Value to use when computing the componentwise unary plus. + /// float2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 operator + (float2 val) { return new float2 (+val.x, +val.y); } + + + /// Returns the result of a componentwise equality operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise equality. + /// Right hand side float2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (float2 lhs, float2 rhs) { return new bool2 (lhs.x == rhs.x, lhs.y == rhs.y); } + + /// Returns the result of a componentwise equality operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (float2 lhs, float rhs) { return new bool2 (lhs.x == rhs, lhs.y == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (float lhs, float2 rhs) { return new bool2 (lhs == rhs.x, lhs == rhs.y); } + + + /// Returns the result of a componentwise not equal operation on two float2 vectors. + /// Left hand side float2 to use to compute componentwise not equal. + /// Right hand side float2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (float2 lhs, float2 rhs) { return new bool2 (lhs.x != rhs.x, lhs.y != rhs.y); } + + /// Returns the result of a componentwise not equal operation on a float2 vector and a float value. + /// Left hand side float2 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (float2 lhs, float rhs) { return new bool2 (lhs.x != rhs, lhs.y != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float2 vector. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (float lhs, float2 rhs) { return new bool2 (lhs != rhs.x, lhs != rhs.y); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, y); } + } + + + + /// Returns the float element at a specified index. + unsafe public float this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (float2* array = &this) { return ((float*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (float* array = &x) { array[index] = value; } + } + } + + /// Returns true if the float2 is equal to a given float2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float2 rhs) { return x == rhs.x && y == rhs.y; } + + /// Returns true if the float2 is equal to a given float2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float2 converted && Equals(converted); } + + + /// Returns a hash code for the float2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float2({0}f, {1}f)", x, y); + } + + /// Returns a string representation of the float2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float2({0}f, {1}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public float x; + public float y; + public DebuggerProxy(float2 v) + { + x = v.x; + y = v.y; + } + } + + } + + public static partial class math + { + /// Returns a float2 vector constructed from two float values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// float2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(float x, float y) { return new float2(x, y); } + + /// Returns a float2 vector constructed from a float2 vector. + /// The constructed vector's xy components will be set to this value. + /// float2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(float2 xy) { return new float2(xy); } + + /// Returns a float2 vector constructed from a single float value by assigning it to every component. + /// float to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(float v) { return new float2(v); } + + /// Returns a float2 vector constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(bool v) { return new float2(v); } + + /// Return a float2 vector constructed from a bool2 vector by componentwise conversion. + /// bool2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(bool2 v) { return new float2(v); } + + /// Returns a float2 vector constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(int v) { return new float2(v); } + + /// Return a float2 vector constructed from a int2 vector by componentwise conversion. + /// int2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(int2 v) { return new float2(v); } + + /// Returns a float2 vector constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(uint v) { return new float2(v); } + + /// Return a float2 vector constructed from a uint2 vector by componentwise conversion. + /// uint2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(uint2 v) { return new float2(v); } + + /// Returns a float2 vector constructed from a single half value by converting it to float and assigning it to every component. + /// half to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(half v) { return new float2(v); } + + /// Return a float2 vector constructed from a half2 vector by componentwise conversion. + /// half2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(half2 v) { return new float2(v); } + + /// Returns a float2 vector constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(double v) { return new float2(v); } + + /// Return a float2 vector constructed from a double2 vector by componentwise conversion. + /// double2 to convert to float2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 float2(double2 v) { return new float2(v); } + + /// Returns a uint hash code of a float2 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float2 v) + { + return csum(asuint(v) * uint2(0xFA3A3285u, 0xAD55999Du)) + 0xDCDD5341u; + } + + /// + /// Returns a uint2 vector hash code of a float2 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(float2 v) + { + return (asuint(v) * uint2(0x94DDD769u, 0xA1E92D39u)) + 0x4583C801u; + } + + /// Returns the result of specified shuffling of the components from two float2 vectors into a float value. + /// float2 to use as the left argument of the shuffle operation. + /// float2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float. + /// float result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float shuffle(float2 left, float2 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two float2 vectors into a float2 vector. + /// float2 to use as the left argument of the shuffle operation. + /// float2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float2 x component. + /// The ShuffleComponent to use when setting the resulting float2 y component. + /// float2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 shuffle(float2 left, float2 right, ShuffleComponent x, ShuffleComponent y) + { + return float2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two float2 vectors into a float3 vector. + /// float2 to use as the left argument of the shuffle operation. + /// float2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float3 x component. + /// The ShuffleComponent to use when setting the resulting float3 y component. + /// The ShuffleComponent to use when setting the resulting float3 z component. + /// float3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 shuffle(float2 left, float2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return float3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two float2 vectors into a float4 vector. + /// float2 to use as the left argument of the shuffle operation. + /// float2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float4 x component. + /// The ShuffleComponent to use when setting the resulting float4 y component. + /// The ShuffleComponent to use when setting the resulting float4 z component. + /// The ShuffleComponent to use when setting the resulting float4 w component. + /// float4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 shuffle(float2 left, float2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return float4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float select_shuffle_component(float2 a, float2 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float2x2.gen.cs b/ThirdParty/Unity.Mathematics/float2x2.gen.cs new file mode 100644 index 0000000..b4d8807 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float2x2.gen.cs @@ -0,0 +1,658 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x2 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float2x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float2 c0; + /// Column 1 of the matrix. + public float2 c1; + + /// float2x2 identity transform. + public static readonly float2x2 identity = new float2x2(1.0f, 0.0f, 0.0f, 1.0f); + + /// float2x2 zero value. + public static readonly float2x2 zero; + + /// Constructs a float2x2 matrix from two float2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(float2 c0, float2 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a float2x2 matrix from 4 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(float m00, float m01, + float m10, float m11) + { + this.c0 = new float2(m00, m10); + this.c1 = new float2(m01, m11); + } + + /// Constructs a float2x2 matrix from a single float value by assigning it to every component. + /// float to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(float v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float2x2 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(bool v) + { + this.c0 = math.select(new float2(0.0f), new float2(1.0f), v); + this.c1 = math.select(new float2(0.0f), new float2(1.0f), v); + } + + /// Constructs a float2x2 matrix from a bool2x2 matrix by componentwise conversion. + /// bool2x2 to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(bool2x2 v) + { + this.c0 = math.select(new float2(0.0f), new float2(1.0f), v.c0); + this.c1 = math.select(new float2(0.0f), new float2(1.0f), v.c1); + } + + /// Constructs a float2x2 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float2x2 matrix from a int2x2 matrix by componentwise conversion. + /// int2x2 to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(int2x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a float2x2 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float2x2 matrix from a uint2x2 matrix by componentwise conversion. + /// uint2x2 to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(uint2x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a float2x2 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(double v) + { + this.c0 = (float2)v; + this.c1 = (float2)v; + } + + /// Constructs a float2x2 matrix from a double2x2 matrix by componentwise conversion. + /// double2x2 to convert to float2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x2(double2x2 v) + { + this.c0 = (float2)v.c0; + this.c1 = (float2)v.c1; + } + + + /// Implicitly converts a single float value to a float2x2 matrix by assigning it to every component. + /// float to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x2(float v) { return new float2x2(v); } + + /// Explicitly converts a single bool value to a float2x2 matrix by converting it to float and assigning it to every component. + /// bool to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x2(bool v) { return new float2x2(v); } + + /// Explicitly converts a bool2x2 matrix to a float2x2 matrix by componentwise conversion. + /// bool2x2 to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x2(bool2x2 v) { return new float2x2(v); } + + /// Implicitly converts a single int value to a float2x2 matrix by converting it to float and assigning it to every component. + /// int to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x2(int v) { return new float2x2(v); } + + /// Implicitly converts a int2x2 matrix to a float2x2 matrix by componentwise conversion. + /// int2x2 to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x2(int2x2 v) { return new float2x2(v); } + + /// Implicitly converts a single uint value to a float2x2 matrix by converting it to float and assigning it to every component. + /// uint to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x2(uint v) { return new float2x2(v); } + + /// Implicitly converts a uint2x2 matrix to a float2x2 matrix by componentwise conversion. + /// uint2x2 to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x2(uint2x2 v) { return new float2x2(v); } + + /// Explicitly converts a single double value to a float2x2 matrix by converting it to float and assigning it to every component. + /// double to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x2(double v) { return new float2x2(v); } + + /// Explicitly converts a double2x2 matrix to a float2x2 matrix by componentwise conversion. + /// double2x2 to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x2(double2x2 v) { return new float2x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise multiplication. + /// Right hand side float2x2 to use to compute componentwise multiplication. + /// float2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator * (float2x2 lhs, float2x2 rhs) { return new float2x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator * (float2x2 lhs, float rhs) { return new float2x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float2x2 to use to compute componentwise multiplication. + /// float2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator * (float lhs, float2x2 rhs) { return new float2x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise addition. + /// Right hand side float2x2 to use to compute componentwise addition. + /// float2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator + (float2x2 lhs, float2x2 rhs) { return new float2x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator + (float2x2 lhs, float rhs) { return new float2x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float2x2 to use to compute componentwise addition. + /// float2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator + (float lhs, float2x2 rhs) { return new float2x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise subtraction. + /// Right hand side float2x2 to use to compute componentwise subtraction. + /// float2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator - (float2x2 lhs, float2x2 rhs) { return new float2x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator - (float2x2 lhs, float rhs) { return new float2x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float2x2 to use to compute componentwise subtraction. + /// float2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator - (float lhs, float2x2 rhs) { return new float2x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise division. + /// Right hand side float2x2 to use to compute componentwise division. + /// float2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator / (float2x2 lhs, float2x2 rhs) { return new float2x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator / (float2x2 lhs, float rhs) { return new float2x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float2x2 to use to compute componentwise division. + /// float2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator / (float lhs, float2x2 rhs) { return new float2x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise modulus. + /// Right hand side float2x2 to use to compute componentwise modulus. + /// float2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator % (float2x2 lhs, float2x2 rhs) { return new float2x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator % (float2x2 lhs, float rhs) { return new float2x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float2x2 to use to compute componentwise modulus. + /// float2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator % (float lhs, float2x2 rhs) { return new float2x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a float2x2 matrix. + /// Value to use when computing the componentwise increment. + /// float2x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator ++ (float2x2 val) { return new float2x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a float2x2 matrix. + /// Value to use when computing the componentwise decrement. + /// float2x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator -- (float2x2 val) { return new float2x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise less than. + /// Right hand side float2x2 to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (float2x2 lhs, float2x2 rhs) { return new bool2x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (float2x2 lhs, float rhs) { return new bool2x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float2x2 to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (float lhs, float2x2 rhs) { return new bool2x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise less or equal. + /// Right hand side float2x2 to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (float2x2 lhs, float2x2 rhs) { return new bool2x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (float2x2 lhs, float rhs) { return new bool2x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float2x2 to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (float lhs, float2x2 rhs) { return new bool2x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise greater than. + /// Right hand side float2x2 to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (float2x2 lhs, float2x2 rhs) { return new bool2x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (float2x2 lhs, float rhs) { return new bool2x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float2x2 to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (float lhs, float2x2 rhs) { return new bool2x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise greater or equal. + /// Right hand side float2x2 to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (float2x2 lhs, float2x2 rhs) { return new bool2x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (float2x2 lhs, float rhs) { return new bool2x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float2x2 to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (float lhs, float2x2 rhs) { return new bool2x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a float2x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// float2x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator - (float2x2 val) { return new float2x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a float2x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// float2x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 operator + (float2x2 val) { return new float2x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise equality operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise equality. + /// Right hand side float2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (float2x2 lhs, float2x2 rhs) { return new bool2x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (float2x2 lhs, float rhs) { return new bool2x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (float lhs, float2x2 rhs) { return new bool2x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two float2x2 matrices. + /// Left hand side float2x2 to use to compute componentwise not equal. + /// Right hand side float2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (float2x2 lhs, float2x2 rhs) { return new bool2x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a float2x2 matrix and a float value. + /// Left hand side float2x2 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (float2x2 lhs, float rhs) { return new bool2x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float2x2 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (float lhs, float2x2 rhs) { return new bool2x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + + /// Returns the float2 element at a specified index. + unsafe public ref float2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (float2x2* array = &this) { return ref ((float2*)array)[index]; } + } + } + + /// Returns true if the float2x2 is equal to a given float2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float2x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the float2x2 is equal to a given float2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float2x2 converted && Equals(converted); } + + + /// Returns a hash code for the float2x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float2x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float2x2({0}f, {1}f, {2}f, {3}f)", c0.x, c1.x, c0.y, c1.y); + } + + /// Returns a string representation of the float2x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float2x2({0}f, {1}f, {2}f, {3}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float2x2 matrix constructed from two float2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// float2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(float2 c0, float2 c1) { return new float2x2(c0, c1); } + + /// Returns a float2x2 matrix constructed from from 4 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// float2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(float m00, float m01, + float m10, float m11) + { + return new float2x2(m00, m01, + m10, m11); + } + + /// Returns a float2x2 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(float v) { return new float2x2(v); } + + /// Returns a float2x2 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(bool v) { return new float2x2(v); } + + /// Return a float2x2 matrix constructed from a bool2x2 matrix by componentwise conversion. + /// bool2x2 to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(bool2x2 v) { return new float2x2(v); } + + /// Returns a float2x2 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(int v) { return new float2x2(v); } + + /// Return a float2x2 matrix constructed from a int2x2 matrix by componentwise conversion. + /// int2x2 to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(int2x2 v) { return new float2x2(v); } + + /// Returns a float2x2 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(uint v) { return new float2x2(v); } + + /// Return a float2x2 matrix constructed from a uint2x2 matrix by componentwise conversion. + /// uint2x2 to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(uint2x2 v) { return new float2x2(v); } + + /// Returns a float2x2 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(double v) { return new float2x2(v); } + + /// Return a float2x2 matrix constructed from a double2x2 matrix by componentwise conversion. + /// double2x2 to convert to float2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 float2x2(double2x2 v) { return new float2x2(v); } + + /// Return the float2x2 transpose of a float2x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 transpose(float2x2 v) + { + return float2x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y); + } + + /// Returns the float2x2 full inverse of a float2x2 matrix. + /// Matrix to invert. + /// The inverted matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 inverse(float2x2 m) + { + float a = m.c0.x; + float b = m.c1.x; + float c = m.c0.y; + float d = m.c1.y; + + float det = a * d - b * c; + + return float2x2(d, -b, -c, a) * (1.0f / det); + } + + /// Returns the determinant of a float2x2 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float determinant(float2x2 m) + { + float a = m.c0.x; + float b = m.c1.x; + float c = m.c0.y; + float d = m.c1.y; + + return a * d - b * c; + } + + /// Returns a uint hash code of a float2x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float2x2 v) + { + return csum(asuint(v.c0) * uint2(0x9C9F0823u, 0x5A9CA13Bu) + + asuint(v.c1) * uint2(0xAFCDD5EFu, 0xA88D187Du)) + 0xCF6EBA1Du; + } + + /// + /// Returns a uint2 vector hash code of a float2x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(float2x2 v) + { + return (asuint(v.c0) * uint2(0x9D88E5A1u, 0xEADF0775u) + + asuint(v.c1) * uint2(0x747A9D7Bu, 0x4111F799u)) + 0xB5F05AF1u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float2x3.gen.cs b/ThirdParty/Unity.Mathematics/float2x3.gen.cs new file mode 100644 index 0000000..38a1e2a --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float2x3.gen.cs @@ -0,0 +1,647 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x3 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float2x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float2 c0; + /// Column 1 of the matrix. + public float2 c1; + /// Column 2 of the matrix. + public float2 c2; + + /// float2x3 zero value. + public static readonly float2x3 zero; + + /// Constructs a float2x3 matrix from three float2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(float2 c0, float2 c1, float2 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a float2x3 matrix from 6 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(float m00, float m01, float m02, + float m10, float m11, float m12) + { + this.c0 = new float2(m00, m10); + this.c1 = new float2(m01, m11); + this.c2 = new float2(m02, m12); + } + + /// Constructs a float2x3 matrix from a single float value by assigning it to every component. + /// float to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float2x3 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(bool v) + { + this.c0 = math.select(new float2(0.0f), new float2(1.0f), v); + this.c1 = math.select(new float2(0.0f), new float2(1.0f), v); + this.c2 = math.select(new float2(0.0f), new float2(1.0f), v); + } + + /// Constructs a float2x3 matrix from a bool2x3 matrix by componentwise conversion. + /// bool2x3 to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(bool2x3 v) + { + this.c0 = math.select(new float2(0.0f), new float2(1.0f), v.c0); + this.c1 = math.select(new float2(0.0f), new float2(1.0f), v.c1); + this.c2 = math.select(new float2(0.0f), new float2(1.0f), v.c2); + } + + /// Constructs a float2x3 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float2x3 matrix from a int2x3 matrix by componentwise conversion. + /// int2x3 to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(int2x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a float2x3 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float2x3 matrix from a uint2x3 matrix by componentwise conversion. + /// uint2x3 to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(uint2x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a float2x3 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(double v) + { + this.c0 = (float2)v; + this.c1 = (float2)v; + this.c2 = (float2)v; + } + + /// Constructs a float2x3 matrix from a double2x3 matrix by componentwise conversion. + /// double2x3 to convert to float2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x3(double2x3 v) + { + this.c0 = (float2)v.c0; + this.c1 = (float2)v.c1; + this.c2 = (float2)v.c2; + } + + + /// Implicitly converts a single float value to a float2x3 matrix by assigning it to every component. + /// float to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x3(float v) { return new float2x3(v); } + + /// Explicitly converts a single bool value to a float2x3 matrix by converting it to float and assigning it to every component. + /// bool to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x3(bool v) { return new float2x3(v); } + + /// Explicitly converts a bool2x3 matrix to a float2x3 matrix by componentwise conversion. + /// bool2x3 to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x3(bool2x3 v) { return new float2x3(v); } + + /// Implicitly converts a single int value to a float2x3 matrix by converting it to float and assigning it to every component. + /// int to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x3(int v) { return new float2x3(v); } + + /// Implicitly converts a int2x3 matrix to a float2x3 matrix by componentwise conversion. + /// int2x3 to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x3(int2x3 v) { return new float2x3(v); } + + /// Implicitly converts a single uint value to a float2x3 matrix by converting it to float and assigning it to every component. + /// uint to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x3(uint v) { return new float2x3(v); } + + /// Implicitly converts a uint2x3 matrix to a float2x3 matrix by componentwise conversion. + /// uint2x3 to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x3(uint2x3 v) { return new float2x3(v); } + + /// Explicitly converts a single double value to a float2x3 matrix by converting it to float and assigning it to every component. + /// double to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x3(double v) { return new float2x3(v); } + + /// Explicitly converts a double2x3 matrix to a float2x3 matrix by componentwise conversion. + /// double2x3 to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x3(double2x3 v) { return new float2x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise multiplication. + /// Right hand side float2x3 to use to compute componentwise multiplication. + /// float2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator * (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator * (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float2x3 to use to compute componentwise multiplication. + /// float2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator * (float lhs, float2x3 rhs) { return new float2x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise addition. + /// Right hand side float2x3 to use to compute componentwise addition. + /// float2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator + (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator + (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float2x3 to use to compute componentwise addition. + /// float2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator + (float lhs, float2x3 rhs) { return new float2x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise subtraction. + /// Right hand side float2x3 to use to compute componentwise subtraction. + /// float2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator - (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator - (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float2x3 to use to compute componentwise subtraction. + /// float2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator - (float lhs, float2x3 rhs) { return new float2x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise division. + /// Right hand side float2x3 to use to compute componentwise division. + /// float2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator / (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator / (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float2x3 to use to compute componentwise division. + /// float2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator / (float lhs, float2x3 rhs) { return new float2x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise modulus. + /// Right hand side float2x3 to use to compute componentwise modulus. + /// float2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator % (float2x3 lhs, float2x3 rhs) { return new float2x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator % (float2x3 lhs, float rhs) { return new float2x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float2x3 to use to compute componentwise modulus. + /// float2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator % (float lhs, float2x3 rhs) { return new float2x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a float2x3 matrix. + /// Value to use when computing the componentwise increment. + /// float2x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator ++ (float2x3 val) { return new float2x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a float2x3 matrix. + /// Value to use when computing the componentwise decrement. + /// float2x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator -- (float2x3 val) { return new float2x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise less than. + /// Right hand side float2x3 to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float2x3 to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (float lhs, float2x3 rhs) { return new bool2x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise less or equal. + /// Right hand side float2x3 to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float2x3 to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (float lhs, float2x3 rhs) { return new bool2x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise greater than. + /// Right hand side float2x3 to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float2x3 to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (float lhs, float2x3 rhs) { return new bool2x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise greater or equal. + /// Right hand side float2x3 to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float2x3 to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (float lhs, float2x3 rhs) { return new bool2x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a float2x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// float2x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator - (float2x3 val) { return new float2x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a float2x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// float2x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 operator + (float2x3 val) { return new float2x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise equality operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise equality. + /// Right hand side float2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (float lhs, float2x3 rhs) { return new bool2x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two float2x3 matrices. + /// Left hand side float2x3 to use to compute componentwise not equal. + /// Right hand side float2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (float2x3 lhs, float2x3 rhs) { return new bool2x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a float2x3 matrix and a float value. + /// Left hand side float2x3 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (float2x3 lhs, float rhs) { return new bool2x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float2x3 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (float lhs, float2x3 rhs) { return new bool2x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + + /// Returns the float2 element at a specified index. + unsafe public ref float2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (float2x3* array = &this) { return ref ((float2*)array)[index]; } + } + } + + /// Returns true if the float2x3 is equal to a given float2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float2x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the float2x3 is equal to a given float2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float2x3 converted && Equals(converted); } + + + /// Returns a hash code for the float2x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float2x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float2x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f)", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y); + } + + /// Returns a string representation of the float2x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float2x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float2x3 matrix constructed from three float2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// float2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(float2 c0, float2 c1, float2 c2) { return new float2x3(c0, c1, c2); } + + /// Returns a float2x3 matrix constructed from from 6 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// float2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(float m00, float m01, float m02, + float m10, float m11, float m12) + { + return new float2x3(m00, m01, m02, + m10, m11, m12); + } + + /// Returns a float2x3 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(float v) { return new float2x3(v); } + + /// Returns a float2x3 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(bool v) { return new float2x3(v); } + + /// Return a float2x3 matrix constructed from a bool2x3 matrix by componentwise conversion. + /// bool2x3 to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(bool2x3 v) { return new float2x3(v); } + + /// Returns a float2x3 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(int v) { return new float2x3(v); } + + /// Return a float2x3 matrix constructed from a int2x3 matrix by componentwise conversion. + /// int2x3 to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(int2x3 v) { return new float2x3(v); } + + /// Returns a float2x3 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(uint v) { return new float2x3(v); } + + /// Return a float2x3 matrix constructed from a uint2x3 matrix by componentwise conversion. + /// uint2x3 to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(uint2x3 v) { return new float2x3(v); } + + /// Returns a float2x3 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(double v) { return new float2x3(v); } + + /// Return a float2x3 matrix constructed from a double2x3 matrix by componentwise conversion. + /// double2x3 to convert to float2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 float2x3(double2x3 v) { return new float2x3(v); } + + /// Return the float3x2 transpose of a float2x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 transpose(float2x3 v) + { + return float3x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y); + } + + /// Returns a uint hash code of a float2x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float2x3 v) + { + return csum(asuint(v.c0) * uint2(0xE857DCE1u, 0xF62213C5u) + + asuint(v.c1) * uint2(0x9CDAA959u, 0xAA269ABFu) + + asuint(v.c2) * uint2(0xD54BA36Fu, 0xFD0847B9u)) + 0x8189A683u; + } + + /// + /// Returns a uint2 vector hash code of a float2x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(float2x3 v) + { + return (asuint(v.c0) * uint2(0xB139D651u, 0xE7579997u) + + asuint(v.c1) * uint2(0xEF7D56C7u, 0x66F38F0Bu) + + asuint(v.c2) * uint2(0x624256A3u, 0x5292ADE1u)) + 0xD2E590E5u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float2x4.gen.cs b/ThirdParty/Unity.Mathematics/float2x4.gen.cs new file mode 100644 index 0000000..2ec76c5 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float2x4.gen.cs @@ -0,0 +1,669 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x4 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float2x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float2 c0; + /// Column 1 of the matrix. + public float2 c1; + /// Column 2 of the matrix. + public float2 c2; + /// Column 3 of the matrix. + public float2 c3; + + /// float2x4 zero value. + public static readonly float2x4 zero; + + /// Constructs a float2x4 matrix from four float2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(float2 c0, float2 c1, float2 c2, float2 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a float2x4 matrix from 8 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13) + { + this.c0 = new float2(m00, m10); + this.c1 = new float2(m01, m11); + this.c2 = new float2(m02, m12); + this.c3 = new float2(m03, m13); + } + + /// Constructs a float2x4 matrix from a single float value by assigning it to every component. + /// float to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float2x4 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(bool v) + { + this.c0 = math.select(new float2(0.0f), new float2(1.0f), v); + this.c1 = math.select(new float2(0.0f), new float2(1.0f), v); + this.c2 = math.select(new float2(0.0f), new float2(1.0f), v); + this.c3 = math.select(new float2(0.0f), new float2(1.0f), v); + } + + /// Constructs a float2x4 matrix from a bool2x4 matrix by componentwise conversion. + /// bool2x4 to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(bool2x4 v) + { + this.c0 = math.select(new float2(0.0f), new float2(1.0f), v.c0); + this.c1 = math.select(new float2(0.0f), new float2(1.0f), v.c1); + this.c2 = math.select(new float2(0.0f), new float2(1.0f), v.c2); + this.c3 = math.select(new float2(0.0f), new float2(1.0f), v.c3); + } + + /// Constructs a float2x4 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float2x4 matrix from a int2x4 matrix by componentwise conversion. + /// int2x4 to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(int2x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a float2x4 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float2x4 matrix from a uint2x4 matrix by componentwise conversion. + /// uint2x4 to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(uint2x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a float2x4 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(double v) + { + this.c0 = (float2)v; + this.c1 = (float2)v; + this.c2 = (float2)v; + this.c3 = (float2)v; + } + + /// Constructs a float2x4 matrix from a double2x4 matrix by componentwise conversion. + /// double2x4 to convert to float2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2x4(double2x4 v) + { + this.c0 = (float2)v.c0; + this.c1 = (float2)v.c1; + this.c2 = (float2)v.c2; + this.c3 = (float2)v.c3; + } + + + /// Implicitly converts a single float value to a float2x4 matrix by assigning it to every component. + /// float to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x4(float v) { return new float2x4(v); } + + /// Explicitly converts a single bool value to a float2x4 matrix by converting it to float and assigning it to every component. + /// bool to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x4(bool v) { return new float2x4(v); } + + /// Explicitly converts a bool2x4 matrix to a float2x4 matrix by componentwise conversion. + /// bool2x4 to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x4(bool2x4 v) { return new float2x4(v); } + + /// Implicitly converts a single int value to a float2x4 matrix by converting it to float and assigning it to every component. + /// int to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x4(int v) { return new float2x4(v); } + + /// Implicitly converts a int2x4 matrix to a float2x4 matrix by componentwise conversion. + /// int2x4 to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x4(int2x4 v) { return new float2x4(v); } + + /// Implicitly converts a single uint value to a float2x4 matrix by converting it to float and assigning it to every component. + /// uint to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x4(uint v) { return new float2x4(v); } + + /// Implicitly converts a uint2x4 matrix to a float2x4 matrix by componentwise conversion. + /// uint2x4 to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float2x4(uint2x4 v) { return new float2x4(v); } + + /// Explicitly converts a single double value to a float2x4 matrix by converting it to float and assigning it to every component. + /// double to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x4(double v) { return new float2x4(v); } + + /// Explicitly converts a double2x4 matrix to a float2x4 matrix by componentwise conversion. + /// double2x4 to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float2x4(double2x4 v) { return new float2x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise multiplication. + /// Right hand side float2x4 to use to compute componentwise multiplication. + /// float2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator * (float2x4 lhs, float2x4 rhs) { return new float2x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator * (float2x4 lhs, float rhs) { return new float2x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float2x4 to use to compute componentwise multiplication. + /// float2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator * (float lhs, float2x4 rhs) { return new float2x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise addition. + /// Right hand side float2x4 to use to compute componentwise addition. + /// float2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator + (float2x4 lhs, float2x4 rhs) { return new float2x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator + (float2x4 lhs, float rhs) { return new float2x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float2x4 to use to compute componentwise addition. + /// float2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator + (float lhs, float2x4 rhs) { return new float2x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise subtraction. + /// Right hand side float2x4 to use to compute componentwise subtraction. + /// float2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator - (float2x4 lhs, float2x4 rhs) { return new float2x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator - (float2x4 lhs, float rhs) { return new float2x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float2x4 to use to compute componentwise subtraction. + /// float2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator - (float lhs, float2x4 rhs) { return new float2x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise division. + /// Right hand side float2x4 to use to compute componentwise division. + /// float2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator / (float2x4 lhs, float2x4 rhs) { return new float2x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator / (float2x4 lhs, float rhs) { return new float2x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float2x4 to use to compute componentwise division. + /// float2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator / (float lhs, float2x4 rhs) { return new float2x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise modulus. + /// Right hand side float2x4 to use to compute componentwise modulus. + /// float2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator % (float2x4 lhs, float2x4 rhs) { return new float2x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator % (float2x4 lhs, float rhs) { return new float2x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float2x4 to use to compute componentwise modulus. + /// float2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator % (float lhs, float2x4 rhs) { return new float2x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a float2x4 matrix. + /// Value to use when computing the componentwise increment. + /// float2x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator ++ (float2x4 val) { return new float2x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a float2x4 matrix. + /// Value to use when computing the componentwise decrement. + /// float2x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator -- (float2x4 val) { return new float2x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise less than. + /// Right hand side float2x4 to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (float2x4 lhs, float2x4 rhs) { return new bool2x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (float2x4 lhs, float rhs) { return new bool2x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float2x4 to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (float lhs, float2x4 rhs) { return new bool2x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise less or equal. + /// Right hand side float2x4 to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (float2x4 lhs, float2x4 rhs) { return new bool2x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (float2x4 lhs, float rhs) { return new bool2x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float2x4 to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (float lhs, float2x4 rhs) { return new bool2x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise greater than. + /// Right hand side float2x4 to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (float2x4 lhs, float2x4 rhs) { return new bool2x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (float2x4 lhs, float rhs) { return new bool2x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float2x4 to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (float lhs, float2x4 rhs) { return new bool2x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise greater or equal. + /// Right hand side float2x4 to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (float2x4 lhs, float2x4 rhs) { return new bool2x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (float2x4 lhs, float rhs) { return new bool2x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float2x4 to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (float lhs, float2x4 rhs) { return new bool2x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a float2x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// float2x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator - (float2x4 val) { return new float2x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a float2x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// float2x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 operator + (float2x4 val) { return new float2x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise equality operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise equality. + /// Right hand side float2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (float2x4 lhs, float2x4 rhs) { return new bool2x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (float2x4 lhs, float rhs) { return new bool2x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (float lhs, float2x4 rhs) { return new bool2x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two float2x4 matrices. + /// Left hand side float2x4 to use to compute componentwise not equal. + /// Right hand side float2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (float2x4 lhs, float2x4 rhs) { return new bool2x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a float2x4 matrix and a float value. + /// Left hand side float2x4 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (float2x4 lhs, float rhs) { return new bool2x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float2x4 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (float lhs, float2x4 rhs) { return new bool2x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + + /// Returns the float2 element at a specified index. + unsafe public ref float2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (float2x4* array = &this) { return ref ((float2*)array)[index]; } + } + } + + /// Returns true if the float2x4 is equal to a given float2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float2x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the float2x4 is equal to a given float2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float2x4 converted && Equals(converted); } + + + /// Returns a hash code for the float2x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float2x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float2x4({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f)", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y); + } + + /// Returns a string representation of the float2x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float2x4({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float2x4 matrix constructed from four float2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// float2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(float2 c0, float2 c1, float2 c2, float2 c3) { return new float2x4(c0, c1, c2, c3); } + + /// Returns a float2x4 matrix constructed from from 8 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// float2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13) + { + return new float2x4(m00, m01, m02, m03, + m10, m11, m12, m13); + } + + /// Returns a float2x4 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(float v) { return new float2x4(v); } + + /// Returns a float2x4 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(bool v) { return new float2x4(v); } + + /// Return a float2x4 matrix constructed from a bool2x4 matrix by componentwise conversion. + /// bool2x4 to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(bool2x4 v) { return new float2x4(v); } + + /// Returns a float2x4 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(int v) { return new float2x4(v); } + + /// Return a float2x4 matrix constructed from a int2x4 matrix by componentwise conversion. + /// int2x4 to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(int2x4 v) { return new float2x4(v); } + + /// Returns a float2x4 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(uint v) { return new float2x4(v); } + + /// Return a float2x4 matrix constructed from a uint2x4 matrix by componentwise conversion. + /// uint2x4 to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(uint2x4 v) { return new float2x4(v); } + + /// Returns a float2x4 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(double v) { return new float2x4(v); } + + /// Return a float2x4 matrix constructed from a double2x4 matrix by componentwise conversion. + /// double2x4 to convert to float2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 float2x4(double2x4 v) { return new float2x4(v); } + + /// Return the float4x2 transpose of a float2x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 transpose(float2x4 v) + { + return float4x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y, + v.c3.x, v.c3.y); + } + + /// Returns a uint hash code of a float2x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float2x4 v) + { + return csum(asuint(v.c0) * uint2(0xD35C9B2Du, 0xA10D9E27u) + + asuint(v.c1) * uint2(0x568DAAA9u, 0x7530254Fu) + + asuint(v.c2) * uint2(0x9F090439u, 0x5E9F85C9u) + + asuint(v.c3) * uint2(0x8C4CA03Fu, 0xB8D969EDu)) + 0xAC5DB57Bu; + } + + /// + /// Returns a uint2 vector hash code of a float2x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(float2x4 v) + { + return (asuint(v.c0) * uint2(0xA91A02EDu, 0xB3C49313u) + + asuint(v.c1) * uint2(0xF43A9ABBu, 0x84E7E01Bu) + + asuint(v.c2) * uint2(0x8E055BE5u, 0x6E624EB7u) + + asuint(v.c3) * uint2(0x7383ED49u, 0xDD49C23Bu)) + 0xEBD0D005u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float3.gen.cs b/ThirdParty/Unity.Mathematics/float3.gen.cs new file mode 100644 index 0000000..178cf4e --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float3.gen.cs @@ -0,0 +1,1878 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3 component vector of floats. + [DebuggerTypeProxy(typeof(float3.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float3 : System.IEquatable, IFormattable + { + /// x component of the vector. + public float x; + /// y component of the vector. + public float y; + /// z component of the vector. + public float z; + + /// float3 zero value. + public static readonly float3 zero; + + /// Constructs a float3 vector from three float values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(float x, float y, float z) + { + this.x = x; + this.y = y; + this.z = z; + } + + /// Constructs a float3 vector from a float value and a float2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(float x, float2 yz) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + } + + /// Constructs a float3 vector from a float2 vector and a float value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(float2 xy, float z) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + } + + /// Constructs a float3 vector from a float3 vector. + /// The constructed vector's xyz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(float3 xyz) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + } + + /// Constructs a float3 vector from a single float value by assigning it to every component. + /// float to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(float v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a float3 vector from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(bool v) + { + this.x = v ? 1.0f : 0.0f; + this.y = v ? 1.0f : 0.0f; + this.z = v ? 1.0f : 0.0f; + } + + /// Constructs a float3 vector from a bool3 vector by componentwise conversion. + /// bool3 to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(bool3 v) + { + this.x = v.x ? 1.0f : 0.0f; + this.y = v.y ? 1.0f : 0.0f; + this.z = v.z ? 1.0f : 0.0f; + } + + /// Constructs a float3 vector from a single int value by converting it to float and assigning it to every component. + /// int to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(int v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a float3 vector from a int3 vector by componentwise conversion. + /// int3 to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(int3 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + /// Constructs a float3 vector from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(uint v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a float3 vector from a uint3 vector by componentwise conversion. + /// uint3 to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(uint3 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + /// Constructs a float3 vector from a single half value by converting it to float and assigning it to every component. + /// half to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(half v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a float3 vector from a half3 vector by componentwise conversion. + /// half3 to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(half3 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + } + + /// Constructs a float3 vector from a single double value by converting it to float and assigning it to every component. + /// double to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(double v) + { + this.x = (float)v; + this.y = (float)v; + this.z = (float)v; + } + + /// Constructs a float3 vector from a double3 vector by componentwise conversion. + /// double3 to convert to float3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3(double3 v) + { + this.x = (float)v.x; + this.y = (float)v.y; + this.z = (float)v.z; + } + + + /// Implicitly converts a single float value to a float3 vector by assigning it to every component. + /// float to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3(float v) { return new float3(v); } + + /// Explicitly converts a single bool value to a float3 vector by converting it to float and assigning it to every component. + /// bool to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3(bool v) { return new float3(v); } + + /// Explicitly converts a bool3 vector to a float3 vector by componentwise conversion. + /// bool3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3(bool3 v) { return new float3(v); } + + /// Implicitly converts a single int value to a float3 vector by converting it to float and assigning it to every component. + /// int to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3(int v) { return new float3(v); } + + /// Implicitly converts a int3 vector to a float3 vector by componentwise conversion. + /// int3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3(int3 v) { return new float3(v); } + + /// Implicitly converts a single uint value to a float3 vector by converting it to float and assigning it to every component. + /// uint to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3(uint v) { return new float3(v); } + + /// Implicitly converts a uint3 vector to a float3 vector by componentwise conversion. + /// uint3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3(uint3 v) { return new float3(v); } + + /// Implicitly converts a single half value to a float3 vector by converting it to float and assigning it to every component. + /// half to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3(half v) { return new float3(v); } + + /// Implicitly converts a half3 vector to a float3 vector by componentwise conversion. + /// half3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3(half3 v) { return new float3(v); } + + /// Explicitly converts a single double value to a float3 vector by converting it to float and assigning it to every component. + /// double to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3(double v) { return new float3(v); } + + /// Explicitly converts a double3 vector to a float3 vector by componentwise conversion. + /// double3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3(double3 v) { return new float3(v); } + + + /// Returns the result of a componentwise multiplication operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise multiplication. + /// Right hand side float3 to use to compute componentwise multiplication. + /// float3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator * (float3 lhs, float3 rhs) { return new float3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } + + /// Returns the result of a componentwise multiplication operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator * (float3 lhs, float rhs) { return new float3 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float3 to use to compute componentwise multiplication. + /// float3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator * (float lhs, float3 rhs) { return new float3 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); } + + + /// Returns the result of a componentwise addition operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise addition. + /// Right hand side float3 to use to compute componentwise addition. + /// float3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator + (float3 lhs, float3 rhs) { return new float3 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); } + + /// Returns the result of a componentwise addition operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator + (float3 lhs, float rhs) { return new float3 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float3 to use to compute componentwise addition. + /// float3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator + (float lhs, float3 rhs) { return new float3 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z); } + + + /// Returns the result of a componentwise subtraction operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise subtraction. + /// Right hand side float3 to use to compute componentwise subtraction. + /// float3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator - (float3 lhs, float3 rhs) { return new float3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); } + + /// Returns the result of a componentwise subtraction operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator - (float3 lhs, float rhs) { return new float3 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float3 to use to compute componentwise subtraction. + /// float3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator - (float lhs, float3 rhs) { return new float3 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z); } + + + /// Returns the result of a componentwise division operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise division. + /// Right hand side float3 to use to compute componentwise division. + /// float3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator / (float3 lhs, float3 rhs) { return new float3 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z); } + + /// Returns the result of a componentwise division operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator / (float3 lhs, float rhs) { return new float3 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float3 to use to compute componentwise division. + /// float3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator / (float lhs, float3 rhs) { return new float3 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z); } + + + /// Returns the result of a componentwise modulus operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise modulus. + /// Right hand side float3 to use to compute componentwise modulus. + /// float3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator % (float3 lhs, float3 rhs) { return new float3 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z); } + + /// Returns the result of a componentwise modulus operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator % (float3 lhs, float rhs) { return new float3 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float3 to use to compute componentwise modulus. + /// float3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator % (float lhs, float3 rhs) { return new float3 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z); } + + + /// Returns the result of a componentwise increment operation on a float3 vector. + /// Value to use when computing the componentwise increment. + /// float3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator ++ (float3 val) { return new float3 (++val.x, ++val.y, ++val.z); } + + + /// Returns the result of a componentwise decrement operation on a float3 vector. + /// Value to use when computing the componentwise decrement. + /// float3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator -- (float3 val) { return new float3 (--val.x, --val.y, --val.z); } + + + /// Returns the result of a componentwise less than operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise less than. + /// Right hand side float3 to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (float3 lhs, float3 rhs) { return new bool3 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z); } + + /// Returns the result of a componentwise less than operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (float3 lhs, float rhs) { return new bool3 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float3 to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (float lhs, float3 rhs) { return new bool3 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z); } + + + /// Returns the result of a componentwise less or equal operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise less or equal. + /// Right hand side float3 to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (float3 lhs, float3 rhs) { return new bool3 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z); } + + /// Returns the result of a componentwise less or equal operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (float3 lhs, float rhs) { return new bool3 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float3 to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (float lhs, float3 rhs) { return new bool3 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z); } + + + /// Returns the result of a componentwise greater than operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise greater than. + /// Right hand side float3 to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (float3 lhs, float3 rhs) { return new bool3 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z); } + + /// Returns the result of a componentwise greater than operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (float3 lhs, float rhs) { return new bool3 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float3 to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (float lhs, float3 rhs) { return new bool3 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z); } + + + /// Returns the result of a componentwise greater or equal operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise greater or equal. + /// Right hand side float3 to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (float3 lhs, float3 rhs) { return new bool3 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z); } + + /// Returns the result of a componentwise greater or equal operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (float3 lhs, float rhs) { return new bool3 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float3 to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (float lhs, float3 rhs) { return new bool3 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z); } + + + /// Returns the result of a componentwise unary minus operation on a float3 vector. + /// Value to use when computing the componentwise unary minus. + /// float3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator - (float3 val) { return new float3 (-val.x, -val.y, -val.z); } + + + /// Returns the result of a componentwise unary plus operation on a float3 vector. + /// Value to use when computing the componentwise unary plus. + /// float3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 operator + (float3 val) { return new float3 (+val.x, +val.y, +val.z); } + + + /// Returns the result of a componentwise equality operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise equality. + /// Right hand side float3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (float3 lhs, float3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); } + + /// Returns the result of a componentwise equality operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (float3 lhs, float rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (float lhs, float3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); } + + + /// Returns the result of a componentwise not equal operation on two float3 vectors. + /// Left hand side float3 to use to compute componentwise not equal. + /// Right hand side float3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (float3 lhs, float3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); } + + /// Returns the result of a componentwise not equal operation on a float3 vector and a float value. + /// Left hand side float3 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (float3 lhs, float rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float3 vector. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (float lhs, float3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(z, z); } + } + + + + /// Returns the float element at a specified index. + unsafe public float this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (float3* array = &this) { return ((float*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (float* array = &x) { array[index] = value; } + } + } + + /// Returns true if the float3 is equal to a given float3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } + + /// Returns true if the float3 is equal to a given float3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float3 converted && Equals(converted); } + + + /// Returns a hash code for the float3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float3({0}f, {1}f, {2}f)", x, y, z); + } + + /// Returns a string representation of the float3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float3({0}f, {1}f, {2}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public float x; + public float y; + public float z; + public DebuggerProxy(float3 v) + { + x = v.x; + y = v.y; + z = v.z; + } + } + + } + + public static partial class math + { + /// Returns a float3 vector constructed from three float values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// float3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(float x, float y, float z) { return new float3(x, y, z); } + + /// Returns a float3 vector constructed from a float value and a float2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// float3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(float x, float2 yz) { return new float3(x, yz); } + + /// Returns a float3 vector constructed from a float2 vector and a float value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// float3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(float2 xy, float z) { return new float3(xy, z); } + + /// Returns a float3 vector constructed from a float3 vector. + /// The constructed vector's xyz components will be set to this value. + /// float3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(float3 xyz) { return new float3(xyz); } + + /// Returns a float3 vector constructed from a single float value by assigning it to every component. + /// float to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(float v) { return new float3(v); } + + /// Returns a float3 vector constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(bool v) { return new float3(v); } + + /// Return a float3 vector constructed from a bool3 vector by componentwise conversion. + /// bool3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(bool3 v) { return new float3(v); } + + /// Returns a float3 vector constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(int v) { return new float3(v); } + + /// Return a float3 vector constructed from a int3 vector by componentwise conversion. + /// int3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(int3 v) { return new float3(v); } + + /// Returns a float3 vector constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(uint v) { return new float3(v); } + + /// Return a float3 vector constructed from a uint3 vector by componentwise conversion. + /// uint3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(uint3 v) { return new float3(v); } + + /// Returns a float3 vector constructed from a single half value by converting it to float and assigning it to every component. + /// half to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(half v) { return new float3(v); } + + /// Return a float3 vector constructed from a half3 vector by componentwise conversion. + /// half3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(half3 v) { return new float3(v); } + + /// Returns a float3 vector constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(double v) { return new float3(v); } + + /// Return a float3 vector constructed from a double3 vector by componentwise conversion. + /// double3 to convert to float3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 float3(double3 v) { return new float3(v); } + + /// Returns a uint hash code of a float3 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float3 v) + { + return csum(asuint(v) * uint3(0x9B13B92Du, 0x4ABF0813u, 0x86068063u)) + 0xD75513F9u; + } + + /// + /// Returns a uint3 vector hash code of a float3 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(float3 v) + { + return (asuint(v) * uint3(0x5AB3E8CDu, 0x676E8407u, 0xB36DE767u)) + 0x6FCA387Du; + } + + /// Returns the result of specified shuffling of the components from two float3 vectors into a float value. + /// float3 to use as the left argument of the shuffle operation. + /// float3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float. + /// float result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float shuffle(float3 left, float3 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two float3 vectors into a float2 vector. + /// float3 to use as the left argument of the shuffle operation. + /// float3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float2 x component. + /// The ShuffleComponent to use when setting the resulting float2 y component. + /// float2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y) + { + return float2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two float3 vectors into a float3 vector. + /// float3 to use as the left argument of the shuffle operation. + /// float3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float3 x component. + /// The ShuffleComponent to use when setting the resulting float3 y component. + /// The ShuffleComponent to use when setting the resulting float3 z component. + /// float3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return float3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two float3 vectors into a float4 vector. + /// float3 to use as the left argument of the shuffle operation. + /// float3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float4 x component. + /// The ShuffleComponent to use when setting the resulting float4 y component. + /// The ShuffleComponent to use when setting the resulting float4 z component. + /// The ShuffleComponent to use when setting the resulting float4 w component. + /// float4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 shuffle(float3 left, float3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return float4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float select_shuffle_component(float3 a, float3 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float3x2.gen.cs b/ThirdParty/Unity.Mathematics/float3x2.gen.cs new file mode 100644 index 0000000..e4a95db --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float3x2.gen.cs @@ -0,0 +1,632 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x2 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float3x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float3 c0; + /// Column 1 of the matrix. + public float3 c1; + + /// float3x2 zero value. + public static readonly float3x2 zero; + + /// Constructs a float3x2 matrix from two float3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(float3 c0, float3 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a float3x2 matrix from 6 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(float m00, float m01, + float m10, float m11, + float m20, float m21) + { + this.c0 = new float3(m00, m10, m20); + this.c1 = new float3(m01, m11, m21); + } + + /// Constructs a float3x2 matrix from a single float value by assigning it to every component. + /// float to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(float v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float3x2 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(bool v) + { + this.c0 = math.select(new float3(0.0f), new float3(1.0f), v); + this.c1 = math.select(new float3(0.0f), new float3(1.0f), v); + } + + /// Constructs a float3x2 matrix from a bool3x2 matrix by componentwise conversion. + /// bool3x2 to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(bool3x2 v) + { + this.c0 = math.select(new float3(0.0f), new float3(1.0f), v.c0); + this.c1 = math.select(new float3(0.0f), new float3(1.0f), v.c1); + } + + /// Constructs a float3x2 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float3x2 matrix from a int3x2 matrix by componentwise conversion. + /// int3x2 to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(int3x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a float3x2 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float3x2 matrix from a uint3x2 matrix by componentwise conversion. + /// uint3x2 to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(uint3x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a float3x2 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(double v) + { + this.c0 = (float3)v; + this.c1 = (float3)v; + } + + /// Constructs a float3x2 matrix from a double3x2 matrix by componentwise conversion. + /// double3x2 to convert to float3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x2(double3x2 v) + { + this.c0 = (float3)v.c0; + this.c1 = (float3)v.c1; + } + + + /// Implicitly converts a single float value to a float3x2 matrix by assigning it to every component. + /// float to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x2(float v) { return new float3x2(v); } + + /// Explicitly converts a single bool value to a float3x2 matrix by converting it to float and assigning it to every component. + /// bool to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x2(bool v) { return new float3x2(v); } + + /// Explicitly converts a bool3x2 matrix to a float3x2 matrix by componentwise conversion. + /// bool3x2 to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x2(bool3x2 v) { return new float3x2(v); } + + /// Implicitly converts a single int value to a float3x2 matrix by converting it to float and assigning it to every component. + /// int to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x2(int v) { return new float3x2(v); } + + /// Implicitly converts a int3x2 matrix to a float3x2 matrix by componentwise conversion. + /// int3x2 to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x2(int3x2 v) { return new float3x2(v); } + + /// Implicitly converts a single uint value to a float3x2 matrix by converting it to float and assigning it to every component. + /// uint to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x2(uint v) { return new float3x2(v); } + + /// Implicitly converts a uint3x2 matrix to a float3x2 matrix by componentwise conversion. + /// uint3x2 to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x2(uint3x2 v) { return new float3x2(v); } + + /// Explicitly converts a single double value to a float3x2 matrix by converting it to float and assigning it to every component. + /// double to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x2(double v) { return new float3x2(v); } + + /// Explicitly converts a double3x2 matrix to a float3x2 matrix by componentwise conversion. + /// double3x2 to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x2(double3x2 v) { return new float3x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise multiplication. + /// Right hand side float3x2 to use to compute componentwise multiplication. + /// float3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator * (float3x2 lhs, float3x2 rhs) { return new float3x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator * (float3x2 lhs, float rhs) { return new float3x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float3x2 to use to compute componentwise multiplication. + /// float3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator * (float lhs, float3x2 rhs) { return new float3x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise addition. + /// Right hand side float3x2 to use to compute componentwise addition. + /// float3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator + (float3x2 lhs, float3x2 rhs) { return new float3x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator + (float3x2 lhs, float rhs) { return new float3x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float3x2 to use to compute componentwise addition. + /// float3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator + (float lhs, float3x2 rhs) { return new float3x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise subtraction. + /// Right hand side float3x2 to use to compute componentwise subtraction. + /// float3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator - (float3x2 lhs, float3x2 rhs) { return new float3x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator - (float3x2 lhs, float rhs) { return new float3x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float3x2 to use to compute componentwise subtraction. + /// float3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator - (float lhs, float3x2 rhs) { return new float3x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise division. + /// Right hand side float3x2 to use to compute componentwise division. + /// float3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator / (float3x2 lhs, float3x2 rhs) { return new float3x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator / (float3x2 lhs, float rhs) { return new float3x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float3x2 to use to compute componentwise division. + /// float3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator / (float lhs, float3x2 rhs) { return new float3x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise modulus. + /// Right hand side float3x2 to use to compute componentwise modulus. + /// float3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator % (float3x2 lhs, float3x2 rhs) { return new float3x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator % (float3x2 lhs, float rhs) { return new float3x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float3x2 to use to compute componentwise modulus. + /// float3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator % (float lhs, float3x2 rhs) { return new float3x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a float3x2 matrix. + /// Value to use when computing the componentwise increment. + /// float3x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator ++ (float3x2 val) { return new float3x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a float3x2 matrix. + /// Value to use when computing the componentwise decrement. + /// float3x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator -- (float3x2 val) { return new float3x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise less than. + /// Right hand side float3x2 to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (float3x2 lhs, float3x2 rhs) { return new bool3x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (float3x2 lhs, float rhs) { return new bool3x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float3x2 to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (float lhs, float3x2 rhs) { return new bool3x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise less or equal. + /// Right hand side float3x2 to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (float3x2 lhs, float3x2 rhs) { return new bool3x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (float3x2 lhs, float rhs) { return new bool3x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float3x2 to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (float lhs, float3x2 rhs) { return new bool3x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise greater than. + /// Right hand side float3x2 to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (float3x2 lhs, float3x2 rhs) { return new bool3x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (float3x2 lhs, float rhs) { return new bool3x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float3x2 to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (float lhs, float3x2 rhs) { return new bool3x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise greater or equal. + /// Right hand side float3x2 to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (float3x2 lhs, float3x2 rhs) { return new bool3x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (float3x2 lhs, float rhs) { return new bool3x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float3x2 to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (float lhs, float3x2 rhs) { return new bool3x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a float3x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// float3x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator - (float3x2 val) { return new float3x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a float3x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// float3x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 operator + (float3x2 val) { return new float3x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise equality operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise equality. + /// Right hand side float3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (float3x2 lhs, float3x2 rhs) { return new bool3x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (float3x2 lhs, float rhs) { return new bool3x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (float lhs, float3x2 rhs) { return new bool3x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two float3x2 matrices. + /// Left hand side float3x2 to use to compute componentwise not equal. + /// Right hand side float3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (float3x2 lhs, float3x2 rhs) { return new bool3x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a float3x2 matrix and a float value. + /// Left hand side float3x2 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (float3x2 lhs, float rhs) { return new bool3x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float3x2 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (float lhs, float3x2 rhs) { return new bool3x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + + /// Returns the float3 element at a specified index. + unsafe public ref float3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (float3x2* array = &this) { return ref ((float3*)array)[index]; } + } + } + + /// Returns true if the float3x2 is equal to a given float3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float3x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the float3x2 is equal to a given float3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float3x2 converted && Equals(converted); } + + + /// Returns a hash code for the float3x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float3x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float3x2({0}f, {1}f, {2}f, {3}f, {4}f, {5}f)", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z); + } + + /// Returns a string representation of the float3x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float3x2({0}f, {1}f, {2}f, {3}f, {4}f, {5}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float3x2 matrix constructed from two float3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// float3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(float3 c0, float3 c1) { return new float3x2(c0, c1); } + + /// Returns a float3x2 matrix constructed from from 6 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// float3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(float m00, float m01, + float m10, float m11, + float m20, float m21) + { + return new float3x2(m00, m01, + m10, m11, + m20, m21); + } + + /// Returns a float3x2 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(float v) { return new float3x2(v); } + + /// Returns a float3x2 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(bool v) { return new float3x2(v); } + + /// Return a float3x2 matrix constructed from a bool3x2 matrix by componentwise conversion. + /// bool3x2 to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(bool3x2 v) { return new float3x2(v); } + + /// Returns a float3x2 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(int v) { return new float3x2(v); } + + /// Return a float3x2 matrix constructed from a int3x2 matrix by componentwise conversion. + /// int3x2 to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(int3x2 v) { return new float3x2(v); } + + /// Returns a float3x2 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(uint v) { return new float3x2(v); } + + /// Return a float3x2 matrix constructed from a uint3x2 matrix by componentwise conversion. + /// uint3x2 to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(uint3x2 v) { return new float3x2(v); } + + /// Returns a float3x2 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(double v) { return new float3x2(v); } + + /// Return a float3x2 matrix constructed from a double3x2 matrix by componentwise conversion. + /// double3x2 to convert to float3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 float3x2(double3x2 v) { return new float3x2(v); } + + /// Return the float2x3 transpose of a float3x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 transpose(float3x2 v) + { + return float2x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z); + } + + /// Returns a uint hash code of a float3x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float3x2 v) + { + return csum(asuint(v.c0) * uint3(0xE121E6ADu, 0xC9CA1249u, 0x69B60C81u) + + asuint(v.c1) * uint3(0xE0EB6C25u, 0xF648BEABu, 0x6BDB2B07u)) + 0xEF63C699u; + } + + /// + /// Returns a uint3 vector hash code of a float3x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(float3x2 v) + { + return (asuint(v.c0) * uint3(0x9001903Fu, 0xA895B9CDu, 0x9D23B201u) + + asuint(v.c1) * uint3(0x4B01D3E1u, 0x7461CA0Du, 0x79725379u)) + 0xD6258E5Bu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float3x3.gen.cs b/ThirdParty/Unity.Mathematics/float3x3.gen.cs new file mode 100644 index 0000000..1492953 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float3x3.gen.cs @@ -0,0 +1,697 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x3 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float3x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float3 c0; + /// Column 1 of the matrix. + public float3 c1; + /// Column 2 of the matrix. + public float3 c2; + + /// float3x3 identity transform. + public static readonly float3x3 identity = new float3x3(1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f); + + /// float3x3 zero value. + public static readonly float3x3 zero; + + /// Constructs a float3x3 matrix from three float3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(float3 c0, float3 c1, float3 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a float3x3 matrix from 9 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(float m00, float m01, float m02, + float m10, float m11, float m12, + float m20, float m21, float m22) + { + this.c0 = new float3(m00, m10, m20); + this.c1 = new float3(m01, m11, m21); + this.c2 = new float3(m02, m12, m22); + } + + /// Constructs a float3x3 matrix from a single float value by assigning it to every component. + /// float to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float3x3 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(bool v) + { + this.c0 = math.select(new float3(0.0f), new float3(1.0f), v); + this.c1 = math.select(new float3(0.0f), new float3(1.0f), v); + this.c2 = math.select(new float3(0.0f), new float3(1.0f), v); + } + + /// Constructs a float3x3 matrix from a bool3x3 matrix by componentwise conversion. + /// bool3x3 to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(bool3x3 v) + { + this.c0 = math.select(new float3(0.0f), new float3(1.0f), v.c0); + this.c1 = math.select(new float3(0.0f), new float3(1.0f), v.c1); + this.c2 = math.select(new float3(0.0f), new float3(1.0f), v.c2); + } + + /// Constructs a float3x3 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float3x3 matrix from a int3x3 matrix by componentwise conversion. + /// int3x3 to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(int3x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a float3x3 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float3x3 matrix from a uint3x3 matrix by componentwise conversion. + /// uint3x3 to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(uint3x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a float3x3 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(double v) + { + this.c0 = (float3)v; + this.c1 = (float3)v; + this.c2 = (float3)v; + } + + /// Constructs a float3x3 matrix from a double3x3 matrix by componentwise conversion. + /// double3x3 to convert to float3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x3(double3x3 v) + { + this.c0 = (float3)v.c0; + this.c1 = (float3)v.c1; + this.c2 = (float3)v.c2; + } + + + /// Implicitly converts a single float value to a float3x3 matrix by assigning it to every component. + /// float to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x3(float v) { return new float3x3(v); } + + /// Explicitly converts a single bool value to a float3x3 matrix by converting it to float and assigning it to every component. + /// bool to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x3(bool v) { return new float3x3(v); } + + /// Explicitly converts a bool3x3 matrix to a float3x3 matrix by componentwise conversion. + /// bool3x3 to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x3(bool3x3 v) { return new float3x3(v); } + + /// Implicitly converts a single int value to a float3x3 matrix by converting it to float and assigning it to every component. + /// int to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x3(int v) { return new float3x3(v); } + + /// Implicitly converts a int3x3 matrix to a float3x3 matrix by componentwise conversion. + /// int3x3 to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x3(int3x3 v) { return new float3x3(v); } + + /// Implicitly converts a single uint value to a float3x3 matrix by converting it to float and assigning it to every component. + /// uint to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x3(uint v) { return new float3x3(v); } + + /// Implicitly converts a uint3x3 matrix to a float3x3 matrix by componentwise conversion. + /// uint3x3 to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x3(uint3x3 v) { return new float3x3(v); } + + /// Explicitly converts a single double value to a float3x3 matrix by converting it to float and assigning it to every component. + /// double to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x3(double v) { return new float3x3(v); } + + /// Explicitly converts a double3x3 matrix to a float3x3 matrix by componentwise conversion. + /// double3x3 to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x3(double3x3 v) { return new float3x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise multiplication. + /// Right hand side float3x3 to use to compute componentwise multiplication. + /// float3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator * (float3x3 lhs, float3x3 rhs) { return new float3x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator * (float3x3 lhs, float rhs) { return new float3x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float3x3 to use to compute componentwise multiplication. + /// float3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator * (float lhs, float3x3 rhs) { return new float3x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise addition. + /// Right hand side float3x3 to use to compute componentwise addition. + /// float3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator + (float3x3 lhs, float3x3 rhs) { return new float3x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator + (float3x3 lhs, float rhs) { return new float3x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float3x3 to use to compute componentwise addition. + /// float3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator + (float lhs, float3x3 rhs) { return new float3x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise subtraction. + /// Right hand side float3x3 to use to compute componentwise subtraction. + /// float3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator - (float3x3 lhs, float3x3 rhs) { return new float3x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator - (float3x3 lhs, float rhs) { return new float3x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float3x3 to use to compute componentwise subtraction. + /// float3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator - (float lhs, float3x3 rhs) { return new float3x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise division. + /// Right hand side float3x3 to use to compute componentwise division. + /// float3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator / (float3x3 lhs, float3x3 rhs) { return new float3x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator / (float3x3 lhs, float rhs) { return new float3x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float3x3 to use to compute componentwise division. + /// float3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator / (float lhs, float3x3 rhs) { return new float3x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise modulus. + /// Right hand side float3x3 to use to compute componentwise modulus. + /// float3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator % (float3x3 lhs, float3x3 rhs) { return new float3x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator % (float3x3 lhs, float rhs) { return new float3x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float3x3 to use to compute componentwise modulus. + /// float3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator % (float lhs, float3x3 rhs) { return new float3x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a float3x3 matrix. + /// Value to use when computing the componentwise increment. + /// float3x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator ++ (float3x3 val) { return new float3x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a float3x3 matrix. + /// Value to use when computing the componentwise decrement. + /// float3x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator -- (float3x3 val) { return new float3x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise less than. + /// Right hand side float3x3 to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (float3x3 lhs, float3x3 rhs) { return new bool3x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (float3x3 lhs, float rhs) { return new bool3x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float3x3 to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (float lhs, float3x3 rhs) { return new bool3x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise less or equal. + /// Right hand side float3x3 to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (float3x3 lhs, float3x3 rhs) { return new bool3x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (float3x3 lhs, float rhs) { return new bool3x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float3x3 to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (float lhs, float3x3 rhs) { return new bool3x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise greater than. + /// Right hand side float3x3 to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (float3x3 lhs, float3x3 rhs) { return new bool3x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (float3x3 lhs, float rhs) { return new bool3x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float3x3 to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (float lhs, float3x3 rhs) { return new bool3x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise greater or equal. + /// Right hand side float3x3 to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (float3x3 lhs, float3x3 rhs) { return new bool3x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (float3x3 lhs, float rhs) { return new bool3x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float3x3 to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (float lhs, float3x3 rhs) { return new bool3x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a float3x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// float3x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator - (float3x3 val) { return new float3x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a float3x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// float3x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 operator + (float3x3 val) { return new float3x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise equality operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise equality. + /// Right hand side float3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (float3x3 lhs, float3x3 rhs) { return new bool3x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (float3x3 lhs, float rhs) { return new bool3x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (float lhs, float3x3 rhs) { return new bool3x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two float3x3 matrices. + /// Left hand side float3x3 to use to compute componentwise not equal. + /// Right hand side float3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (float3x3 lhs, float3x3 rhs) { return new bool3x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a float3x3 matrix and a float value. + /// Left hand side float3x3 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (float3x3 lhs, float rhs) { return new bool3x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float3x3 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (float lhs, float3x3 rhs) { return new bool3x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + + /// Returns the float3 element at a specified index. + unsafe public ref float3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (float3x3* array = &this) { return ref ((float3*)array)[index]; } + } + } + + /// Returns true if the float3x3 is equal to a given float3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float3x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the float3x3 is equal to a given float3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float3x3 converted && Equals(converted); } + + + /// Returns a hash code for the float3x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float3x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float3x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f)", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z); + } + + /// Returns a string representation of the float3x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float3x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float3x3 matrix constructed from three float3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// float3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(float3 c0, float3 c1, float3 c2) { return new float3x3(c0, c1, c2); } + + /// Returns a float3x3 matrix constructed from from 9 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// float3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(float m00, float m01, float m02, + float m10, float m11, float m12, + float m20, float m21, float m22) + { + return new float3x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22); + } + + /// Returns a float3x3 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(float v) { return new float3x3(v); } + + /// Returns a float3x3 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(bool v) { return new float3x3(v); } + + /// Return a float3x3 matrix constructed from a bool3x3 matrix by componentwise conversion. + /// bool3x3 to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(bool3x3 v) { return new float3x3(v); } + + /// Returns a float3x3 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(int v) { return new float3x3(v); } + + /// Return a float3x3 matrix constructed from a int3x3 matrix by componentwise conversion. + /// int3x3 to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(int3x3 v) { return new float3x3(v); } + + /// Returns a float3x3 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(uint v) { return new float3x3(v); } + + /// Return a float3x3 matrix constructed from a uint3x3 matrix by componentwise conversion. + /// uint3x3 to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(uint3x3 v) { return new float3x3(v); } + + /// Returns a float3x3 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(double v) { return new float3x3(v); } + + /// Return a float3x3 matrix constructed from a double3x3 matrix by componentwise conversion. + /// double3x3 to convert to float3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(double3x3 v) { return new float3x3(v); } + + /// Return the float3x3 transpose of a float3x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 transpose(float3x3 v) + { + return float3x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z); + } + + /// Returns the float3x3 full inverse of a float3x3 matrix. + /// Matrix to invert. + /// The inverted matrix. + public static float3x3 inverse(float3x3 m) + { + float3 c0 = m.c0; + float3 c1 = m.c1; + float3 c2 = m.c2; + + float3 t0 = float3(c1.x, c2.x, c0.x); + float3 t1 = float3(c1.y, c2.y, c0.y); + float3 t2 = float3(c1.z, c2.z, c0.z); + + float3 m0 = t1 * t2.yzx - t1.yzx * t2; + float3 m1 = t0.yzx * t2 - t0 * t2.yzx; + float3 m2 = t0 * t1.yzx - t0.yzx * t1; + + float rcpDet = 1.0f / csum(t0.zxy * m0); + return float3x3(m0, m1, m2) * rcpDet; + } + + /// Returns the determinant of a float3x3 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float determinant(float3x3 m) + { + float3 c0 = m.c0; + float3 c1 = m.c1; + float3 c2 = m.c2; + + float m00 = c1.y * c2.z - c1.z * c2.y; + float m01 = c0.y * c2.z - c0.z * c2.y; + float m02 = c0.y * c1.z - c0.z * c1.y; + + return c0.x * m00 - c1.x * m01 + c2.x * m02; + } + + /// Returns a uint hash code of a float3x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float3x3 v) + { + return csum(asuint(v.c0) * uint3(0x713BD06Fu, 0x753AD6ADu, 0xD19764C7u) + + asuint(v.c1) * uint3(0xB5D0BF63u, 0xF9102C5Fu, 0x9881FB9Fu) + + asuint(v.c2) * uint3(0x56A1530Du, 0x804B722Du, 0x738E50E5u)) + 0x4FC93C25u; + } + + /// + /// Returns a uint3 vector hash code of a float3x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(float3x3 v) + { + return (asuint(v.c0) * uint3(0xCD0445A5u, 0xD2B90D9Bu, 0xD35C9B2Du) + + asuint(v.c1) * uint3(0xA10D9E27u, 0x568DAAA9u, 0x7530254Fu) + + asuint(v.c2) * uint3(0x9F090439u, 0x5E9F85C9u, 0x8C4CA03Fu)) + 0xB8D969EDu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float3x4.gen.cs b/ThirdParty/Unity.Mathematics/float3x4.gen.cs new file mode 100644 index 0000000..f6111f6 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float3x4.gen.cs @@ -0,0 +1,699 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x4 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float3x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float3 c0; + /// Column 1 of the matrix. + public float3 c1; + /// Column 2 of the matrix. + public float3 c2; + /// Column 3 of the matrix. + public float3 c3; + + /// float3x4 zero value. + public static readonly float3x4 zero; + + /// Constructs a float3x4 matrix from four float3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(float3 c0, float3 c1, float3 c2, float3 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a float3x4 matrix from 12 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13, + float m20, float m21, float m22, float m23) + { + this.c0 = new float3(m00, m10, m20); + this.c1 = new float3(m01, m11, m21); + this.c2 = new float3(m02, m12, m22); + this.c3 = new float3(m03, m13, m23); + } + + /// Constructs a float3x4 matrix from a single float value by assigning it to every component. + /// float to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float3x4 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(bool v) + { + this.c0 = math.select(new float3(0.0f), new float3(1.0f), v); + this.c1 = math.select(new float3(0.0f), new float3(1.0f), v); + this.c2 = math.select(new float3(0.0f), new float3(1.0f), v); + this.c3 = math.select(new float3(0.0f), new float3(1.0f), v); + } + + /// Constructs a float3x4 matrix from a bool3x4 matrix by componentwise conversion. + /// bool3x4 to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(bool3x4 v) + { + this.c0 = math.select(new float3(0.0f), new float3(1.0f), v.c0); + this.c1 = math.select(new float3(0.0f), new float3(1.0f), v.c1); + this.c2 = math.select(new float3(0.0f), new float3(1.0f), v.c2); + this.c3 = math.select(new float3(0.0f), new float3(1.0f), v.c3); + } + + /// Constructs a float3x4 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float3x4 matrix from a int3x4 matrix by componentwise conversion. + /// int3x4 to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(int3x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a float3x4 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float3x4 matrix from a uint3x4 matrix by componentwise conversion. + /// uint3x4 to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(uint3x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a float3x4 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(double v) + { + this.c0 = (float3)v; + this.c1 = (float3)v; + this.c2 = (float3)v; + this.c3 = (float3)v; + } + + /// Constructs a float3x4 matrix from a double3x4 matrix by componentwise conversion. + /// double3x4 to convert to float3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3x4(double3x4 v) + { + this.c0 = (float3)v.c0; + this.c1 = (float3)v.c1; + this.c2 = (float3)v.c2; + this.c3 = (float3)v.c3; + } + + + /// Implicitly converts a single float value to a float3x4 matrix by assigning it to every component. + /// float to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x4(float v) { return new float3x4(v); } + + /// Explicitly converts a single bool value to a float3x4 matrix by converting it to float and assigning it to every component. + /// bool to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x4(bool v) { return new float3x4(v); } + + /// Explicitly converts a bool3x4 matrix to a float3x4 matrix by componentwise conversion. + /// bool3x4 to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x4(bool3x4 v) { return new float3x4(v); } + + /// Implicitly converts a single int value to a float3x4 matrix by converting it to float and assigning it to every component. + /// int to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x4(int v) { return new float3x4(v); } + + /// Implicitly converts a int3x4 matrix to a float3x4 matrix by componentwise conversion. + /// int3x4 to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x4(int3x4 v) { return new float3x4(v); } + + /// Implicitly converts a single uint value to a float3x4 matrix by converting it to float and assigning it to every component. + /// uint to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x4(uint v) { return new float3x4(v); } + + /// Implicitly converts a uint3x4 matrix to a float3x4 matrix by componentwise conversion. + /// uint3x4 to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float3x4(uint3x4 v) { return new float3x4(v); } + + /// Explicitly converts a single double value to a float3x4 matrix by converting it to float and assigning it to every component. + /// double to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x4(double v) { return new float3x4(v); } + + /// Explicitly converts a double3x4 matrix to a float3x4 matrix by componentwise conversion. + /// double3x4 to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float3x4(double3x4 v) { return new float3x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise multiplication. + /// Right hand side float3x4 to use to compute componentwise multiplication. + /// float3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator * (float3x4 lhs, float3x4 rhs) { return new float3x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator * (float3x4 lhs, float rhs) { return new float3x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float3x4 to use to compute componentwise multiplication. + /// float3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator * (float lhs, float3x4 rhs) { return new float3x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise addition. + /// Right hand side float3x4 to use to compute componentwise addition. + /// float3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator + (float3x4 lhs, float3x4 rhs) { return new float3x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator + (float3x4 lhs, float rhs) { return new float3x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float3x4 to use to compute componentwise addition. + /// float3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator + (float lhs, float3x4 rhs) { return new float3x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise subtraction. + /// Right hand side float3x4 to use to compute componentwise subtraction. + /// float3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator - (float3x4 lhs, float3x4 rhs) { return new float3x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator - (float3x4 lhs, float rhs) { return new float3x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float3x4 to use to compute componentwise subtraction. + /// float3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator - (float lhs, float3x4 rhs) { return new float3x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise division. + /// Right hand side float3x4 to use to compute componentwise division. + /// float3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator / (float3x4 lhs, float3x4 rhs) { return new float3x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator / (float3x4 lhs, float rhs) { return new float3x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float3x4 to use to compute componentwise division. + /// float3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator / (float lhs, float3x4 rhs) { return new float3x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise modulus. + /// Right hand side float3x4 to use to compute componentwise modulus. + /// float3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator % (float3x4 lhs, float3x4 rhs) { return new float3x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator % (float3x4 lhs, float rhs) { return new float3x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float3x4 to use to compute componentwise modulus. + /// float3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator % (float lhs, float3x4 rhs) { return new float3x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a float3x4 matrix. + /// Value to use when computing the componentwise increment. + /// float3x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator ++ (float3x4 val) { return new float3x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a float3x4 matrix. + /// Value to use when computing the componentwise decrement. + /// float3x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator -- (float3x4 val) { return new float3x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise less than. + /// Right hand side float3x4 to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (float3x4 lhs, float3x4 rhs) { return new bool3x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (float3x4 lhs, float rhs) { return new bool3x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float3x4 to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (float lhs, float3x4 rhs) { return new bool3x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise less or equal. + /// Right hand side float3x4 to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (float3x4 lhs, float3x4 rhs) { return new bool3x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (float3x4 lhs, float rhs) { return new bool3x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float3x4 to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (float lhs, float3x4 rhs) { return new bool3x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise greater than. + /// Right hand side float3x4 to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (float3x4 lhs, float3x4 rhs) { return new bool3x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (float3x4 lhs, float rhs) { return new bool3x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float3x4 to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (float lhs, float3x4 rhs) { return new bool3x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise greater or equal. + /// Right hand side float3x4 to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (float3x4 lhs, float3x4 rhs) { return new bool3x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (float3x4 lhs, float rhs) { return new bool3x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float3x4 to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (float lhs, float3x4 rhs) { return new bool3x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a float3x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// float3x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator - (float3x4 val) { return new float3x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a float3x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// float3x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 operator + (float3x4 val) { return new float3x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise equality operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise equality. + /// Right hand side float3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (float3x4 lhs, float3x4 rhs) { return new bool3x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (float3x4 lhs, float rhs) { return new bool3x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (float lhs, float3x4 rhs) { return new bool3x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two float3x4 matrices. + /// Left hand side float3x4 to use to compute componentwise not equal. + /// Right hand side float3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (float3x4 lhs, float3x4 rhs) { return new bool3x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a float3x4 matrix and a float value. + /// Left hand side float3x4 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (float3x4 lhs, float rhs) { return new bool3x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float3x4 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (float lhs, float3x4 rhs) { return new bool3x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + + /// Returns the float3 element at a specified index. + unsafe public ref float3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (float3x4* array = &this) { return ref ((float3*)array)[index]; } + } + } + + /// Returns true if the float3x4 is equal to a given float3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float3x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the float3x4 is equal to a given float3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float3x4 converted && Equals(converted); } + + + /// Returns a hash code for the float3x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float3x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float3x4({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f, {9}f, {10}f, {11}f)", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z); + } + + /// Returns a string representation of the float3x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float3x4({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f, {9}f, {10}f, {11}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c3.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float3x4 matrix constructed from four float3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// float3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(float3 c0, float3 c1, float3 c2, float3 c3) { return new float3x4(c0, c1, c2, c3); } + + /// Returns a float3x4 matrix constructed from from 12 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// float3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13, + float m20, float m21, float m22, float m23) + { + return new float3x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23); + } + + /// Returns a float3x4 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(float v) { return new float3x4(v); } + + /// Returns a float3x4 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(bool v) { return new float3x4(v); } + + /// Return a float3x4 matrix constructed from a bool3x4 matrix by componentwise conversion. + /// bool3x4 to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(bool3x4 v) { return new float3x4(v); } + + /// Returns a float3x4 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(int v) { return new float3x4(v); } + + /// Return a float3x4 matrix constructed from a int3x4 matrix by componentwise conversion. + /// int3x4 to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(int3x4 v) { return new float3x4(v); } + + /// Returns a float3x4 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(uint v) { return new float3x4(v); } + + /// Return a float3x4 matrix constructed from a uint3x4 matrix by componentwise conversion. + /// uint3x4 to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(uint3x4 v) { return new float3x4(v); } + + /// Returns a float3x4 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(double v) { return new float3x4(v); } + + /// Return a float3x4 matrix constructed from a double3x4 matrix by componentwise conversion. + /// double3x4 to convert to float3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 float3x4(double3x4 v) { return new float3x4(v); } + + /// Return the float4x3 transpose of a float3x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 transpose(float3x4 v) + { + return float4x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z, + v.c3.x, v.c3.y, v.c3.z); + } + + /// Fast matrix inverse for rigid transforms (orthonormal basis and translation) + /// Matrix to invert. + /// The inverted matrix. + public static float3x4 fastinverse(float3x4 m) + { + float3 c0 = m.c0; + float3 c1 = m.c1; + float3 c2 = m.c2; + float3 pos = m.c3; + + float3 r0 = float3(c0.x, c1.x, c2.x); + float3 r1 = float3(c0.y, c1.y, c2.y); + float3 r2 = float3(c0.z, c1.z, c2.z); + + pos = -(r0 * pos.x + r1 * pos.y + r2 * pos.z); + + return float3x4(r0, r1, r2, pos); + } + + /// Returns a uint hash code of a float3x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float3x4 v) + { + return csum(asuint(v.c0) * uint3(0xF9EA92D5u, 0xC2FAFCB9u, 0x616E9CA1u) + + asuint(v.c1) * uint3(0xC5C5394Bu, 0xCAE78587u, 0x7A1541C9u) + + asuint(v.c2) * uint3(0xF83BD927u, 0x6A243BCBu, 0x509B84C9u) + + asuint(v.c3) * uint3(0x91D13847u, 0x52F7230Fu, 0xCF286E83u)) + 0xE121E6ADu; + } + + /// + /// Returns a uint3 vector hash code of a float3x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(float3x4 v) + { + return (asuint(v.c0) * uint3(0xC9CA1249u, 0x69B60C81u, 0xE0EB6C25u) + + asuint(v.c1) * uint3(0xF648BEABu, 0x6BDB2B07u, 0xEF63C699u) + + asuint(v.c2) * uint3(0x9001903Fu, 0xA895B9CDu, 0x9D23B201u) + + asuint(v.c3) * uint3(0x4B01D3E1u, 0x7461CA0Du, 0x79725379u)) + 0xD6258E5Bu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float4.gen.cs b/ThirdParty/Unity.Mathematics/float4.gen.cs new file mode 100644 index 0000000..ef5d96c --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float4.gen.cs @@ -0,0 +1,4052 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4 component vector of floats. + [DebuggerTypeProxy(typeof(float4.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float4 : System.IEquatable, IFormattable + { + /// x component of the vector. + public float x; + /// y component of the vector. + public float y; + /// z component of the vector. + public float z; + /// w component of the vector. + public float w; + + /// float4 zero value. + public static readonly float4 zero; + + /// Constructs a float4 vector from four float values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float x, float y, float z, float w) + { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + /// Constructs a float4 vector from two float values and a float2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float x, float y, float2 zw) + { + this.x = x; + this.y = y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a float4 vector from a float value, a float2 vector and a float value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float x, float2 yz, float w) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + this.w = w; + } + + /// Constructs a float4 vector from a float value and a float3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float x, float3 yzw) + { + this.x = x; + this.y = yzw.x; + this.z = yzw.y; + this.w = yzw.z; + } + + /// Constructs a float4 vector from a float2 vector and two float values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float2 xy, float z, float w) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + this.w = w; + } + + /// Constructs a float4 vector from two float2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float2 xy, float2 zw) + { + this.x = xy.x; + this.y = xy.y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a float4 vector from a float3 vector and a float value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float3 xyz, float w) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + this.w = w; + } + + /// Constructs a float4 vector from a float4 vector. + /// The constructed vector's xyzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float4 xyzw) + { + this.x = xyzw.x; + this.y = xyzw.y; + this.z = xyzw.z; + this.w = xyzw.w; + } + + /// Constructs a float4 vector from a single float value by assigning it to every component. + /// float to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(float v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a float4 vector from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(bool v) + { + this.x = v ? 1.0f : 0.0f; + this.y = v ? 1.0f : 0.0f; + this.z = v ? 1.0f : 0.0f; + this.w = v ? 1.0f : 0.0f; + } + + /// Constructs a float4 vector from a bool4 vector by componentwise conversion. + /// bool4 to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(bool4 v) + { + this.x = v.x ? 1.0f : 0.0f; + this.y = v.y ? 1.0f : 0.0f; + this.z = v.z ? 1.0f : 0.0f; + this.w = v.w ? 1.0f : 0.0f; + } + + /// Constructs a float4 vector from a single int value by converting it to float and assigning it to every component. + /// int to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(int v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a float4 vector from a int4 vector by componentwise conversion. + /// int4 to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(int4 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = v.w; + } + + /// Constructs a float4 vector from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(uint v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a float4 vector from a uint4 vector by componentwise conversion. + /// uint4 to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(uint4 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = v.w; + } + + /// Constructs a float4 vector from a single half value by converting it to float and assigning it to every component. + /// half to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(half v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a float4 vector from a half4 vector by componentwise conversion. + /// half4 to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(half4 v) + { + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = v.w; + } + + /// Constructs a float4 vector from a single double value by converting it to float and assigning it to every component. + /// double to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(double v) + { + this.x = (float)v; + this.y = (float)v; + this.z = (float)v; + this.w = (float)v; + } + + /// Constructs a float4 vector from a double4 vector by componentwise conversion. + /// double4 to convert to float4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4(double4 v) + { + this.x = (float)v.x; + this.y = (float)v.y; + this.z = (float)v.z; + this.w = (float)v.w; + } + + + /// Implicitly converts a single float value to a float4 vector by assigning it to every component. + /// float to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4(float v) { return new float4(v); } + + /// Explicitly converts a single bool value to a float4 vector by converting it to float and assigning it to every component. + /// bool to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4(bool v) { return new float4(v); } + + /// Explicitly converts a bool4 vector to a float4 vector by componentwise conversion. + /// bool4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4(bool4 v) { return new float4(v); } + + /// Implicitly converts a single int value to a float4 vector by converting it to float and assigning it to every component. + /// int to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4(int v) { return new float4(v); } + + /// Implicitly converts a int4 vector to a float4 vector by componentwise conversion. + /// int4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4(int4 v) { return new float4(v); } + + /// Implicitly converts a single uint value to a float4 vector by converting it to float and assigning it to every component. + /// uint to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4(uint v) { return new float4(v); } + + /// Implicitly converts a uint4 vector to a float4 vector by componentwise conversion. + /// uint4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4(uint4 v) { return new float4(v); } + + /// Implicitly converts a single half value to a float4 vector by converting it to float and assigning it to every component. + /// half to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4(half v) { return new float4(v); } + + /// Implicitly converts a half4 vector to a float4 vector by componentwise conversion. + /// half4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4(half4 v) { return new float4(v); } + + /// Explicitly converts a single double value to a float4 vector by converting it to float and assigning it to every component. + /// double to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4(double v) { return new float4(v); } + + /// Explicitly converts a double4 vector to a float4 vector by componentwise conversion. + /// double4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4(double4 v) { return new float4(v); } + + + /// Returns the result of a componentwise multiplication operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise multiplication. + /// Right hand side float4 to use to compute componentwise multiplication. + /// float4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator * (float4 lhs, float4 rhs) { return new float4 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z, lhs.w * rhs.w); } + + /// Returns the result of a componentwise multiplication operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator * (float4 lhs, float rhs) { return new float4 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs, lhs.w * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float4 to use to compute componentwise multiplication. + /// float4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator * (float lhs, float4 rhs) { return new float4 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z, lhs * rhs.w); } + + + /// Returns the result of a componentwise addition operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise addition. + /// Right hand side float4 to use to compute componentwise addition. + /// float4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator + (float4 lhs, float4 rhs) { return new float4 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z, lhs.w + rhs.w); } + + /// Returns the result of a componentwise addition operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator + (float4 lhs, float rhs) { return new float4 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs, lhs.w + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float4 to use to compute componentwise addition. + /// float4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator + (float lhs, float4 rhs) { return new float4 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z, lhs + rhs.w); } + + + /// Returns the result of a componentwise subtraction operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise subtraction. + /// Right hand side float4 to use to compute componentwise subtraction. + /// float4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator - (float4 lhs, float4 rhs) { return new float4 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z, lhs.w - rhs.w); } + + /// Returns the result of a componentwise subtraction operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator - (float4 lhs, float rhs) { return new float4 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs, lhs.w - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float4 to use to compute componentwise subtraction. + /// float4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator - (float lhs, float4 rhs) { return new float4 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z, lhs - rhs.w); } + + + /// Returns the result of a componentwise division operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise division. + /// Right hand side float4 to use to compute componentwise division. + /// float4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator / (float4 lhs, float4 rhs) { return new float4 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z, lhs.w / rhs.w); } + + /// Returns the result of a componentwise division operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator / (float4 lhs, float rhs) { return new float4 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs, lhs.w / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float4 to use to compute componentwise division. + /// float4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator / (float lhs, float4 rhs) { return new float4 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z, lhs / rhs.w); } + + + /// Returns the result of a componentwise modulus operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise modulus. + /// Right hand side float4 to use to compute componentwise modulus. + /// float4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator % (float4 lhs, float4 rhs) { return new float4 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z, lhs.w % rhs.w); } + + /// Returns the result of a componentwise modulus operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator % (float4 lhs, float rhs) { return new float4 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs, lhs.w % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float4 to use to compute componentwise modulus. + /// float4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator % (float lhs, float4 rhs) { return new float4 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z, lhs % rhs.w); } + + + /// Returns the result of a componentwise increment operation on a float4 vector. + /// Value to use when computing the componentwise increment. + /// float4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator ++ (float4 val) { return new float4 (++val.x, ++val.y, ++val.z, ++val.w); } + + + /// Returns the result of a componentwise decrement operation on a float4 vector. + /// Value to use when computing the componentwise decrement. + /// float4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator -- (float4 val) { return new float4 (--val.x, --val.y, --val.z, --val.w); } + + + /// Returns the result of a componentwise less than operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise less than. + /// Right hand side float4 to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (float4 lhs, float4 rhs) { return new bool4 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z, lhs.w < rhs.w); } + + /// Returns the result of a componentwise less than operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (float4 lhs, float rhs) { return new bool4 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs, lhs.w < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float4 to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (float lhs, float4 rhs) { return new bool4 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z, lhs < rhs.w); } + + + /// Returns the result of a componentwise less or equal operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise less or equal. + /// Right hand side float4 to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (float4 lhs, float4 rhs) { return new bool4 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z, lhs.w <= rhs.w); } + + /// Returns the result of a componentwise less or equal operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (float4 lhs, float rhs) { return new bool4 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs, lhs.w <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float4 to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (float lhs, float4 rhs) { return new bool4 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z, lhs <= rhs.w); } + + + /// Returns the result of a componentwise greater than operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise greater than. + /// Right hand side float4 to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (float4 lhs, float4 rhs) { return new bool4 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z, lhs.w > rhs.w); } + + /// Returns the result of a componentwise greater than operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (float4 lhs, float rhs) { return new bool4 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs, lhs.w > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float4 to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (float lhs, float4 rhs) { return new bool4 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z, lhs > rhs.w); } + + + /// Returns the result of a componentwise greater or equal operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise greater or equal. + /// Right hand side float4 to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (float4 lhs, float4 rhs) { return new bool4 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z, lhs.w >= rhs.w); } + + /// Returns the result of a componentwise greater or equal operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (float4 lhs, float rhs) { return new bool4 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs, lhs.w >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float4 to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (float lhs, float4 rhs) { return new bool4 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z, lhs >= rhs.w); } + + + /// Returns the result of a componentwise unary minus operation on a float4 vector. + /// Value to use when computing the componentwise unary minus. + /// float4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator - (float4 val) { return new float4 (-val.x, -val.y, -val.z, -val.w); } + + + /// Returns the result of a componentwise unary plus operation on a float4 vector. + /// Value to use when computing the componentwise unary plus. + /// float4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 operator + (float4 val) { return new float4 (+val.x, +val.y, +val.z, +val.w); } + + + /// Returns the result of a componentwise equality operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise equality. + /// Right hand side float4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (float4 lhs, float4 rhs) { return new bool4 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z, lhs.w == rhs.w); } + + /// Returns the result of a componentwise equality operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (float4 lhs, float rhs) { return new bool4 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs, lhs.w == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (float lhs, float4 rhs) { return new bool4 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z, lhs == rhs.w); } + + + /// Returns the result of a componentwise not equal operation on two float4 vectors. + /// Left hand side float4 to use to compute componentwise not equal. + /// Right hand side float4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (float4 lhs, float4 rhs) { return new bool4 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z, lhs.w != rhs.w); } + + /// Returns the result of a componentwise not equal operation on a float4 vector and a float value. + /// Left hand side float4 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (float4 lhs, float rhs) { return new bool4 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs, lhs.w != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float4 vector. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (float lhs, float4 rhs) { return new bool4 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z, lhs != rhs.w); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 xwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(x, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 yzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 ywww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(y, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 zwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(z, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float4 wwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float4(w, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 xww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 ywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 ywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 ywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 yww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 zww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 wwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float3 www + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float3(w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 xw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 yw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 zw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 wx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 wy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 wz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public float2 ww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new float2(w, w); } + } + + + + /// Returns the float element at a specified index. + unsafe public float this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (float4* array = &this) { return ((float*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (float* array = &x) { array[index] = value; } + } + } + + /// Returns true if the float4 is equal to a given float4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } + + /// Returns true if the float4 is equal to a given float4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float4 converted && Equals(converted); } + + + /// Returns a hash code for the float4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float4({0}f, {1}f, {2}f, {3}f)", x, y, z, w); + } + + /// Returns a string representation of the float4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float4({0}f, {1}f, {2}f, {3}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public float x; + public float y; + public float z; + public float w; + public DebuggerProxy(float4 v) + { + x = v.x; + y = v.y; + z = v.z; + w = v.w; + } + } + + } + + public static partial class math + { + /// Returns a float4 vector constructed from four float values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// float4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float x, float y, float z, float w) { return new float4(x, y, z, w); } + + /// Returns a float4 vector constructed from two float values and a float2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// float4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float x, float y, float2 zw) { return new float4(x, y, zw); } + + /// Returns a float4 vector constructed from a float value, a float2 vector and a float value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// float4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float x, float2 yz, float w) { return new float4(x, yz, w); } + + /// Returns a float4 vector constructed from a float value and a float3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + /// float4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float x, float3 yzw) { return new float4(x, yzw); } + + /// Returns a float4 vector constructed from a float2 vector and two float values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// float4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float2 xy, float z, float w) { return new float4(xy, z, w); } + + /// Returns a float4 vector constructed from two float2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// float4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float2 xy, float2 zw) { return new float4(xy, zw); } + + /// Returns a float4 vector constructed from a float3 vector and a float value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// float4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float3 xyz, float w) { return new float4(xyz, w); } + + /// Returns a float4 vector constructed from a float4 vector. + /// The constructed vector's xyzw components will be set to this value. + /// float4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float4 xyzw) { return new float4(xyzw); } + + /// Returns a float4 vector constructed from a single float value by assigning it to every component. + /// float to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(float v) { return new float4(v); } + + /// Returns a float4 vector constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(bool v) { return new float4(v); } + + /// Return a float4 vector constructed from a bool4 vector by componentwise conversion. + /// bool4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(bool4 v) { return new float4(v); } + + /// Returns a float4 vector constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(int v) { return new float4(v); } + + /// Return a float4 vector constructed from a int4 vector by componentwise conversion. + /// int4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(int4 v) { return new float4(v); } + + /// Returns a float4 vector constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(uint v) { return new float4(v); } + + /// Return a float4 vector constructed from a uint4 vector by componentwise conversion. + /// uint4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(uint4 v) { return new float4(v); } + + /// Returns a float4 vector constructed from a single half value by converting it to float and assigning it to every component. + /// half to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(half v) { return new float4(v); } + + /// Return a float4 vector constructed from a half4 vector by componentwise conversion. + /// half4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(half4 v) { return new float4(v); } + + /// Returns a float4 vector constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(double v) { return new float4(v); } + + /// Return a float4 vector constructed from a double4 vector by componentwise conversion. + /// double4 to convert to float4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 float4(double4 v) { return new float4(v); } + + /// Returns a uint hash code of a float4 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float4 v) + { + return csum(asuint(v) * uint4(0xE69626FFu, 0xBD010EEBu, 0x9CEDE1D1u, 0x43BE0B51u)) + 0xAF836EE1u; + } + + /// + /// Returns a uint4 vector hash code of a float4 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(float4 v) + { + return (asuint(v) * uint4(0xB130C137u, 0x54834775u, 0x7C022221u, 0xA2D00EDFu)) + 0xA8977779u; + } + + /// Returns the result of specified shuffling of the components from two float4 vectors into a float value. + /// float4 to use as the left argument of the shuffle operation. + /// float4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float. + /// float result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float shuffle(float4 left, float4 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two float4 vectors into a float2 vector. + /// float4 to use as the left argument of the shuffle operation. + /// float4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float2 x component. + /// The ShuffleComponent to use when setting the resulting float2 y component. + /// float2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 shuffle(float4 left, float4 right, ShuffleComponent x, ShuffleComponent y) + { + return float2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two float4 vectors into a float3 vector. + /// float4 to use as the left argument of the shuffle operation. + /// float4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float3 x component. + /// The ShuffleComponent to use when setting the resulting float3 y component. + /// The ShuffleComponent to use when setting the resulting float3 z component. + /// float3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 shuffle(float4 left, float4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return float3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two float4 vectors into a float4 vector. + /// float4 to use as the left argument of the shuffle operation. + /// float4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting float4 x component. + /// The ShuffleComponent to use when setting the resulting float4 y component. + /// The ShuffleComponent to use when setting the resulting float4 z component. + /// The ShuffleComponent to use when setting the resulting float4 w component. + /// float4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 shuffle(float4 left, float4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return float4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float select_shuffle_component(float4 a, float4 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.LeftW: + return a.w; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + case ShuffleComponent.RightW: + return b.w; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float4x2.gen.cs b/ThirdParty/Unity.Mathematics/float4x2.gen.cs new file mode 100644 index 0000000..1b5d6b1 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float4x2.gen.cs @@ -0,0 +1,639 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x2 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float4x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float4 c0; + /// Column 1 of the matrix. + public float4 c1; + + /// float4x2 zero value. + public static readonly float4x2 zero; + + /// Constructs a float4x2 matrix from two float4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(float4 c0, float4 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a float4x2 matrix from 8 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(float m00, float m01, + float m10, float m11, + float m20, float m21, + float m30, float m31) + { + this.c0 = new float4(m00, m10, m20, m30); + this.c1 = new float4(m01, m11, m21, m31); + } + + /// Constructs a float4x2 matrix from a single float value by assigning it to every component. + /// float to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(float v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float4x2 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(bool v) + { + this.c0 = math.select(new float4(0.0f), new float4(1.0f), v); + this.c1 = math.select(new float4(0.0f), new float4(1.0f), v); + } + + /// Constructs a float4x2 matrix from a bool4x2 matrix by componentwise conversion. + /// bool4x2 to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(bool4x2 v) + { + this.c0 = math.select(new float4(0.0f), new float4(1.0f), v.c0); + this.c1 = math.select(new float4(0.0f), new float4(1.0f), v.c1); + } + + /// Constructs a float4x2 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float4x2 matrix from a int4x2 matrix by componentwise conversion. + /// int4x2 to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(int4x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a float4x2 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a float4x2 matrix from a uint4x2 matrix by componentwise conversion. + /// uint4x2 to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(uint4x2 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + } + + /// Constructs a float4x2 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(double v) + { + this.c0 = (float4)v; + this.c1 = (float4)v; + } + + /// Constructs a float4x2 matrix from a double4x2 matrix by componentwise conversion. + /// double4x2 to convert to float4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x2(double4x2 v) + { + this.c0 = (float4)v.c0; + this.c1 = (float4)v.c1; + } + + + /// Implicitly converts a single float value to a float4x2 matrix by assigning it to every component. + /// float to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x2(float v) { return new float4x2(v); } + + /// Explicitly converts a single bool value to a float4x2 matrix by converting it to float and assigning it to every component. + /// bool to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x2(bool v) { return new float4x2(v); } + + /// Explicitly converts a bool4x2 matrix to a float4x2 matrix by componentwise conversion. + /// bool4x2 to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x2(bool4x2 v) { return new float4x2(v); } + + /// Implicitly converts a single int value to a float4x2 matrix by converting it to float and assigning it to every component. + /// int to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x2(int v) { return new float4x2(v); } + + /// Implicitly converts a int4x2 matrix to a float4x2 matrix by componentwise conversion. + /// int4x2 to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x2(int4x2 v) { return new float4x2(v); } + + /// Implicitly converts a single uint value to a float4x2 matrix by converting it to float and assigning it to every component. + /// uint to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x2(uint v) { return new float4x2(v); } + + /// Implicitly converts a uint4x2 matrix to a float4x2 matrix by componentwise conversion. + /// uint4x2 to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x2(uint4x2 v) { return new float4x2(v); } + + /// Explicitly converts a single double value to a float4x2 matrix by converting it to float and assigning it to every component. + /// double to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x2(double v) { return new float4x2(v); } + + /// Explicitly converts a double4x2 matrix to a float4x2 matrix by componentwise conversion. + /// double4x2 to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x2(double4x2 v) { return new float4x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise multiplication. + /// Right hand side float4x2 to use to compute componentwise multiplication. + /// float4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator * (float4x2 lhs, float4x2 rhs) { return new float4x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator * (float4x2 lhs, float rhs) { return new float4x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float4x2 to use to compute componentwise multiplication. + /// float4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator * (float lhs, float4x2 rhs) { return new float4x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise addition. + /// Right hand side float4x2 to use to compute componentwise addition. + /// float4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator + (float4x2 lhs, float4x2 rhs) { return new float4x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator + (float4x2 lhs, float rhs) { return new float4x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float4x2 to use to compute componentwise addition. + /// float4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator + (float lhs, float4x2 rhs) { return new float4x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise subtraction. + /// Right hand side float4x2 to use to compute componentwise subtraction. + /// float4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator - (float4x2 lhs, float4x2 rhs) { return new float4x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator - (float4x2 lhs, float rhs) { return new float4x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float4x2 to use to compute componentwise subtraction. + /// float4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator - (float lhs, float4x2 rhs) { return new float4x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise division. + /// Right hand side float4x2 to use to compute componentwise division. + /// float4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator / (float4x2 lhs, float4x2 rhs) { return new float4x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator / (float4x2 lhs, float rhs) { return new float4x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float4x2 to use to compute componentwise division. + /// float4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator / (float lhs, float4x2 rhs) { return new float4x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise modulus. + /// Right hand side float4x2 to use to compute componentwise modulus. + /// float4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator % (float4x2 lhs, float4x2 rhs) { return new float4x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator % (float4x2 lhs, float rhs) { return new float4x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float4x2 to use to compute componentwise modulus. + /// float4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator % (float lhs, float4x2 rhs) { return new float4x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a float4x2 matrix. + /// Value to use when computing the componentwise increment. + /// float4x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator ++ (float4x2 val) { return new float4x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a float4x2 matrix. + /// Value to use when computing the componentwise decrement. + /// float4x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator -- (float4x2 val) { return new float4x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise less than. + /// Right hand side float4x2 to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (float4x2 lhs, float4x2 rhs) { return new bool4x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (float4x2 lhs, float rhs) { return new bool4x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float4x2 to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (float lhs, float4x2 rhs) { return new bool4x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise less or equal. + /// Right hand side float4x2 to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (float4x2 lhs, float4x2 rhs) { return new bool4x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (float4x2 lhs, float rhs) { return new bool4x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float4x2 to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (float lhs, float4x2 rhs) { return new bool4x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise greater than. + /// Right hand side float4x2 to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (float4x2 lhs, float4x2 rhs) { return new bool4x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (float4x2 lhs, float rhs) { return new bool4x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float4x2 to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (float lhs, float4x2 rhs) { return new bool4x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise greater or equal. + /// Right hand side float4x2 to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (float4x2 lhs, float4x2 rhs) { return new bool4x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (float4x2 lhs, float rhs) { return new bool4x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float4x2 to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (float lhs, float4x2 rhs) { return new bool4x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a float4x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// float4x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator - (float4x2 val) { return new float4x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a float4x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// float4x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 operator + (float4x2 val) { return new float4x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise equality operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise equality. + /// Right hand side float4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (float4x2 lhs, float4x2 rhs) { return new bool4x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (float4x2 lhs, float rhs) { return new bool4x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (float lhs, float4x2 rhs) { return new bool4x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two float4x2 matrices. + /// Left hand side float4x2 to use to compute componentwise not equal. + /// Right hand side float4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (float4x2 lhs, float4x2 rhs) { return new bool4x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a float4x2 matrix and a float value. + /// Left hand side float4x2 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (float4x2 lhs, float rhs) { return new bool4x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float4x2 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (float lhs, float4x2 rhs) { return new bool4x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + + /// Returns the float4 element at a specified index. + unsafe public ref float4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (float4x2* array = &this) { return ref ((float4*)array)[index]; } + } + } + + /// Returns true if the float4x2 is equal to a given float4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float4x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the float4x2 is equal to a given float4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float4x2 converted && Equals(converted); } + + + /// Returns a hash code for the float4x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float4x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float4x2({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f)", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z, c0.w, c1.w); + } + + /// Returns a string representation of the float4x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float4x2({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float4x2 matrix constructed from two float4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// float4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(float4 c0, float4 c1) { return new float4x2(c0, c1); } + + /// Returns a float4x2 matrix constructed from from 8 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// float4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(float m00, float m01, + float m10, float m11, + float m20, float m21, + float m30, float m31) + { + return new float4x2(m00, m01, + m10, m11, + m20, m21, + m30, m31); + } + + /// Returns a float4x2 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(float v) { return new float4x2(v); } + + /// Returns a float4x2 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(bool v) { return new float4x2(v); } + + /// Return a float4x2 matrix constructed from a bool4x2 matrix by componentwise conversion. + /// bool4x2 to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(bool4x2 v) { return new float4x2(v); } + + /// Returns a float4x2 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(int v) { return new float4x2(v); } + + /// Return a float4x2 matrix constructed from a int4x2 matrix by componentwise conversion. + /// int4x2 to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(int4x2 v) { return new float4x2(v); } + + /// Returns a float4x2 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(uint v) { return new float4x2(v); } + + /// Return a float4x2 matrix constructed from a uint4x2 matrix by componentwise conversion. + /// uint4x2 to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(uint4x2 v) { return new float4x2(v); } + + /// Returns a float4x2 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(double v) { return new float4x2(v); } + + /// Return a float4x2 matrix constructed from a double4x2 matrix by componentwise conversion. + /// double4x2 to convert to float4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 float4x2(double4x2 v) { return new float4x2(v); } + + /// Return the float2x4 transpose of a float4x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 transpose(float4x2 v) + { + return float2x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w); + } + + /// Returns a uint hash code of a float4x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float4x2 v) + { + return csum(asuint(v.c0) * uint4(0xAAC3C25Du, 0xD21D0945u, 0x88FCAB2Du, 0x614DA60Du) + + asuint(v.c1) * uint4(0x5BA2C50Bu, 0x8C455ACBu, 0xCD266C89u, 0xF1852A33u)) + 0x77E35E77u; + } + + /// + /// Returns a uint4 vector hash code of a float4x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(float4x2 v) + { + return (asuint(v.c0) * uint4(0x863E3729u, 0xE191B035u, 0x68586FAFu, 0xD4DFF6D3u) + + asuint(v.c1) * uint4(0xCB634F4Du, 0x9B13B92Du, 0x4ABF0813u, 0x86068063u)) + 0xD75513F9u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float4x3.gen.cs b/ThirdParty/Unity.Mathematics/float4x3.gen.cs new file mode 100644 index 0000000..da29e56 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float4x3.gen.cs @@ -0,0 +1,665 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x3 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float4x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float4 c0; + /// Column 1 of the matrix. + public float4 c1; + /// Column 2 of the matrix. + public float4 c2; + + /// float4x3 zero value. + public static readonly float4x3 zero; + + /// Constructs a float4x3 matrix from three float4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(float4 c0, float4 c1, float4 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a float4x3 matrix from 12 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(float m00, float m01, float m02, + float m10, float m11, float m12, + float m20, float m21, float m22, + float m30, float m31, float m32) + { + this.c0 = new float4(m00, m10, m20, m30); + this.c1 = new float4(m01, m11, m21, m31); + this.c2 = new float4(m02, m12, m22, m32); + } + + /// Constructs a float4x3 matrix from a single float value by assigning it to every component. + /// float to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float4x3 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(bool v) + { + this.c0 = math.select(new float4(0.0f), new float4(1.0f), v); + this.c1 = math.select(new float4(0.0f), new float4(1.0f), v); + this.c2 = math.select(new float4(0.0f), new float4(1.0f), v); + } + + /// Constructs a float4x3 matrix from a bool4x3 matrix by componentwise conversion. + /// bool4x3 to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(bool4x3 v) + { + this.c0 = math.select(new float4(0.0f), new float4(1.0f), v.c0); + this.c1 = math.select(new float4(0.0f), new float4(1.0f), v.c1); + this.c2 = math.select(new float4(0.0f), new float4(1.0f), v.c2); + } + + /// Constructs a float4x3 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float4x3 matrix from a int4x3 matrix by componentwise conversion. + /// int4x3 to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(int4x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a float4x3 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a float4x3 matrix from a uint4x3 matrix by componentwise conversion. + /// uint4x3 to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(uint4x3 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + } + + /// Constructs a float4x3 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(double v) + { + this.c0 = (float4)v; + this.c1 = (float4)v; + this.c2 = (float4)v; + } + + /// Constructs a float4x3 matrix from a double4x3 matrix by componentwise conversion. + /// double4x3 to convert to float4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x3(double4x3 v) + { + this.c0 = (float4)v.c0; + this.c1 = (float4)v.c1; + this.c2 = (float4)v.c2; + } + + + /// Implicitly converts a single float value to a float4x3 matrix by assigning it to every component. + /// float to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x3(float v) { return new float4x3(v); } + + /// Explicitly converts a single bool value to a float4x3 matrix by converting it to float and assigning it to every component. + /// bool to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x3(bool v) { return new float4x3(v); } + + /// Explicitly converts a bool4x3 matrix to a float4x3 matrix by componentwise conversion. + /// bool4x3 to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x3(bool4x3 v) { return new float4x3(v); } + + /// Implicitly converts a single int value to a float4x3 matrix by converting it to float and assigning it to every component. + /// int to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x3(int v) { return new float4x3(v); } + + /// Implicitly converts a int4x3 matrix to a float4x3 matrix by componentwise conversion. + /// int4x3 to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x3(int4x3 v) { return new float4x3(v); } + + /// Implicitly converts a single uint value to a float4x3 matrix by converting it to float and assigning it to every component. + /// uint to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x3(uint v) { return new float4x3(v); } + + /// Implicitly converts a uint4x3 matrix to a float4x3 matrix by componentwise conversion. + /// uint4x3 to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x3(uint4x3 v) { return new float4x3(v); } + + /// Explicitly converts a single double value to a float4x3 matrix by converting it to float and assigning it to every component. + /// double to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x3(double v) { return new float4x3(v); } + + /// Explicitly converts a double4x3 matrix to a float4x3 matrix by componentwise conversion. + /// double4x3 to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x3(double4x3 v) { return new float4x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise multiplication. + /// Right hand side float4x3 to use to compute componentwise multiplication. + /// float4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator * (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator * (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float4x3 to use to compute componentwise multiplication. + /// float4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator * (float lhs, float4x3 rhs) { return new float4x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise addition. + /// Right hand side float4x3 to use to compute componentwise addition. + /// float4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator + (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator + (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float4x3 to use to compute componentwise addition. + /// float4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator + (float lhs, float4x3 rhs) { return new float4x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise subtraction. + /// Right hand side float4x3 to use to compute componentwise subtraction. + /// float4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator - (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator - (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float4x3 to use to compute componentwise subtraction. + /// float4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator - (float lhs, float4x3 rhs) { return new float4x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise division. + /// Right hand side float4x3 to use to compute componentwise division. + /// float4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator / (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator / (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float4x3 to use to compute componentwise division. + /// float4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator / (float lhs, float4x3 rhs) { return new float4x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise modulus. + /// Right hand side float4x3 to use to compute componentwise modulus. + /// float4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator % (float4x3 lhs, float4x3 rhs) { return new float4x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator % (float4x3 lhs, float rhs) { return new float4x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float4x3 to use to compute componentwise modulus. + /// float4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator % (float lhs, float4x3 rhs) { return new float4x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a float4x3 matrix. + /// Value to use when computing the componentwise increment. + /// float4x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator ++ (float4x3 val) { return new float4x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a float4x3 matrix. + /// Value to use when computing the componentwise decrement. + /// float4x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator -- (float4x3 val) { return new float4x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise less than. + /// Right hand side float4x3 to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (float4x3 lhs, float4x3 rhs) { return new bool4x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (float4x3 lhs, float rhs) { return new bool4x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float4x3 to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (float lhs, float4x3 rhs) { return new bool4x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise less or equal. + /// Right hand side float4x3 to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (float4x3 lhs, float4x3 rhs) { return new bool4x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (float4x3 lhs, float rhs) { return new bool4x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float4x3 to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (float lhs, float4x3 rhs) { return new bool4x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise greater than. + /// Right hand side float4x3 to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (float4x3 lhs, float4x3 rhs) { return new bool4x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (float4x3 lhs, float rhs) { return new bool4x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float4x3 to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (float lhs, float4x3 rhs) { return new bool4x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise greater or equal. + /// Right hand side float4x3 to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (float4x3 lhs, float4x3 rhs) { return new bool4x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (float4x3 lhs, float rhs) { return new bool4x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float4x3 to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (float lhs, float4x3 rhs) { return new bool4x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a float4x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// float4x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator - (float4x3 val) { return new float4x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a float4x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// float4x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 operator + (float4x3 val) { return new float4x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise equality operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise equality. + /// Right hand side float4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (float4x3 lhs, float4x3 rhs) { return new bool4x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (float4x3 lhs, float rhs) { return new bool4x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (float lhs, float4x3 rhs) { return new bool4x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two float4x3 matrices. + /// Left hand side float4x3 to use to compute componentwise not equal. + /// Right hand side float4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (float4x3 lhs, float4x3 rhs) { return new bool4x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a float4x3 matrix and a float value. + /// Left hand side float4x3 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (float4x3 lhs, float rhs) { return new bool4x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float4x3 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (float lhs, float4x3 rhs) { return new bool4x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + + /// Returns the float4 element at a specified index. + unsafe public ref float4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (float4x3* array = &this) { return ref ((float4*)array)[index]; } + } + } + + /// Returns true if the float4x3 is equal to a given float4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float4x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the float4x3 is equal to a given float4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float4x3 converted && Equals(converted); } + + + /// Returns a hash code for the float4x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float4x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float4x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f, {9}f, {10}f, {11}f)", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z, c0.w, c1.w, c2.w); + } + + /// Returns a string representation of the float4x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float4x3({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f, {9}f, {10}f, {11}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider), c2.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float4x3 matrix constructed from three float4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// float4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(float4 c0, float4 c1, float4 c2) { return new float4x3(c0, c1, c2); } + + /// Returns a float4x3 matrix constructed from from 12 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// float4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(float m00, float m01, float m02, + float m10, float m11, float m12, + float m20, float m21, float m22, + float m30, float m31, float m32) + { + return new float4x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22, + m30, m31, m32); + } + + /// Returns a float4x3 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(float v) { return new float4x3(v); } + + /// Returns a float4x3 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(bool v) { return new float4x3(v); } + + /// Return a float4x3 matrix constructed from a bool4x3 matrix by componentwise conversion. + /// bool4x3 to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(bool4x3 v) { return new float4x3(v); } + + /// Returns a float4x3 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(int v) { return new float4x3(v); } + + /// Return a float4x3 matrix constructed from a int4x3 matrix by componentwise conversion. + /// int4x3 to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(int4x3 v) { return new float4x3(v); } + + /// Returns a float4x3 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(uint v) { return new float4x3(v); } + + /// Return a float4x3 matrix constructed from a uint4x3 matrix by componentwise conversion. + /// uint4x3 to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(uint4x3 v) { return new float4x3(v); } + + /// Returns a float4x3 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(double v) { return new float4x3(v); } + + /// Return a float4x3 matrix constructed from a double4x3 matrix by componentwise conversion. + /// double4x3 to convert to float4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 float4x3(double4x3 v) { return new float4x3(v); } + + /// Return the float3x4 transpose of a float4x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 transpose(float4x3 v) + { + return float3x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w); + } + + /// Returns a uint hash code of a float4x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float4x3 v) + { + return csum(asuint(v.c0) * uint4(0xC53F4755u, 0x6985C229u, 0xE133B0B3u, 0xC3E0A3B9u) + + asuint(v.c1) * uint4(0xFE31134Fu, 0x712A34D7u, 0x9D77A59Bu, 0x4942CA39u) + + asuint(v.c2) * uint4(0xB40EC62Du, 0x565ED63Fu, 0x93C30C2Bu, 0xDCAF0351u)) + 0x6E050B01u; + } + + /// + /// Returns a uint4 vector hash code of a float4x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(float4x3 v) + { + return (asuint(v.c0) * uint4(0x750FDBF5u, 0x7F3DD499u, 0x52EAAEBBu, 0x4599C793u) + + asuint(v.c1) * uint4(0x83B5E729u, 0xC267163Fu, 0x67BC9149u, 0xAD7C5EC1u) + + asuint(v.c2) * uint4(0x822A7D6Du, 0xB492BF15u, 0xD37220E3u, 0x7AA2C2BDu)) + 0xE16BC89Du; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/float4x4.gen.cs b/ThirdParty/Unity.Mathematics/float4x4.gen.cs new file mode 100644 index 0000000..061cc0c --- /dev/null +++ b/ThirdParty/Unity.Mathematics/float4x4.gen.cs @@ -0,0 +1,824 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x4 matrix of floats. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct float4x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public float4 c0; + /// Column 1 of the matrix. + public float4 c1; + /// Column 2 of the matrix. + public float4 c2; + /// Column 3 of the matrix. + public float4 c3; + + /// float4x4 identity transform. + public static readonly float4x4 identity = new float4x4(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); + + /// float4x4 zero value. + public static readonly float4x4 zero; + + /// Constructs a float4x4 matrix from four float4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(float4 c0, float4 c1, float4 c2, float4 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a float4x4 matrix from 16 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13, + float m20, float m21, float m22, float m23, + float m30, float m31, float m32, float m33) + { + this.c0 = new float4(m00, m10, m20, m30); + this.c1 = new float4(m01, m11, m21, m31); + this.c2 = new float4(m02, m12, m22, m32); + this.c3 = new float4(m03, m13, m23, m33); + } + + /// Constructs a float4x4 matrix from a single float value by assigning it to every component. + /// float to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(float v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float4x4 matrix from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(bool v) + { + this.c0 = math.select(new float4(0.0f), new float4(1.0f), v); + this.c1 = math.select(new float4(0.0f), new float4(1.0f), v); + this.c2 = math.select(new float4(0.0f), new float4(1.0f), v); + this.c3 = math.select(new float4(0.0f), new float4(1.0f), v); + } + + /// Constructs a float4x4 matrix from a bool4x4 matrix by componentwise conversion. + /// bool4x4 to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(bool4x4 v) + { + this.c0 = math.select(new float4(0.0f), new float4(1.0f), v.c0); + this.c1 = math.select(new float4(0.0f), new float4(1.0f), v.c1); + this.c2 = math.select(new float4(0.0f), new float4(1.0f), v.c2); + this.c3 = math.select(new float4(0.0f), new float4(1.0f), v.c3); + } + + /// Constructs a float4x4 matrix from a single int value by converting it to float and assigning it to every component. + /// int to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float4x4 matrix from a int4x4 matrix by componentwise conversion. + /// int4x4 to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(int4x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a float4x4 matrix from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a float4x4 matrix from a uint4x4 matrix by componentwise conversion. + /// uint4x4 to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(uint4x4 v) + { + this.c0 = v.c0; + this.c1 = v.c1; + this.c2 = v.c2; + this.c3 = v.c3; + } + + /// Constructs a float4x4 matrix from a single double value by converting it to float and assigning it to every component. + /// double to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(double v) + { + this.c0 = (float4)v; + this.c1 = (float4)v; + this.c2 = (float4)v; + this.c3 = (float4)v; + } + + /// Constructs a float4x4 matrix from a double4x4 matrix by componentwise conversion. + /// double4x4 to convert to float4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4x4(double4x4 v) + { + this.c0 = (float4)v.c0; + this.c1 = (float4)v.c1; + this.c2 = (float4)v.c2; + this.c3 = (float4)v.c3; + } + + + /// Implicitly converts a single float value to a float4x4 matrix by assigning it to every component. + /// float to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x4(float v) { return new float4x4(v); } + + /// Explicitly converts a single bool value to a float4x4 matrix by converting it to float and assigning it to every component. + /// bool to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x4(bool v) { return new float4x4(v); } + + /// Explicitly converts a bool4x4 matrix to a float4x4 matrix by componentwise conversion. + /// bool4x4 to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x4(bool4x4 v) { return new float4x4(v); } + + /// Implicitly converts a single int value to a float4x4 matrix by converting it to float and assigning it to every component. + /// int to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x4(int v) { return new float4x4(v); } + + /// Implicitly converts a int4x4 matrix to a float4x4 matrix by componentwise conversion. + /// int4x4 to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x4(int4x4 v) { return new float4x4(v); } + + /// Implicitly converts a single uint value to a float4x4 matrix by converting it to float and assigning it to every component. + /// uint to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x4(uint v) { return new float4x4(v); } + + /// Implicitly converts a uint4x4 matrix to a float4x4 matrix by componentwise conversion. + /// uint4x4 to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float4x4(uint4x4 v) { return new float4x4(v); } + + /// Explicitly converts a single double value to a float4x4 matrix by converting it to float and assigning it to every component. + /// double to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x4(double v) { return new float4x4(v); } + + /// Explicitly converts a double4x4 matrix to a float4x4 matrix by componentwise conversion. + /// double4x4 to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator float4x4(double4x4 v) { return new float4x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise multiplication. + /// Right hand side float4x4 to use to compute componentwise multiplication. + /// float4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator * (float4x4 lhs, float4x4 rhs) { return new float4x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise multiplication. + /// Right hand side float to use to compute componentwise multiplication. + /// float4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator * (float4x4 lhs, float rhs) { return new float4x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise multiplication. + /// Right hand side float4x4 to use to compute componentwise multiplication. + /// float4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator * (float lhs, float4x4 rhs) { return new float4x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise addition. + /// Right hand side float4x4 to use to compute componentwise addition. + /// float4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator + (float4x4 lhs, float4x4 rhs) { return new float4x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise addition. + /// Right hand side float to use to compute componentwise addition. + /// float4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator + (float4x4 lhs, float rhs) { return new float4x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise addition. + /// Right hand side float4x4 to use to compute componentwise addition. + /// float4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator + (float lhs, float4x4 rhs) { return new float4x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise subtraction. + /// Right hand side float4x4 to use to compute componentwise subtraction. + /// float4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator - (float4x4 lhs, float4x4 rhs) { return new float4x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise subtraction. + /// Right hand side float to use to compute componentwise subtraction. + /// float4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator - (float4x4 lhs, float rhs) { return new float4x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise subtraction. + /// Right hand side float4x4 to use to compute componentwise subtraction. + /// float4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator - (float lhs, float4x4 rhs) { return new float4x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise division. + /// Right hand side float4x4 to use to compute componentwise division. + /// float4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator / (float4x4 lhs, float4x4 rhs) { return new float4x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise division. + /// Right hand side float to use to compute componentwise division. + /// float4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator / (float4x4 lhs, float rhs) { return new float4x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise division. + /// Right hand side float4x4 to use to compute componentwise division. + /// float4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator / (float lhs, float4x4 rhs) { return new float4x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise modulus. + /// Right hand side float4x4 to use to compute componentwise modulus. + /// float4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator % (float4x4 lhs, float4x4 rhs) { return new float4x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise modulus. + /// Right hand side float to use to compute componentwise modulus. + /// float4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator % (float4x4 lhs, float rhs) { return new float4x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise modulus. + /// Right hand side float4x4 to use to compute componentwise modulus. + /// float4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator % (float lhs, float4x4 rhs) { return new float4x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a float4x4 matrix. + /// Value to use when computing the componentwise increment. + /// float4x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator ++ (float4x4 val) { return new float4x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a float4x4 matrix. + /// Value to use when computing the componentwise decrement. + /// float4x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator -- (float4x4 val) { return new float4x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise less than. + /// Right hand side float4x4 to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (float4x4 lhs, float4x4 rhs) { return new bool4x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise less than. + /// Right hand side float to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (float4x4 lhs, float rhs) { return new bool4x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise less than. + /// Right hand side float4x4 to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (float lhs, float4x4 rhs) { return new bool4x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise less or equal. + /// Right hand side float4x4 to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (float4x4 lhs, float4x4 rhs) { return new bool4x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise less or equal. + /// Right hand side float to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (float4x4 lhs, float rhs) { return new bool4x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise less or equal. + /// Right hand side float4x4 to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (float lhs, float4x4 rhs) { return new bool4x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise greater than. + /// Right hand side float4x4 to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (float4x4 lhs, float4x4 rhs) { return new bool4x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise greater than. + /// Right hand side float to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (float4x4 lhs, float rhs) { return new bool4x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise greater than. + /// Right hand side float4x4 to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (float lhs, float4x4 rhs) { return new bool4x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise greater or equal. + /// Right hand side float4x4 to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (float4x4 lhs, float4x4 rhs) { return new bool4x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise greater or equal. + /// Right hand side float to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (float4x4 lhs, float rhs) { return new bool4x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise greater or equal. + /// Right hand side float4x4 to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (float lhs, float4x4 rhs) { return new bool4x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a float4x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// float4x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator - (float4x4 val) { return new float4x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a float4x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// float4x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 operator + (float4x4 val) { return new float4x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise equality operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise equality. + /// Right hand side float4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (float4x4 lhs, float4x4 rhs) { return new bool4x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise equality. + /// Right hand side float to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (float4x4 lhs, float rhs) { return new bool4x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise equality. + /// Right hand side float4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (float lhs, float4x4 rhs) { return new bool4x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two float4x4 matrices. + /// Left hand side float4x4 to use to compute componentwise not equal. + /// Right hand side float4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (float4x4 lhs, float4x4 rhs) { return new bool4x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a float4x4 matrix and a float value. + /// Left hand side float4x4 to use to compute componentwise not equal. + /// Right hand side float to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (float4x4 lhs, float rhs) { return new bool4x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a float value and a float4x4 matrix. + /// Left hand side float to use to compute componentwise not equal. + /// Right hand side float4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (float lhs, float4x4 rhs) { return new bool4x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + + /// Returns the float4 element at a specified index. + unsafe public ref float4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (float4x4* array = &this) { return ref ((float4*)array)[index]; } + } + } + + /// Returns true if the float4x4 is equal to a given float4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(float4x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the float4x4 is equal to a given float4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is float4x4 converted && Equals(converted); } + + + /// Returns a hash code for the float4x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the float4x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("float4x4({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f, {9}f, {10}f, {11}f, {12}f, {13}f, {14}f, {15}f)", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z, c0.w, c1.w, c2.w, c3.w); + } + + /// Returns a string representation of the float4x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float4x4({0}f, {1}f, {2}f, {3}f, {4}f, {5}f, {6}f, {7}f, {8}f, {9}f, {10}f, {11}f, {12}f, {13}f, {14}f, {15}f)", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c3.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider), c2.w.ToString(format, formatProvider), c3.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a float4x4 matrix constructed from four float4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// float4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(float4 c0, float4 c1, float4 c2, float4 c3) { return new float4x4(c0, c1, c2, c3); } + + /// Returns a float4x4 matrix constructed from from 16 float values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + /// float4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13, + float m20, float m21, float m22, float m23, + float m30, float m31, float m32, float m33) + { + return new float4x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23, + m30, m31, m32, m33); + } + + /// Returns a float4x4 matrix constructed from a single float value by assigning it to every component. + /// float to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(float v) { return new float4x4(v); } + + /// Returns a float4x4 matrix constructed from a single bool value by converting it to float and assigning it to every component. + /// bool to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(bool v) { return new float4x4(v); } + + /// Return a float4x4 matrix constructed from a bool4x4 matrix by componentwise conversion. + /// bool4x4 to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(bool4x4 v) { return new float4x4(v); } + + /// Returns a float4x4 matrix constructed from a single int value by converting it to float and assigning it to every component. + /// int to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(int v) { return new float4x4(v); } + + /// Return a float4x4 matrix constructed from a int4x4 matrix by componentwise conversion. + /// int4x4 to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(int4x4 v) { return new float4x4(v); } + + /// Returns a float4x4 matrix constructed from a single uint value by converting it to float and assigning it to every component. + /// uint to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(uint v) { return new float4x4(v); } + + /// Return a float4x4 matrix constructed from a uint4x4 matrix by componentwise conversion. + /// uint4x4 to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(uint4x4 v) { return new float4x4(v); } + + /// Returns a float4x4 matrix constructed from a single double value by converting it to float and assigning it to every component. + /// double to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(double v) { return new float4x4(v); } + + /// Return a float4x4 matrix constructed from a double4x4 matrix by componentwise conversion. + /// double4x4 to convert to float4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(double4x4 v) { return new float4x4(v); } + + /// Return the result of rotating a float3 vector by a float4x4 matrix + /// Left hand side matrix argument that specifies the rotation. + /// Right hand side vector argument to be rotated. + /// The rotated vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 rotate(float4x4 a, float3 b) + { + return (a.c0 * b.x + a.c1 * b.y + a.c2 * b.z).xyz; + } + + /// Return the result of transforming a float3 point by a float4x4 matrix + /// Left hand side matrix argument that specifies the transformation. + /// Right hand side point argument to be transformed. + /// The transformed point. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 transform(float4x4 a, float3 b) + { + return (a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3).xyz; + } + + /// Return the float4x4 transpose of a float4x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 transpose(float4x4 v) + { + return float4x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w, + v.c3.x, v.c3.y, v.c3.z, v.c3.w); + } + + /// Returns the float4x4 full inverse of a float4x4 matrix. + /// Matrix to invert. + /// The inverted matrix. + public static float4x4 inverse(float4x4 m) + { + float4 c0 = m.c0; + float4 c1 = m.c1; + float4 c2 = m.c2; + float4 c3 = m.c3; + + float4 r0y_r1y_r0x_r1x = movelh(c1, c0); + float4 r0z_r1z_r0w_r1w = movelh(c2, c3); + float4 r2y_r3y_r2x_r3x = movehl(c0, c1); + float4 r2z_r3z_r2w_r3w = movehl(c3, c2); + + float4 r1y_r2y_r1x_r2x = shuffle(c1, c0, ShuffleComponent.LeftY, ShuffleComponent.LeftZ, ShuffleComponent.RightY, ShuffleComponent.RightZ); + float4 r1z_r2z_r1w_r2w = shuffle(c2, c3, ShuffleComponent.LeftY, ShuffleComponent.LeftZ, ShuffleComponent.RightY, ShuffleComponent.RightZ); + float4 r3y_r0y_r3x_r0x = shuffle(c1, c0, ShuffleComponent.LeftW, ShuffleComponent.LeftX, ShuffleComponent.RightW, ShuffleComponent.RightX); + float4 r3z_r0z_r3w_r0w = shuffle(c2, c3, ShuffleComponent.LeftW, ShuffleComponent.LeftX, ShuffleComponent.RightW, ShuffleComponent.RightX); + + float4 r0_wzyx = shuffle(r0z_r1z_r0w_r1w, r0y_r1y_r0x_r1x, ShuffleComponent.LeftZ, ShuffleComponent.LeftX, ShuffleComponent.RightX, ShuffleComponent.RightZ); + float4 r1_wzyx = shuffle(r0z_r1z_r0w_r1w, r0y_r1y_r0x_r1x, ShuffleComponent.LeftW, ShuffleComponent.LeftY, ShuffleComponent.RightY, ShuffleComponent.RightW); + float4 r2_wzyx = shuffle(r2z_r3z_r2w_r3w, r2y_r3y_r2x_r3x, ShuffleComponent.LeftZ, ShuffleComponent.LeftX, ShuffleComponent.RightX, ShuffleComponent.RightZ); + float4 r3_wzyx = shuffle(r2z_r3z_r2w_r3w, r2y_r3y_r2x_r3x, ShuffleComponent.LeftW, ShuffleComponent.LeftY, ShuffleComponent.RightY, ShuffleComponent.RightW); + float4 r0_xyzw = shuffle(r0y_r1y_r0x_r1x, r0z_r1z_r0w_r1w, ShuffleComponent.LeftZ, ShuffleComponent.LeftX, ShuffleComponent.RightX, ShuffleComponent.RightZ); + + // Calculate remaining inner term pairs. inner terms have zw=-xy, so we only have to calculate xy and can pack two pairs per vector. + float4 inner12_23 = r1y_r2y_r1x_r2x * r2z_r3z_r2w_r3w - r1z_r2z_r1w_r2w * r2y_r3y_r2x_r3x; + float4 inner02_13 = r0y_r1y_r0x_r1x * r2z_r3z_r2w_r3w - r0z_r1z_r0w_r1w * r2y_r3y_r2x_r3x; + float4 inner30_01 = r3z_r0z_r3w_r0w * r0y_r1y_r0x_r1x - r3y_r0y_r3x_r0x * r0z_r1z_r0w_r1w; + + // Expand inner terms back to 4 components. zw signs still need to be flipped + float4 inner12 = shuffle(inner12_23, inner12_23, ShuffleComponent.LeftX, ShuffleComponent.LeftZ, ShuffleComponent.RightZ, ShuffleComponent.RightX); + float4 inner23 = shuffle(inner12_23, inner12_23, ShuffleComponent.LeftY, ShuffleComponent.LeftW, ShuffleComponent.RightW, ShuffleComponent.RightY); + + float4 inner02 = shuffle(inner02_13, inner02_13, ShuffleComponent.LeftX, ShuffleComponent.LeftZ, ShuffleComponent.RightZ, ShuffleComponent.RightX); + float4 inner13 = shuffle(inner02_13, inner02_13, ShuffleComponent.LeftY, ShuffleComponent.LeftW, ShuffleComponent.RightW, ShuffleComponent.RightY); + + // Calculate minors + float4 minors0 = r3_wzyx * inner12 - r2_wzyx * inner13 + r1_wzyx * inner23; + + float4 denom = r0_xyzw * minors0; + + // Horizontal sum of denominator. Free sign flip of z and w compensates for missing flip in inner terms. + denom = denom + shuffle(denom, denom, ShuffleComponent.LeftY, ShuffleComponent.LeftX, ShuffleComponent.RightW, ShuffleComponent.RightZ); // x+y x+y z+w z+w + denom = denom - shuffle(denom, denom, ShuffleComponent.LeftZ, ShuffleComponent.LeftZ, ShuffleComponent.RightX, ShuffleComponent.RightX); // x+y-z-w x+y-z-w z+w-x-y z+w-x-y + + float4 rcp_denom_ppnn = float4(1.0f) / denom; + float4x4 res; + res.c0 = minors0 * rcp_denom_ppnn; + + float4 inner30 = shuffle(inner30_01, inner30_01, ShuffleComponent.LeftX, ShuffleComponent.LeftZ, ShuffleComponent.RightZ, ShuffleComponent.RightX); + float4 inner01 = shuffle(inner30_01, inner30_01, ShuffleComponent.LeftY, ShuffleComponent.LeftW, ShuffleComponent.RightW, ShuffleComponent.RightY); + + float4 minors1 = r2_wzyx * inner30 - r0_wzyx * inner23 - r3_wzyx * inner02; + res.c1 = minors1 * rcp_denom_ppnn; + + float4 minors2 = r0_wzyx * inner13 - r1_wzyx * inner30 - r3_wzyx * inner01; + res.c2 = minors2 * rcp_denom_ppnn; + + float4 minors3 = r1_wzyx * inner02 - r0_wzyx * inner12 + r2_wzyx * inner01; + res.c3 = minors3 * rcp_denom_ppnn; + return res; + } + + /// Fast matrix inverse for rigid transforms (orthonormal basis and translation) + /// Matrix to invert. + /// The inverted matrix. + public static float4x4 fastinverse(float4x4 m) + { + float4 c0 = m.c0; + float4 c1 = m.c1; + float4 c2 = m.c2; + float4 pos = m.c3; + + float4 zero = float4(0); + + float4 t0 = unpacklo(c0, c2); + float4 t1 = unpacklo(c1, zero); + float4 t2 = unpackhi(c0, c2); + float4 t3 = unpackhi(c1, zero); + + float4 r0 = unpacklo(t0, t1); + float4 r1 = unpackhi(t0, t1); + float4 r2 = unpacklo(t2, t3); + + pos = -(r0 * pos.x + r1 * pos.y + r2 * pos.z); + pos.w = 1.0f; + + return float4x4(r0, r1, r2, pos); + } + + /// Returns the determinant of a float4x4 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + public static float determinant(float4x4 m) + { + float4 c0 = m.c0; + float4 c1 = m.c1; + float4 c2 = m.c2; + float4 c3 = m.c3; + + float m00 = c1.y * (c2.z * c3.w - c2.w * c3.z) - c2.y * (c1.z * c3.w - c1.w * c3.z) + c3.y * (c1.z * c2.w - c1.w * c2.z); + float m01 = c0.y * (c2.z * c3.w - c2.w * c3.z) - c2.y * (c0.z * c3.w - c0.w * c3.z) + c3.y * (c0.z * c2.w - c0.w * c2.z); + float m02 = c0.y * (c1.z * c3.w - c1.w * c3.z) - c1.y * (c0.z * c3.w - c0.w * c3.z) + c3.y * (c0.z * c1.w - c0.w * c1.z); + float m03 = c0.y * (c1.z * c2.w - c1.w * c2.z) - c1.y * (c0.z * c2.w - c0.w * c2.z) + c2.y * (c0.z * c1.w - c0.w * c1.z); + + return c0.x * m00 - c1.x * m01 + c2.x * m02 - c3.x * m03; + } + + /// Returns a uint hash code of a float4x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(float4x4 v) + { + return csum(asuint(v.c0) * uint4(0xC4B1493Fu, 0xBA0966D3u, 0xAFBEE253u, 0x5B419C01u) + + asuint(v.c1) * uint4(0x515D90F5u, 0xEC9F68F3u, 0xF9EA92D5u, 0xC2FAFCB9u) + + asuint(v.c2) * uint4(0x616E9CA1u, 0xC5C5394Bu, 0xCAE78587u, 0x7A1541C9u) + + asuint(v.c3) * uint4(0xF83BD927u, 0x6A243BCBu, 0x509B84C9u, 0x91D13847u)) + 0x52F7230Fu; + } + + /// + /// Returns a uint4 vector hash code of a float4x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(float4x4 v) + { + return (asuint(v.c0) * uint4(0xCF286E83u, 0xE121E6ADu, 0xC9CA1249u, 0x69B60C81u) + + asuint(v.c1) * uint4(0xE0EB6C25u, 0xF648BEABu, 0x6BDB2B07u, 0xEF63C699u) + + asuint(v.c2) * uint4(0x9001903Fu, 0xA895B9CDu, 0x9D23B201u, 0x4B01D3E1u) + + asuint(v.c3) * uint4(0x7461CA0Du, 0x79725379u, 0xD6258E5Bu, 0xEE390C97u)) + 0x9C8A2F05u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/half.cs b/ThirdParty/Unity.Mathematics/half.cs new file mode 100644 index 0000000..0e5a528 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/half.cs @@ -0,0 +1,170 @@ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +namespace Unity.Mathematics +{ + /// + /// A half precision float that uses 16 bits instead of 32 bits. + /// + [Il2CppEagerStaticClassConstruction] + [Serializable] + public struct half : System.IEquatable, IFormattable + { + /// + /// The raw 16 bit value of the half. + /// + public ushort value; + + /// half zero value. + public static readonly half zero = new half(); + + /// + /// The maximum finite half value as a single precision float. + /// + public static float MaxValue { get { return 65504.0f; } } + + /// + /// The minimum finite half value as a single precision float. + /// + public static float MinValue { get { return -65504.0f; } } + + /// + /// The maximum finite half value as a half. + /// + public static half MaxValueAsHalf => new half(MaxValue); + + /// + /// The minimum finite half value as a half. + /// + public static half MinValueAsHalf => new half(MinValue); + + /// Constructs a half value from a half value. + /// The input half value to copy. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half(half x) + { + value = x.value; + } + + /// Constructs a half value from a float value. + /// The single precision float value to convert to half. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half(float v) + { + value = (ushort)math.f32tof16(v); + } + + /// Constructs a half value from a double value. + /// The double precision float value to convert to half. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half(double v) + { + value = (ushort)math.f32tof16((float)v); + } + + /// Explicitly converts a float value to a half value. + /// The single precision float value to convert to half. + /// The converted half value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half(float v) { return new half(v); } + + /// Explicitly converts a double value to a half value. + /// The double precision float value to convert to half. + /// The converted half value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half(double v) { return new half(v); } + + /// Implicitly converts a half value to a float value. + /// The half value to convert to a single precision float. + /// The converted single precision float value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator float(half d) { return math.f16tof32(d.value); } + + /// Implicitly converts a half value to a double value. + /// The half value to convert to double precision float. + /// The converted double precision float value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator double(half d) { return math.f16tof32(d.value); } + + + /// Returns whether two half values are bitwise equivalent. + /// Left hand side half value to use in comparison. + /// Right hand side half value to use in comparison. + /// True if the two half values are bitwise equivalent, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(half lhs, half rhs) { return lhs.value == rhs.value; } + + /// Returns whether two half values are not bitwise equivalent. + /// Left hand side half value to use in comparison. + /// Right hand side half value to use in comparison. + /// True if the two half values are not bitwise equivalent, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(half lhs, half rhs) { return lhs.value != rhs.value; } + + + /// Returns true if the half is bitwise equivalent to a given half, false otherwise. + /// Right hand side half value to use in comparison. + /// True if the half value is bitwise equivalent to the input, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(half rhs) { return value == rhs.value; } + + /// Returns true if the half is equal to a given half, false otherwise. + /// Right hand side object to use in comparison. + /// True if the object is of type half and is bitwise equivalent, false otherwise. + public override bool Equals(object o) { return o is half converted && Equals(converted); } + + /// Returns a hash code for the half. + /// The computed hash code of the half. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)value; } + + /// Returns a string representation of the half. + /// The string representation of the half. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return math.f16tof32(value).ToString(); + } + + /// Returns a string representation of the half using a specified format and culture-specific format information. + /// The format string to use during string formatting. + /// The format provider to use during string formatting. + /// The string representation of the half. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return math.f16tof32(value).ToString(format, formatProvider); + } + } + + public static partial class math + { + /// Returns a half value constructed from a half values. + /// The input half value to copy. + /// The constructed half value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half half(half x) { return new half(x); } + + /// Returns a half value constructed from a float value. + /// The single precision float value to convert to half. + /// The constructed half value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half half(float v) { return new half(v); } + + /// Returns a half value constructed from a double value. + /// The double precision float value to convert to half. + /// The constructed half value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half half(double v) { return new half(v); } + + /// Returns a uint hash code of a half value. + /// The half value to hash. + /// The computed hash code of the half value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(half v) + { + return v.value * 0x745ED837u + 0x816EFB5Du; + } + } +} diff --git a/ThirdParty/Unity.Mathematics/half2.gen.cs b/ThirdParty/Unity.Mathematics/half2.gen.cs new file mode 100644 index 0000000..78c4fcd --- /dev/null +++ b/ThirdParty/Unity.Mathematics/half2.gen.cs @@ -0,0 +1,569 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2 component vector of halfs. + [DebuggerTypeProxy(typeof(half2.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct half2 : System.IEquatable, IFormattable + { + /// x component of the vector. + public half x; + /// y component of the vector. + public half y; + + /// half2 zero value. + public static readonly half2 zero; + + /// Constructs a half2 vector from two half values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half2(half x, half y) + { + this.x = x; + this.y = y; + } + + /// Constructs a half2 vector from a half2 vector. + /// The constructed vector's xy components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half2(half2 xy) + { + this.x = xy.x; + this.y = xy.y; + } + + /// Constructs a half2 vector from a single half value by assigning it to every component. + /// half to convert to half2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half2(half v) + { + this.x = v; + this.y = v; + } + + /// Constructs a half2 vector from a single float value by converting it to half and assigning it to every component. + /// float to convert to half2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half2(float v) + { + this.x = (half)v; + this.y = (half)v; + } + + /// Constructs a half2 vector from a float2 vector by componentwise conversion. + /// float2 to convert to half2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half2(float2 v) + { + this.x = (half)v.x; + this.y = (half)v.y; + } + + /// Constructs a half2 vector from a single double value by converting it to half and assigning it to every component. + /// double to convert to half2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half2(double v) + { + this.x = (half)v; + this.y = (half)v; + } + + /// Constructs a half2 vector from a double2 vector by componentwise conversion. + /// double2 to convert to half2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half2(double2 v) + { + this.x = (half)v.x; + this.y = (half)v.y; + } + + + /// Implicitly converts a single half value to a half2 vector by assigning it to every component. + /// half to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator half2(half v) { return new half2(v); } + + /// Explicitly converts a single float value to a half2 vector by converting it to half and assigning it to every component. + /// float to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half2(float v) { return new half2(v); } + + /// Explicitly converts a float2 vector to a half2 vector by componentwise conversion. + /// float2 to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half2(float2 v) { return new half2(v); } + + /// Explicitly converts a single double value to a half2 vector by converting it to half and assigning it to every component. + /// double to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half2(double v) { return new half2(v); } + + /// Explicitly converts a double2 vector to a half2 vector by componentwise conversion. + /// double2 to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half2(double2 v) { return new half2(v); } + + + /// Returns the result of a componentwise equality operation on two half2 vectors. + /// Left hand side half2 to use to compute componentwise equality. + /// Right hand side half2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (half2 lhs, half2 rhs) { return new bool2 (lhs.x == rhs.x, lhs.y == rhs.y); } + + /// Returns the result of a componentwise equality operation on a half2 vector and a half value. + /// Left hand side half2 to use to compute componentwise equality. + /// Right hand side half to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (half2 lhs, half rhs) { return new bool2 (lhs.x == rhs, lhs.y == rhs); } + + /// Returns the result of a componentwise equality operation on a half value and a half2 vector. + /// Left hand side half to use to compute componentwise equality. + /// Right hand side half2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (half lhs, half2 rhs) { return new bool2 (lhs == rhs.x, lhs == rhs.y); } + + + /// Returns the result of a componentwise not equal operation on two half2 vectors. + /// Left hand side half2 to use to compute componentwise not equal. + /// Right hand side half2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (half2 lhs, half2 rhs) { return new bool2 (lhs.x != rhs.x, lhs.y != rhs.y); } + + /// Returns the result of a componentwise not equal operation on a half2 vector and a half value. + /// Left hand side half2 to use to compute componentwise not equal. + /// Right hand side half to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (half2 lhs, half rhs) { return new bool2 (lhs.x != rhs, lhs.y != rhs); } + + /// Returns the result of a componentwise not equal operation on a half value and a half2 vector. + /// Left hand side half to use to compute componentwise not equal. + /// Right hand side half2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (half lhs, half2 rhs) { return new bool2 (lhs != rhs.x, lhs != rhs.y); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, y); } + } + + + + /// Returns the half element at a specified index. + unsafe public half this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (half2* array = &this) { return ((half*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (half* array = &x) { array[index] = value; } + } + } + + /// Returns true if the half2 is equal to a given half2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(half2 rhs) { return x == rhs.x && y == rhs.y; } + + /// Returns true if the half2 is equal to a given half2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is half2 converted && Equals(converted); } + + + /// Returns a hash code for the half2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the half2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("half2({0}, {1})", x, y); + } + + /// Returns a string representation of the half2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("half2({0}, {1})", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public half x; + public half y; + public DebuggerProxy(half2 v) + { + x = v.x; + y = v.y; + } + } + + } + + public static partial class math + { + /// Returns a half2 vector constructed from two half values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// half2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half2 half2(half x, half y) { return new half2(x, y); } + + /// Returns a half2 vector constructed from a half2 vector. + /// The constructed vector's xy components will be set to this value. + /// half2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half2 half2(half2 xy) { return new half2(xy); } + + /// Returns a half2 vector constructed from a single half value by assigning it to every component. + /// half to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half2 half2(half v) { return new half2(v); } + + /// Returns a half2 vector constructed from a single float value by converting it to half and assigning it to every component. + /// float to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half2 half2(float v) { return new half2(v); } + + /// Return a half2 vector constructed from a float2 vector by componentwise conversion. + /// float2 to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half2 half2(float2 v) { return new half2(v); } + + /// Returns a half2 vector constructed from a single double value by converting it to half and assigning it to every component. + /// double to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half2 half2(double v) { return new half2(v); } + + /// Return a half2 vector constructed from a double2 vector by componentwise conversion. + /// double2 to convert to half2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half2 half2(double2 v) { return new half2(v); } + + /// Returns a uint hash code of a half2 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(half2 v) + { + return csum(uint2(v.x.value, v.y.value) * uint2(0x6E624EB7u, 0x7383ED49u)) + 0xDD49C23Bu; + } + + /// + /// Returns a uint2 vector hash code of a half2 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(half2 v) + { + return (uint2(v.x.value, v.y.value) * uint2(0xEBD0D005u, 0x91475DF7u)) + 0x55E84827u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/half3.gen.cs b/ThirdParty/Unity.Mathematics/half3.gen.cs new file mode 100644 index 0000000..2e5e890 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/half3.gen.cs @@ -0,0 +1,1439 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3 component vector of halfs. + [DebuggerTypeProxy(typeof(half3.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct half3 : System.IEquatable, IFormattable + { + /// x component of the vector. + public half x; + /// y component of the vector. + public half y; + /// z component of the vector. + public half z; + + /// half3 zero value. + public static readonly half3 zero; + + /// Constructs a half3 vector from three half values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(half x, half y, half z) + { + this.x = x; + this.y = y; + this.z = z; + } + + /// Constructs a half3 vector from a half value and a half2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(half x, half2 yz) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + } + + /// Constructs a half3 vector from a half2 vector and a half value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(half2 xy, half z) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + } + + /// Constructs a half3 vector from a half3 vector. + /// The constructed vector's xyz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(half3 xyz) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + } + + /// Constructs a half3 vector from a single half value by assigning it to every component. + /// half to convert to half3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(half v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a half3 vector from a single float value by converting it to half and assigning it to every component. + /// float to convert to half3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(float v) + { + this.x = (half)v; + this.y = (half)v; + this.z = (half)v; + } + + /// Constructs a half3 vector from a float3 vector by componentwise conversion. + /// float3 to convert to half3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(float3 v) + { + this.x = (half)v.x; + this.y = (half)v.y; + this.z = (half)v.z; + } + + /// Constructs a half3 vector from a single double value by converting it to half and assigning it to every component. + /// double to convert to half3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(double v) + { + this.x = (half)v; + this.y = (half)v; + this.z = (half)v; + } + + /// Constructs a half3 vector from a double3 vector by componentwise conversion. + /// double3 to convert to half3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half3(double3 v) + { + this.x = (half)v.x; + this.y = (half)v.y; + this.z = (half)v.z; + } + + + /// Implicitly converts a single half value to a half3 vector by assigning it to every component. + /// half to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator half3(half v) { return new half3(v); } + + /// Explicitly converts a single float value to a half3 vector by converting it to half and assigning it to every component. + /// float to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half3(float v) { return new half3(v); } + + /// Explicitly converts a float3 vector to a half3 vector by componentwise conversion. + /// float3 to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half3(float3 v) { return new half3(v); } + + /// Explicitly converts a single double value to a half3 vector by converting it to half and assigning it to every component. + /// double to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half3(double v) { return new half3(v); } + + /// Explicitly converts a double3 vector to a half3 vector by componentwise conversion. + /// double3 to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half3(double3 v) { return new half3(v); } + + + /// Returns the result of a componentwise equality operation on two half3 vectors. + /// Left hand side half3 to use to compute componentwise equality. + /// Right hand side half3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (half3 lhs, half3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); } + + /// Returns the result of a componentwise equality operation on a half3 vector and a half value. + /// Left hand side half3 to use to compute componentwise equality. + /// Right hand side half to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (half3 lhs, half rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); } + + /// Returns the result of a componentwise equality operation on a half value and a half3 vector. + /// Left hand side half to use to compute componentwise equality. + /// Right hand side half3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (half lhs, half3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); } + + + /// Returns the result of a componentwise not equal operation on two half3 vectors. + /// Left hand side half3 to use to compute componentwise not equal. + /// Right hand side half3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (half3 lhs, half3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); } + + /// Returns the result of a componentwise not equal operation on a half3 vector and a half value. + /// Left hand side half3 to use to compute componentwise not equal. + /// Right hand side half to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (half3 lhs, half rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); } + + /// Returns the result of a componentwise not equal operation on a half value and a half3 vector. + /// Left hand side half to use to compute componentwise not equal. + /// Right hand side half3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (half lhs, half3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(z, z); } + } + + + + /// Returns the half element at a specified index. + unsafe public half this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (half3* array = &this) { return ((half*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (half* array = &x) { array[index] = value; } + } + } + + /// Returns true if the half3 is equal to a given half3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(half3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } + + /// Returns true if the half3 is equal to a given half3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is half3 converted && Equals(converted); } + + + /// Returns a hash code for the half3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the half3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("half3({0}, {1}, {2})", x, y, z); + } + + /// Returns a string representation of the half3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("half3({0}, {1}, {2})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public half x; + public half y; + public half z; + public DebuggerProxy(half3 v) + { + x = v.x; + y = v.y; + z = v.z; + } + } + + } + + public static partial class math + { + /// Returns a half3 vector constructed from three half values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// half3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(half x, half y, half z) { return new half3(x, y, z); } + + /// Returns a half3 vector constructed from a half value and a half2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// half3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(half x, half2 yz) { return new half3(x, yz); } + + /// Returns a half3 vector constructed from a half2 vector and a half value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// half3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(half2 xy, half z) { return new half3(xy, z); } + + /// Returns a half3 vector constructed from a half3 vector. + /// The constructed vector's xyz components will be set to this value. + /// half3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(half3 xyz) { return new half3(xyz); } + + /// Returns a half3 vector constructed from a single half value by assigning it to every component. + /// half to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(half v) { return new half3(v); } + + /// Returns a half3 vector constructed from a single float value by converting it to half and assigning it to every component. + /// float to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(float v) { return new half3(v); } + + /// Return a half3 vector constructed from a float3 vector by componentwise conversion. + /// float3 to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(float3 v) { return new half3(v); } + + /// Returns a half3 vector constructed from a single double value by converting it to half and assigning it to every component. + /// double to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(double v) { return new half3(v); } + + /// Return a half3 vector constructed from a double3 vector by componentwise conversion. + /// double3 to convert to half3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half3 half3(double3 v) { return new half3(v); } + + /// Returns a uint hash code of a half3 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(half3 v) + { + return csum(uint3(v.x.value, v.y.value, v.z.value) * uint3(0x685835CFu, 0xC3D32AE1u, 0xB966942Fu)) + 0xFE9856B3u; + } + + /// + /// Returns a uint3 vector hash code of a half3 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(half3 v) + { + return (uint3(v.x.value, v.y.value, v.z.value) * uint3(0xFA3A3285u, 0xAD55999Du, 0xDCDD5341u)) + 0x94DDD769u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/half4.gen.cs b/ThirdParty/Unity.Mathematics/half4.gen.cs new file mode 100644 index 0000000..f978699 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/half4.gen.cs @@ -0,0 +1,3603 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4 component vector of halfs. + [DebuggerTypeProxy(typeof(half4.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct half4 : System.IEquatable, IFormattable + { + /// x component of the vector. + public half x; + /// y component of the vector. + public half y; + /// z component of the vector. + public half z; + /// w component of the vector. + public half w; + + /// half4 zero value. + public static readonly half4 zero; + + /// Constructs a half4 vector from four half values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half x, half y, half z, half w) + { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + /// Constructs a half4 vector from two half values and a half2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half x, half y, half2 zw) + { + this.x = x; + this.y = y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a half4 vector from a half value, a half2 vector and a half value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half x, half2 yz, half w) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + this.w = w; + } + + /// Constructs a half4 vector from a half value and a half3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half x, half3 yzw) + { + this.x = x; + this.y = yzw.x; + this.z = yzw.y; + this.w = yzw.z; + } + + /// Constructs a half4 vector from a half2 vector and two half values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half2 xy, half z, half w) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + this.w = w; + } + + /// Constructs a half4 vector from two half2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half2 xy, half2 zw) + { + this.x = xy.x; + this.y = xy.y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a half4 vector from a half3 vector and a half value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half3 xyz, half w) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + this.w = w; + } + + /// Constructs a half4 vector from a half4 vector. + /// The constructed vector's xyzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half4 xyzw) + { + this.x = xyzw.x; + this.y = xyzw.y; + this.z = xyzw.z; + this.w = xyzw.w; + } + + /// Constructs a half4 vector from a single half value by assigning it to every component. + /// half to convert to half4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(half v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a half4 vector from a single float value by converting it to half and assigning it to every component. + /// float to convert to half4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(float v) + { + this.x = (half)v; + this.y = (half)v; + this.z = (half)v; + this.w = (half)v; + } + + /// Constructs a half4 vector from a float4 vector by componentwise conversion. + /// float4 to convert to half4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(float4 v) + { + this.x = (half)v.x; + this.y = (half)v.y; + this.z = (half)v.z; + this.w = (half)v.w; + } + + /// Constructs a half4 vector from a single double value by converting it to half and assigning it to every component. + /// double to convert to half4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(double v) + { + this.x = (half)v; + this.y = (half)v; + this.z = (half)v; + this.w = (half)v; + } + + /// Constructs a half4 vector from a double4 vector by componentwise conversion. + /// double4 to convert to half4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public half4(double4 v) + { + this.x = (half)v.x; + this.y = (half)v.y; + this.z = (half)v.z; + this.w = (half)v.w; + } + + + /// Implicitly converts a single half value to a half4 vector by assigning it to every component. + /// half to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator half4(half v) { return new half4(v); } + + /// Explicitly converts a single float value to a half4 vector by converting it to half and assigning it to every component. + /// float to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half4(float v) { return new half4(v); } + + /// Explicitly converts a float4 vector to a half4 vector by componentwise conversion. + /// float4 to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half4(float4 v) { return new half4(v); } + + /// Explicitly converts a single double value to a half4 vector by converting it to half and assigning it to every component. + /// double to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half4(double v) { return new half4(v); } + + /// Explicitly converts a double4 vector to a half4 vector by componentwise conversion. + /// double4 to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator half4(double4 v) { return new half4(v); } + + + /// Returns the result of a componentwise equality operation on two half4 vectors. + /// Left hand side half4 to use to compute componentwise equality. + /// Right hand side half4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (half4 lhs, half4 rhs) { return new bool4 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z, lhs.w == rhs.w); } + + /// Returns the result of a componentwise equality operation on a half4 vector and a half value. + /// Left hand side half4 to use to compute componentwise equality. + /// Right hand side half to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (half4 lhs, half rhs) { return new bool4 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs, lhs.w == rhs); } + + /// Returns the result of a componentwise equality operation on a half value and a half4 vector. + /// Left hand side half to use to compute componentwise equality. + /// Right hand side half4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (half lhs, half4 rhs) { return new bool4 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z, lhs == rhs.w); } + + + /// Returns the result of a componentwise not equal operation on two half4 vectors. + /// Left hand side half4 to use to compute componentwise not equal. + /// Right hand side half4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (half4 lhs, half4 rhs) { return new bool4 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z, lhs.w != rhs.w); } + + /// Returns the result of a componentwise not equal operation on a half4 vector and a half value. + /// Left hand side half4 to use to compute componentwise not equal. + /// Right hand side half to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (half4 lhs, half rhs) { return new bool4 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs, lhs.w != rhs); } + + /// Returns the result of a componentwise not equal operation on a half value and a half4 vector. + /// Left hand side half to use to compute componentwise not equal. + /// Right hand side half4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (half lhs, half4 rhs) { return new bool4 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z, lhs != rhs.w); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 xwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(x, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 yzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 ywww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(y, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 zwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(z, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half4 wwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half4(w, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 xww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 ywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 ywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 ywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 yww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 zww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 wwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half3 www + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half3(w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 xw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 yw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 zw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 wx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 wy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 wz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public half2 ww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new half2(w, w); } + } + + + + /// Returns the half element at a specified index. + unsafe public half this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (half4* array = &this) { return ((half*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (half* array = &x) { array[index] = value; } + } + } + + /// Returns true if the half4 is equal to a given half4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(half4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } + + /// Returns true if the half4 is equal to a given half4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is half4 converted && Equals(converted); } + + + /// Returns a hash code for the half4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the half4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("half4({0}, {1}, {2}, {3})", x, y, z, w); + } + + /// Returns a string representation of the half4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("half4({0}, {1}, {2}, {3})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public half x; + public half y; + public half z; + public half w; + public DebuggerProxy(half4 v) + { + x = v.x; + y = v.y; + z = v.z; + w = v.w; + } + } + + } + + public static partial class math + { + /// Returns a half4 vector constructed from four half values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// half4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half x, half y, half z, half w) { return new half4(x, y, z, w); } + + /// Returns a half4 vector constructed from two half values and a half2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// half4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half x, half y, half2 zw) { return new half4(x, y, zw); } + + /// Returns a half4 vector constructed from a half value, a half2 vector and a half value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// half4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half x, half2 yz, half w) { return new half4(x, yz, w); } + + /// Returns a half4 vector constructed from a half value and a half3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + /// half4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half x, half3 yzw) { return new half4(x, yzw); } + + /// Returns a half4 vector constructed from a half2 vector and two half values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// half4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half2 xy, half z, half w) { return new half4(xy, z, w); } + + /// Returns a half4 vector constructed from two half2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// half4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half2 xy, half2 zw) { return new half4(xy, zw); } + + /// Returns a half4 vector constructed from a half3 vector and a half value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// half4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half3 xyz, half w) { return new half4(xyz, w); } + + /// Returns a half4 vector constructed from a half4 vector. + /// The constructed vector's xyzw components will be set to this value. + /// half4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half4 xyzw) { return new half4(xyzw); } + + /// Returns a half4 vector constructed from a single half value by assigning it to every component. + /// half to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(half v) { return new half4(v); } + + /// Returns a half4 vector constructed from a single float value by converting it to half and assigning it to every component. + /// float to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(float v) { return new half4(v); } + + /// Return a half4 vector constructed from a float4 vector by componentwise conversion. + /// float4 to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(float4 v) { return new half4(v); } + + /// Returns a half4 vector constructed from a single double value by converting it to half and assigning it to every component. + /// double to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(double v) { return new half4(v); } + + /// Return a half4 vector constructed from a double4 vector by componentwise conversion. + /// double4 to convert to half4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static half4 half4(double4 v) { return new half4(v); } + + /// Returns a uint hash code of a half4 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(half4 v) + { + return csum(uint4(v.x.value, v.y.value, v.z.value, v.w.value) * uint4(0x745ED837u, 0x9CDC88F5u, 0xFA62D721u, 0x7E4DB1CFu)) + 0x68EEE0F5u; + } + + /// + /// Returns a uint4 vector hash code of a half4 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(half4 v) + { + return (uint4(v.x.value, v.y.value, v.z.value, v.w.value) * uint4(0xBC3B0A59u, 0x816EFB5Du, 0xA24E82B7u, 0x45A22087u)) + 0xFC104C3Bu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int2.gen.cs b/ThirdParty/Unity.Mathematics/int2.gen.cs new file mode 100644 index 0000000..f47650d --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int2.gen.cs @@ -0,0 +1,1043 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2 component vector of ints. + [DebuggerTypeProxy(typeof(int2.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int2 : System.IEquatable, IFormattable + { + /// x component of the vector. + public int x; + /// y component of the vector. + public int y; + + /// int2 zero value. + public static readonly int2 zero; + + /// Constructs a int2 vector from two int values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(int x, int y) + { + this.x = x; + this.y = y; + } + + /// Constructs a int2 vector from an int2 vector. + /// The constructed vector's xy components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(int2 xy) + { + this.x = xy.x; + this.y = xy.y; + } + + /// Constructs a int2 vector from a single int value by assigning it to every component. + /// int to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(int v) + { + this.x = v; + this.y = v; + } + + /// Constructs a int2 vector from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(bool v) + { + this.x = v ? 1 : 0; + this.y = v ? 1 : 0; + } + + /// Constructs a int2 vector from a bool2 vector by componentwise conversion. + /// bool2 to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(bool2 v) + { + this.x = v.x ? 1 : 0; + this.y = v.y ? 1 : 0; + } + + /// Constructs a int2 vector from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(uint v) + { + this.x = (int)v; + this.y = (int)v; + } + + /// Constructs a int2 vector from a uint2 vector by componentwise conversion. + /// uint2 to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(uint2 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + } + + /// Constructs a int2 vector from a single float value by converting it to int and assigning it to every component. + /// float to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(float v) + { + this.x = (int)v; + this.y = (int)v; + } + + /// Constructs a int2 vector from a float2 vector by componentwise conversion. + /// float2 to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(float2 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + } + + /// Constructs a int2 vector from a single double value by converting it to int and assigning it to every component. + /// double to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(double v) + { + this.x = (int)v; + this.y = (int)v; + } + + /// Constructs a int2 vector from a double2 vector by componentwise conversion. + /// double2 to convert to int2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2(double2 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + } + + + /// Implicitly converts a single int value to a int2 vector by assigning it to every component. + /// int to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int2(int v) { return new int2(v); } + + /// Explicitly converts a single bool value to a int2 vector by converting it to int and assigning it to every component. + /// bool to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2(bool v) { return new int2(v); } + + /// Explicitly converts a bool2 vector to a int2 vector by componentwise conversion. + /// bool2 to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2(bool2 v) { return new int2(v); } + + /// Explicitly converts a single uint value to a int2 vector by converting it to int and assigning it to every component. + /// uint to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2(uint v) { return new int2(v); } + + /// Explicitly converts a uint2 vector to a int2 vector by componentwise conversion. + /// uint2 to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2(uint2 v) { return new int2(v); } + + /// Explicitly converts a single float value to a int2 vector by converting it to int and assigning it to every component. + /// float to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2(float v) { return new int2(v); } + + /// Explicitly converts a float2 vector to a int2 vector by componentwise conversion. + /// float2 to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2(float2 v) { return new int2(v); } + + /// Explicitly converts a single double value to a int2 vector by converting it to int and assigning it to every component. + /// double to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2(double v) { return new int2(v); } + + /// Explicitly converts a double2 vector to a int2 vector by componentwise conversion. + /// double2 to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2(double2 v) { return new int2(v); } + + + /// Returns the result of a componentwise multiplication operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise multiplication. + /// Right hand side int2 to use to compute componentwise multiplication. + /// int2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator * (int2 lhs, int2 rhs) { return new int2 (lhs.x * rhs.x, lhs.y * rhs.y); } + + /// Returns the result of a componentwise multiplication operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator * (int2 lhs, int rhs) { return new int2 (lhs.x * rhs, lhs.y * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int2 to use to compute componentwise multiplication. + /// int2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator * (int lhs, int2 rhs) { return new int2 (lhs * rhs.x, lhs * rhs.y); } + + + /// Returns the result of a componentwise addition operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise addition. + /// Right hand side int2 to use to compute componentwise addition. + /// int2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator + (int2 lhs, int2 rhs) { return new int2 (lhs.x + rhs.x, lhs.y + rhs.y); } + + /// Returns the result of a componentwise addition operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator + (int2 lhs, int rhs) { return new int2 (lhs.x + rhs, lhs.y + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int2 to use to compute componentwise addition. + /// int2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator + (int lhs, int2 rhs) { return new int2 (lhs + rhs.x, lhs + rhs.y); } + + + /// Returns the result of a componentwise subtraction operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise subtraction. + /// Right hand side int2 to use to compute componentwise subtraction. + /// int2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator - (int2 lhs, int2 rhs) { return new int2 (lhs.x - rhs.x, lhs.y - rhs.y); } + + /// Returns the result of a componentwise subtraction operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator - (int2 lhs, int rhs) { return new int2 (lhs.x - rhs, lhs.y - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int2 to use to compute componentwise subtraction. + /// int2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator - (int lhs, int2 rhs) { return new int2 (lhs - rhs.x, lhs - rhs.y); } + + + /// Returns the result of a componentwise division operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise division. + /// Right hand side int2 to use to compute componentwise division. + /// int2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator / (int2 lhs, int2 rhs) { return new int2 (lhs.x / rhs.x, lhs.y / rhs.y); } + + /// Returns the result of a componentwise division operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator / (int2 lhs, int rhs) { return new int2 (lhs.x / rhs, lhs.y / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int2 to use to compute componentwise division. + /// int2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator / (int lhs, int2 rhs) { return new int2 (lhs / rhs.x, lhs / rhs.y); } + + + /// Returns the result of a componentwise modulus operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise modulus. + /// Right hand side int2 to use to compute componentwise modulus. + /// int2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator % (int2 lhs, int2 rhs) { return new int2 (lhs.x % rhs.x, lhs.y % rhs.y); } + + /// Returns the result of a componentwise modulus operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator % (int2 lhs, int rhs) { return new int2 (lhs.x % rhs, lhs.y % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int2 to use to compute componentwise modulus. + /// int2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator % (int lhs, int2 rhs) { return new int2 (lhs % rhs.x, lhs % rhs.y); } + + + /// Returns the result of a componentwise increment operation on an int2 vector. + /// Value to use when computing the componentwise increment. + /// int2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator ++ (int2 val) { return new int2 (++val.x, ++val.y); } + + + /// Returns the result of a componentwise decrement operation on an int2 vector. + /// Value to use when computing the componentwise decrement. + /// int2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator -- (int2 val) { return new int2 (--val.x, --val.y); } + + + /// Returns the result of a componentwise less than operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise less than. + /// Right hand side int2 to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (int2 lhs, int2 rhs) { return new bool2 (lhs.x < rhs.x, lhs.y < rhs.y); } + + /// Returns the result of a componentwise less than operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (int2 lhs, int rhs) { return new bool2 (lhs.x < rhs, lhs.y < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int2 to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (int lhs, int2 rhs) { return new bool2 (lhs < rhs.x, lhs < rhs.y); } + + + /// Returns the result of a componentwise less or equal operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise less or equal. + /// Right hand side int2 to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (int2 lhs, int2 rhs) { return new bool2 (lhs.x <= rhs.x, lhs.y <= rhs.y); } + + /// Returns the result of a componentwise less or equal operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (int2 lhs, int rhs) { return new bool2 (lhs.x <= rhs, lhs.y <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int2 to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (int lhs, int2 rhs) { return new bool2 (lhs <= rhs.x, lhs <= rhs.y); } + + + /// Returns the result of a componentwise greater than operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise greater than. + /// Right hand side int2 to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (int2 lhs, int2 rhs) { return new bool2 (lhs.x > rhs.x, lhs.y > rhs.y); } + + /// Returns the result of a componentwise greater than operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (int2 lhs, int rhs) { return new bool2 (lhs.x > rhs, lhs.y > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int2 to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (int lhs, int2 rhs) { return new bool2 (lhs > rhs.x, lhs > rhs.y); } + + + /// Returns the result of a componentwise greater or equal operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise greater or equal. + /// Right hand side int2 to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (int2 lhs, int2 rhs) { return new bool2 (lhs.x >= rhs.x, lhs.y >= rhs.y); } + + /// Returns the result of a componentwise greater or equal operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (int2 lhs, int rhs) { return new bool2 (lhs.x >= rhs, lhs.y >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int2 to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (int lhs, int2 rhs) { return new bool2 (lhs >= rhs.x, lhs >= rhs.y); } + + + /// Returns the result of a componentwise unary minus operation on an int2 vector. + /// Value to use when computing the componentwise unary minus. + /// int2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator - (int2 val) { return new int2 (-val.x, -val.y); } + + + /// Returns the result of a componentwise unary plus operation on an int2 vector. + /// Value to use when computing the componentwise unary plus. + /// int2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator + (int2 val) { return new int2 (+val.x, +val.y); } + + + /// Returns the result of a componentwise left shift operation on an int2 vector by a number of bits specified by a single int. + /// The vector to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator << (int2 x, int n) { return new int2 (x.x << n, x.y << n); } + + /// Returns the result of a componentwise right shift operation on an int2 vector by a number of bits specified by a single int. + /// The vector to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator >> (int2 x, int n) { return new int2 (x.x >> n, x.y >> n); } + + /// Returns the result of a componentwise equality operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise equality. + /// Right hand side int2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (int2 lhs, int2 rhs) { return new bool2 (lhs.x == rhs.x, lhs.y == rhs.y); } + + /// Returns the result of a componentwise equality operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (int2 lhs, int rhs) { return new bool2 (lhs.x == rhs, lhs.y == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (int lhs, int2 rhs) { return new bool2 (lhs == rhs.x, lhs == rhs.y); } + + + /// Returns the result of a componentwise not equal operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise not equal. + /// Right hand side int2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (int2 lhs, int2 rhs) { return new bool2 (lhs.x != rhs.x, lhs.y != rhs.y); } + + /// Returns the result of a componentwise not equal operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (int2 lhs, int rhs) { return new bool2 (lhs.x != rhs, lhs.y != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (int lhs, int2 rhs) { return new bool2 (lhs != rhs.x, lhs != rhs.y); } + + + /// Returns the result of a componentwise bitwise not operation on an int2 vector. + /// Value to use when computing the componentwise bitwise not. + /// int2 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator ~ (int2 val) { return new int2 (~val.x, ~val.y); } + + + /// Returns the result of a componentwise bitwise and operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise bitwise and. + /// Right hand side int2 to use to compute componentwise bitwise and. + /// int2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator & (int2 lhs, int2 rhs) { return new int2 (lhs.x & rhs.x, lhs.y & rhs.y); } + + /// Returns the result of a componentwise bitwise and operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator & (int2 lhs, int rhs) { return new int2 (lhs.x & rhs, lhs.y & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int2 to use to compute componentwise bitwise and. + /// int2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator & (int lhs, int2 rhs) { return new int2 (lhs & rhs.x, lhs & rhs.y); } + + + /// Returns the result of a componentwise bitwise or operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise bitwise or. + /// Right hand side int2 to use to compute componentwise bitwise or. + /// int2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator | (int2 lhs, int2 rhs) { return new int2 (lhs.x | rhs.x, lhs.y | rhs.y); } + + /// Returns the result of a componentwise bitwise or operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator | (int2 lhs, int rhs) { return new int2 (lhs.x | rhs, lhs.y | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int2 to use to compute componentwise bitwise or. + /// int2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator | (int lhs, int2 rhs) { return new int2 (lhs | rhs.x, lhs | rhs.y); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int2 vectors. + /// Left hand side int2 to use to compute componentwise bitwise exclusive or. + /// Right hand side int2 to use to compute componentwise bitwise exclusive or. + /// int2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator ^ (int2 lhs, int2 rhs) { return new int2 (lhs.x ^ rhs.x, lhs.y ^ rhs.y); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int2 vector and an int value. + /// Left hand side int2 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator ^ (int2 lhs, int rhs) { return new int2 (lhs.x ^ rhs, lhs.y ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int2 vector. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int2 to use to compute componentwise bitwise exclusive or. + /// int2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 operator ^ (int lhs, int2 rhs) { return new int2 (lhs ^ rhs.x, lhs ^ rhs.y); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, y); } + } + + + + /// Returns the int element at a specified index. + unsafe public int this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (int2* array = &this) { return ((int*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (int* array = &x) { array[index] = value; } + } + } + + /// Returns true if the int2 is equal to a given int2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int2 rhs) { return x == rhs.x && y == rhs.y; } + + /// Returns true if the int2 is equal to a given int2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int2 converted && Equals(converted); } + + + /// Returns a hash code for the int2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int2({0}, {1})", x, y); + } + + /// Returns a string representation of the int2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int2({0}, {1})", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public int x; + public int y; + public DebuggerProxy(int2 v) + { + x = v.x; + y = v.y; + } + } + + } + + public static partial class math + { + /// Returns a int2 vector constructed from two int values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// int2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(int x, int y) { return new int2(x, y); } + + /// Returns a int2 vector constructed from an int2 vector. + /// The constructed vector's xy components will be set to this value. + /// int2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(int2 xy) { return new int2(xy); } + + /// Returns a int2 vector constructed from a single int value by assigning it to every component. + /// int to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(int v) { return new int2(v); } + + /// Returns a int2 vector constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(bool v) { return new int2(v); } + + /// Return a int2 vector constructed from a bool2 vector by componentwise conversion. + /// bool2 to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(bool2 v) { return new int2(v); } + + /// Returns a int2 vector constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(uint v) { return new int2(v); } + + /// Return a int2 vector constructed from a uint2 vector by componentwise conversion. + /// uint2 to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(uint2 v) { return new int2(v); } + + /// Returns a int2 vector constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(float v) { return new int2(v); } + + /// Return a int2 vector constructed from a float2 vector by componentwise conversion. + /// float2 to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(float2 v) { return new int2(v); } + + /// Returns a int2 vector constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(double v) { return new int2(v); } + + /// Return a int2 vector constructed from a double2 vector by componentwise conversion. + /// double2 to convert to int2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 int2(double2 v) { return new int2(v); } + + /// Returns a uint hash code of a int2 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int2 v) + { + return csum(asuint(v) * uint2(0x83B58237u, 0x833E3E29u)) + 0xA9D919BFu; + } + + /// + /// Returns a uint2 vector hash code of a int2 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(int2 v) + { + return (asuint(v) * uint2(0xC3EC1D97u, 0xB8B208C7u)) + 0x5D3ED947u; + } + + /// Returns the result of specified shuffling of the components from two int2 vectors into an int value. + /// int2 to use as the left argument of the shuffle operation. + /// int2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int. + /// int result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int shuffle(int2 left, int2 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two int2 vectors into an int2 vector. + /// int2 to use as the left argument of the shuffle operation. + /// int2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int2 x component. + /// The ShuffleComponent to use when setting the resulting int2 y component. + /// int2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 shuffle(int2 left, int2 right, ShuffleComponent x, ShuffleComponent y) + { + return int2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two int2 vectors into an int3 vector. + /// int2 to use as the left argument of the shuffle operation. + /// int2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int3 x component. + /// The ShuffleComponent to use when setting the resulting int3 y component. + /// The ShuffleComponent to use when setting the resulting int3 z component. + /// int3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 shuffle(int2 left, int2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return int3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two int2 vectors into an int4 vector. + /// int2 to use as the left argument of the shuffle operation. + /// int2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int4 x component. + /// The ShuffleComponent to use when setting the resulting int4 y component. + /// The ShuffleComponent to use when setting the resulting int4 z component. + /// The ShuffleComponent to use when setting the resulting int4 w component. + /// int4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 shuffle(int2 left, int2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return int4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int select_shuffle_component(int2 a, int2 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int2x2.gen.cs b/ThirdParty/Unity.Mathematics/int2x2.gen.cs new file mode 100644 index 0000000..f46bc53 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int2x2.gen.cs @@ -0,0 +1,729 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x2 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int2x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int2 c0; + /// Column 1 of the matrix. + public int2 c1; + + /// int2x2 identity transform. + public static readonly int2x2 identity = new int2x2(1, 0, 0, 1); + + /// int2x2 zero value. + public static readonly int2x2 zero; + + /// Constructs a int2x2 matrix from two int2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(int2 c0, int2 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a int2x2 matrix from 4 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(int m00, int m01, + int m10, int m11) + { + this.c0 = new int2(m00, m10); + this.c1 = new int2(m01, m11); + } + + /// Constructs a int2x2 matrix from a single int value by assigning it to every component. + /// int to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a int2x2 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(bool v) + { + this.c0 = math.select(new int2(0), new int2(1), v); + this.c1 = math.select(new int2(0), new int2(1), v); + } + + /// Constructs a int2x2 matrix from a bool2x2 matrix by componentwise conversion. + /// bool2x2 to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(bool2x2 v) + { + this.c0 = math.select(new int2(0), new int2(1), v.c0); + this.c1 = math.select(new int2(0), new int2(1), v.c1); + } + + /// Constructs a int2x2 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(uint v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + } + + /// Constructs a int2x2 matrix from a uint2x2 matrix by componentwise conversion. + /// uint2x2 to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(uint2x2 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + } + + /// Constructs a int2x2 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(float v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + } + + /// Constructs a int2x2 matrix from a float2x2 matrix by componentwise conversion. + /// float2x2 to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(float2x2 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + } + + /// Constructs a int2x2 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(double v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + } + + /// Constructs a int2x2 matrix from a double2x2 matrix by componentwise conversion. + /// double2x2 to convert to int2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x2(double2x2 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + } + + + /// Implicitly converts a single int value to a int2x2 matrix by assigning it to every component. + /// int to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int2x2(int v) { return new int2x2(v); } + + /// Explicitly converts a single bool value to a int2x2 matrix by converting it to int and assigning it to every component. + /// bool to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x2(bool v) { return new int2x2(v); } + + /// Explicitly converts a bool2x2 matrix to a int2x2 matrix by componentwise conversion. + /// bool2x2 to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x2(bool2x2 v) { return new int2x2(v); } + + /// Explicitly converts a single uint value to a int2x2 matrix by converting it to int and assigning it to every component. + /// uint to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x2(uint v) { return new int2x2(v); } + + /// Explicitly converts a uint2x2 matrix to a int2x2 matrix by componentwise conversion. + /// uint2x2 to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x2(uint2x2 v) { return new int2x2(v); } + + /// Explicitly converts a single float value to a int2x2 matrix by converting it to int and assigning it to every component. + /// float to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x2(float v) { return new int2x2(v); } + + /// Explicitly converts a float2x2 matrix to a int2x2 matrix by componentwise conversion. + /// float2x2 to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x2(float2x2 v) { return new int2x2(v); } + + /// Explicitly converts a single double value to a int2x2 matrix by converting it to int and assigning it to every component. + /// double to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x2(double v) { return new int2x2(v); } + + /// Explicitly converts a double2x2 matrix to a int2x2 matrix by componentwise conversion. + /// double2x2 to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x2(double2x2 v) { return new int2x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise multiplication. + /// Right hand side int2x2 to use to compute componentwise multiplication. + /// int2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator * (int2x2 lhs, int2x2 rhs) { return new int2x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator * (int2x2 lhs, int rhs) { return new int2x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int2x2 to use to compute componentwise multiplication. + /// int2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator * (int lhs, int2x2 rhs) { return new int2x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise addition. + /// Right hand side int2x2 to use to compute componentwise addition. + /// int2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator + (int2x2 lhs, int2x2 rhs) { return new int2x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator + (int2x2 lhs, int rhs) { return new int2x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int2x2 to use to compute componentwise addition. + /// int2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator + (int lhs, int2x2 rhs) { return new int2x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise subtraction. + /// Right hand side int2x2 to use to compute componentwise subtraction. + /// int2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator - (int2x2 lhs, int2x2 rhs) { return new int2x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator - (int2x2 lhs, int rhs) { return new int2x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int2x2 to use to compute componentwise subtraction. + /// int2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator - (int lhs, int2x2 rhs) { return new int2x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise division. + /// Right hand side int2x2 to use to compute componentwise division. + /// int2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator / (int2x2 lhs, int2x2 rhs) { return new int2x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator / (int2x2 lhs, int rhs) { return new int2x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int2x2 to use to compute componentwise division. + /// int2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator / (int lhs, int2x2 rhs) { return new int2x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise modulus. + /// Right hand side int2x2 to use to compute componentwise modulus. + /// int2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator % (int2x2 lhs, int2x2 rhs) { return new int2x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator % (int2x2 lhs, int rhs) { return new int2x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int2x2 to use to compute componentwise modulus. + /// int2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator % (int lhs, int2x2 rhs) { return new int2x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on an int2x2 matrix. + /// Value to use when computing the componentwise increment. + /// int2x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator ++ (int2x2 val) { return new int2x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on an int2x2 matrix. + /// Value to use when computing the componentwise decrement. + /// int2x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator -- (int2x2 val) { return new int2x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise less than. + /// Right hand side int2x2 to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (int2x2 lhs, int2x2 rhs) { return new bool2x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (int2x2 lhs, int rhs) { return new bool2x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int2x2 to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (int lhs, int2x2 rhs) { return new bool2x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise less or equal. + /// Right hand side int2x2 to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (int2x2 lhs, int2x2 rhs) { return new bool2x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (int2x2 lhs, int rhs) { return new bool2x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int2x2 to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (int lhs, int2x2 rhs) { return new bool2x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise greater than. + /// Right hand side int2x2 to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (int2x2 lhs, int2x2 rhs) { return new bool2x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (int2x2 lhs, int rhs) { return new bool2x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int2x2 to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (int lhs, int2x2 rhs) { return new bool2x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise greater or equal. + /// Right hand side int2x2 to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (int2x2 lhs, int2x2 rhs) { return new bool2x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (int2x2 lhs, int rhs) { return new bool2x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int2x2 to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (int lhs, int2x2 rhs) { return new bool2x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on an int2x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// int2x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator - (int2x2 val) { return new int2x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on an int2x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// int2x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator + (int2x2 val) { return new int2x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise left shift operation on an int2x2 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator << (int2x2 x, int n) { return new int2x2 (x.c0 << n, x.c1 << n); } + + /// Returns the result of a componentwise right shift operation on an int2x2 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator >> (int2x2 x, int n) { return new int2x2 (x.c0 >> n, x.c1 >> n); } + + /// Returns the result of a componentwise equality operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise equality. + /// Right hand side int2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (int2x2 lhs, int2x2 rhs) { return new bool2x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (int2x2 lhs, int rhs) { return new bool2x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (int lhs, int2x2 rhs) { return new bool2x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise not equal. + /// Right hand side int2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (int2x2 lhs, int2x2 rhs) { return new bool2x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (int2x2 lhs, int rhs) { return new bool2x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (int lhs, int2x2 rhs) { return new bool2x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise bitwise not operation on an int2x2 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int2x2 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator ~ (int2x2 val) { return new int2x2 (~val.c0, ~val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise bitwise and. + /// Right hand side int2x2 to use to compute componentwise bitwise and. + /// int2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator & (int2x2 lhs, int2x2 rhs) { return new int2x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator & (int2x2 lhs, int rhs) { return new int2x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int2x2 to use to compute componentwise bitwise and. + /// int2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator & (int lhs, int2x2 rhs) { return new int2x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise bitwise or. + /// Right hand side int2x2 to use to compute componentwise bitwise or. + /// int2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator | (int2x2 lhs, int2x2 rhs) { return new int2x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator | (int2x2 lhs, int rhs) { return new int2x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int2x2 to use to compute componentwise bitwise or. + /// int2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator | (int lhs, int2x2 rhs) { return new int2x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int2x2 matrices. + /// Left hand side int2x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side int2x2 to use to compute componentwise bitwise exclusive or. + /// int2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator ^ (int2x2 lhs, int2x2 rhs) { return new int2x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int2x2 matrix and an int value. + /// Left hand side int2x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator ^ (int2x2 lhs, int rhs) { return new int2x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int2x2 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int2x2 to use to compute componentwise bitwise exclusive or. + /// int2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 operator ^ (int lhs, int2x2 rhs) { return new int2x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the int2 element at a specified index. + unsafe public ref int2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (int2x2* array = &this) { return ref ((int2*)array)[index]; } + } + } + + /// Returns true if the int2x2 is equal to a given int2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int2x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the int2x2 is equal to a given int2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int2x2 converted && Equals(converted); } + + + /// Returns a hash code for the int2x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int2x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int2x2({0}, {1}, {2}, {3})", c0.x, c1.x, c0.y, c1.y); + } + + /// Returns a string representation of the int2x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int2x2({0}, {1}, {2}, {3})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int2x2 matrix constructed from two int2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// int2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(int2 c0, int2 c1) { return new int2x2(c0, c1); } + + /// Returns a int2x2 matrix constructed from from 4 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// int2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(int m00, int m01, + int m10, int m11) + { + return new int2x2(m00, m01, + m10, m11); + } + + /// Returns a int2x2 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(int v) { return new int2x2(v); } + + /// Returns a int2x2 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(bool v) { return new int2x2(v); } + + /// Return a int2x2 matrix constructed from a bool2x2 matrix by componentwise conversion. + /// bool2x2 to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(bool2x2 v) { return new int2x2(v); } + + /// Returns a int2x2 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(uint v) { return new int2x2(v); } + + /// Return a int2x2 matrix constructed from a uint2x2 matrix by componentwise conversion. + /// uint2x2 to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(uint2x2 v) { return new int2x2(v); } + + /// Returns a int2x2 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(float v) { return new int2x2(v); } + + /// Return a int2x2 matrix constructed from a float2x2 matrix by componentwise conversion. + /// float2x2 to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(float2x2 v) { return new int2x2(v); } + + /// Returns a int2x2 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(double v) { return new int2x2(v); } + + /// Return a int2x2 matrix constructed from a double2x2 matrix by componentwise conversion. + /// double2x2 to convert to int2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 int2x2(double2x2 v) { return new int2x2(v); } + + /// Return the int2x2 transpose of a int2x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 transpose(int2x2 v) + { + return int2x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y); + } + + /// Returns the determinant of a int2x2 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int determinant(int2x2 m) + { + int a = m.c0.x; + int b = m.c1.x; + int c = m.c0.y; + int d = m.c1.y; + + return a * d - b * c; + } + + /// Returns a uint hash code of a int2x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int2x2 v) + { + return csum(asuint(v.c0) * uint2(0xE191B035u, 0x68586FAFu) + + asuint(v.c1) * uint2(0xD4DFF6D3u, 0xCB634F4Du)) + 0x9B13B92Du; + } + + /// + /// Returns a uint2 vector hash code of a int2x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(int2x2 v) + { + return (asuint(v.c0) * uint2(0x4ABF0813u, 0x86068063u) + + asuint(v.c1) * uint2(0xD75513F9u, 0x5AB3E8CDu)) + 0x676E8407u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int2x3.gen.cs b/ThirdParty/Unity.Mathematics/int2x3.gen.cs new file mode 100644 index 0000000..ec5efe9 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int2x3.gen.cs @@ -0,0 +1,734 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x3 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int2x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int2 c0; + /// Column 1 of the matrix. + public int2 c1; + /// Column 2 of the matrix. + public int2 c2; + + /// int2x3 zero value. + public static readonly int2x3 zero; + + /// Constructs a int2x3 matrix from three int2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(int2 c0, int2 c1, int2 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a int2x3 matrix from 6 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(int m00, int m01, int m02, + int m10, int m11, int m12) + { + this.c0 = new int2(m00, m10); + this.c1 = new int2(m01, m11); + this.c2 = new int2(m02, m12); + } + + /// Constructs a int2x3 matrix from a single int value by assigning it to every component. + /// int to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a int2x3 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(bool v) + { + this.c0 = math.select(new int2(0), new int2(1), v); + this.c1 = math.select(new int2(0), new int2(1), v); + this.c2 = math.select(new int2(0), new int2(1), v); + } + + /// Constructs a int2x3 matrix from a bool2x3 matrix by componentwise conversion. + /// bool2x3 to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(bool2x3 v) + { + this.c0 = math.select(new int2(0), new int2(1), v.c0); + this.c1 = math.select(new int2(0), new int2(1), v.c1); + this.c2 = math.select(new int2(0), new int2(1), v.c2); + } + + /// Constructs a int2x3 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(uint v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + this.c2 = (int2)v; + } + + /// Constructs a int2x3 matrix from a uint2x3 matrix by componentwise conversion. + /// uint2x3 to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(uint2x3 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + this.c2 = (int2)v.c2; + } + + /// Constructs a int2x3 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(float v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + this.c2 = (int2)v; + } + + /// Constructs a int2x3 matrix from a float2x3 matrix by componentwise conversion. + /// float2x3 to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(float2x3 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + this.c2 = (int2)v.c2; + } + + /// Constructs a int2x3 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(double v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + this.c2 = (int2)v; + } + + /// Constructs a int2x3 matrix from a double2x3 matrix by componentwise conversion. + /// double2x3 to convert to int2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x3(double2x3 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + this.c2 = (int2)v.c2; + } + + + /// Implicitly converts a single int value to a int2x3 matrix by assigning it to every component. + /// int to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int2x3(int v) { return new int2x3(v); } + + /// Explicitly converts a single bool value to a int2x3 matrix by converting it to int and assigning it to every component. + /// bool to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x3(bool v) { return new int2x3(v); } + + /// Explicitly converts a bool2x3 matrix to a int2x3 matrix by componentwise conversion. + /// bool2x3 to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x3(bool2x3 v) { return new int2x3(v); } + + /// Explicitly converts a single uint value to a int2x3 matrix by converting it to int and assigning it to every component. + /// uint to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x3(uint v) { return new int2x3(v); } + + /// Explicitly converts a uint2x3 matrix to a int2x3 matrix by componentwise conversion. + /// uint2x3 to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x3(uint2x3 v) { return new int2x3(v); } + + /// Explicitly converts a single float value to a int2x3 matrix by converting it to int and assigning it to every component. + /// float to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x3(float v) { return new int2x3(v); } + + /// Explicitly converts a float2x3 matrix to a int2x3 matrix by componentwise conversion. + /// float2x3 to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x3(float2x3 v) { return new int2x3(v); } + + /// Explicitly converts a single double value to a int2x3 matrix by converting it to int and assigning it to every component. + /// double to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x3(double v) { return new int2x3(v); } + + /// Explicitly converts a double2x3 matrix to a int2x3 matrix by componentwise conversion. + /// double2x3 to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x3(double2x3 v) { return new int2x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise multiplication. + /// Right hand side int2x3 to use to compute componentwise multiplication. + /// int2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator * (int2x3 lhs, int2x3 rhs) { return new int2x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator * (int2x3 lhs, int rhs) { return new int2x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int2x3 to use to compute componentwise multiplication. + /// int2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator * (int lhs, int2x3 rhs) { return new int2x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise addition. + /// Right hand side int2x3 to use to compute componentwise addition. + /// int2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator + (int2x3 lhs, int2x3 rhs) { return new int2x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator + (int2x3 lhs, int rhs) { return new int2x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int2x3 to use to compute componentwise addition. + /// int2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator + (int lhs, int2x3 rhs) { return new int2x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise subtraction. + /// Right hand side int2x3 to use to compute componentwise subtraction. + /// int2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator - (int2x3 lhs, int2x3 rhs) { return new int2x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator - (int2x3 lhs, int rhs) { return new int2x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int2x3 to use to compute componentwise subtraction. + /// int2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator - (int lhs, int2x3 rhs) { return new int2x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise division. + /// Right hand side int2x3 to use to compute componentwise division. + /// int2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator / (int2x3 lhs, int2x3 rhs) { return new int2x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator / (int2x3 lhs, int rhs) { return new int2x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int2x3 to use to compute componentwise division. + /// int2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator / (int lhs, int2x3 rhs) { return new int2x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise modulus. + /// Right hand side int2x3 to use to compute componentwise modulus. + /// int2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator % (int2x3 lhs, int2x3 rhs) { return new int2x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator % (int2x3 lhs, int rhs) { return new int2x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int2x3 to use to compute componentwise modulus. + /// int2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator % (int lhs, int2x3 rhs) { return new int2x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on an int2x3 matrix. + /// Value to use when computing the componentwise increment. + /// int2x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator ++ (int2x3 val) { return new int2x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on an int2x3 matrix. + /// Value to use when computing the componentwise decrement. + /// int2x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator -- (int2x3 val) { return new int2x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise less than. + /// Right hand side int2x3 to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (int2x3 lhs, int2x3 rhs) { return new bool2x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (int2x3 lhs, int rhs) { return new bool2x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int2x3 to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (int lhs, int2x3 rhs) { return new bool2x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise less or equal. + /// Right hand side int2x3 to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (int2x3 lhs, int2x3 rhs) { return new bool2x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (int2x3 lhs, int rhs) { return new bool2x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int2x3 to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (int lhs, int2x3 rhs) { return new bool2x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise greater than. + /// Right hand side int2x3 to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (int2x3 lhs, int2x3 rhs) { return new bool2x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (int2x3 lhs, int rhs) { return new bool2x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int2x3 to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (int lhs, int2x3 rhs) { return new bool2x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise greater or equal. + /// Right hand side int2x3 to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (int2x3 lhs, int2x3 rhs) { return new bool2x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (int2x3 lhs, int rhs) { return new bool2x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int2x3 to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (int lhs, int2x3 rhs) { return new bool2x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on an int2x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// int2x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator - (int2x3 val) { return new int2x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on an int2x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// int2x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator + (int2x3 val) { return new int2x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise left shift operation on an int2x3 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator << (int2x3 x, int n) { return new int2x3 (x.c0 << n, x.c1 << n, x.c2 << n); } + + /// Returns the result of a componentwise right shift operation on an int2x3 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator >> (int2x3 x, int n) { return new int2x3 (x.c0 >> n, x.c1 >> n, x.c2 >> n); } + + /// Returns the result of a componentwise equality operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise equality. + /// Right hand side int2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (int2x3 lhs, int2x3 rhs) { return new bool2x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (int2x3 lhs, int rhs) { return new bool2x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (int lhs, int2x3 rhs) { return new bool2x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise not equal. + /// Right hand side int2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (int2x3 lhs, int2x3 rhs) { return new bool2x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (int2x3 lhs, int rhs) { return new bool2x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (int lhs, int2x3 rhs) { return new bool2x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise bitwise not operation on an int2x3 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int2x3 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator ~ (int2x3 val) { return new int2x3 (~val.c0, ~val.c1, ~val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise bitwise and. + /// Right hand side int2x3 to use to compute componentwise bitwise and. + /// int2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator & (int2x3 lhs, int2x3 rhs) { return new int2x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator & (int2x3 lhs, int rhs) { return new int2x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int2x3 to use to compute componentwise bitwise and. + /// int2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator & (int lhs, int2x3 rhs) { return new int2x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise bitwise or. + /// Right hand side int2x3 to use to compute componentwise bitwise or. + /// int2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator | (int2x3 lhs, int2x3 rhs) { return new int2x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator | (int2x3 lhs, int rhs) { return new int2x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int2x3 to use to compute componentwise bitwise or. + /// int2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator | (int lhs, int2x3 rhs) { return new int2x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int2x3 matrices. + /// Left hand side int2x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side int2x3 to use to compute componentwise bitwise exclusive or. + /// int2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator ^ (int2x3 lhs, int2x3 rhs) { return new int2x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int2x3 matrix and an int value. + /// Left hand side int2x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator ^ (int2x3 lhs, int rhs) { return new int2x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int2x3 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int2x3 to use to compute componentwise bitwise exclusive or. + /// int2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 operator ^ (int lhs, int2x3 rhs) { return new int2x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the int2 element at a specified index. + unsafe public ref int2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (int2x3* array = &this) { return ref ((int2*)array)[index]; } + } + } + + /// Returns true if the int2x3 is equal to a given int2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int2x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the int2x3 is equal to a given int2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int2x3 converted && Equals(converted); } + + + /// Returns a hash code for the int2x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int2x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y); + } + + /// Returns a string representation of the int2x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int2x3 matrix constructed from three int2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// int2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(int2 c0, int2 c1, int2 c2) { return new int2x3(c0, c1, c2); } + + /// Returns a int2x3 matrix constructed from from 6 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// int2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(int m00, int m01, int m02, + int m10, int m11, int m12) + { + return new int2x3(m00, m01, m02, + m10, m11, m12); + } + + /// Returns a int2x3 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(int v) { return new int2x3(v); } + + /// Returns a int2x3 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(bool v) { return new int2x3(v); } + + /// Return a int2x3 matrix constructed from a bool2x3 matrix by componentwise conversion. + /// bool2x3 to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(bool2x3 v) { return new int2x3(v); } + + /// Returns a int2x3 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(uint v) { return new int2x3(v); } + + /// Return a int2x3 matrix constructed from a uint2x3 matrix by componentwise conversion. + /// uint2x3 to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(uint2x3 v) { return new int2x3(v); } + + /// Returns a int2x3 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(float v) { return new int2x3(v); } + + /// Return a int2x3 matrix constructed from a float2x3 matrix by componentwise conversion. + /// float2x3 to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(float2x3 v) { return new int2x3(v); } + + /// Returns a int2x3 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(double v) { return new int2x3(v); } + + /// Return a int2x3 matrix constructed from a double2x3 matrix by componentwise conversion. + /// double2x3 to convert to int2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 int2x3(double2x3 v) { return new int2x3(v); } + + /// Return the int3x2 transpose of a int2x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 transpose(int2x3 v) + { + return int3x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y); + } + + /// Returns a uint hash code of a int2x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int2x3 v) + { + return csum(asuint(v.c0) * uint2(0xCAE78587u, 0x7A1541C9u) + + asuint(v.c1) * uint2(0xF83BD927u, 0x6A243BCBu) + + asuint(v.c2) * uint2(0x509B84C9u, 0x91D13847u)) + 0x52F7230Fu; + } + + /// + /// Returns a uint2 vector hash code of a int2x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(int2x3 v) + { + return (asuint(v.c0) * uint2(0xCF286E83u, 0xE121E6ADu) + + asuint(v.c1) * uint2(0xC9CA1249u, 0x69B60C81u) + + asuint(v.c2) * uint2(0xE0EB6C25u, 0xF648BEABu)) + 0x6BDB2B07u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int2x4.gen.cs b/ThirdParty/Unity.Mathematics/int2x4.gen.cs new file mode 100644 index 0000000..dbb1d76 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int2x4.gen.cs @@ -0,0 +1,756 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x4 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int2x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int2 c0; + /// Column 1 of the matrix. + public int2 c1; + /// Column 2 of the matrix. + public int2 c2; + /// Column 3 of the matrix. + public int2 c3; + + /// int2x4 zero value. + public static readonly int2x4 zero; + + /// Constructs a int2x4 matrix from four int2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(int2 c0, int2 c1, int2 c2, int2 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a int2x4 matrix from 8 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(int m00, int m01, int m02, int m03, + int m10, int m11, int m12, int m13) + { + this.c0 = new int2(m00, m10); + this.c1 = new int2(m01, m11); + this.c2 = new int2(m02, m12); + this.c3 = new int2(m03, m13); + } + + /// Constructs a int2x4 matrix from a single int value by assigning it to every component. + /// int to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a int2x4 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(bool v) + { + this.c0 = math.select(new int2(0), new int2(1), v); + this.c1 = math.select(new int2(0), new int2(1), v); + this.c2 = math.select(new int2(0), new int2(1), v); + this.c3 = math.select(new int2(0), new int2(1), v); + } + + /// Constructs a int2x4 matrix from a bool2x4 matrix by componentwise conversion. + /// bool2x4 to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(bool2x4 v) + { + this.c0 = math.select(new int2(0), new int2(1), v.c0); + this.c1 = math.select(new int2(0), new int2(1), v.c1); + this.c2 = math.select(new int2(0), new int2(1), v.c2); + this.c3 = math.select(new int2(0), new int2(1), v.c3); + } + + /// Constructs a int2x4 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(uint v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + this.c2 = (int2)v; + this.c3 = (int2)v; + } + + /// Constructs a int2x4 matrix from a uint2x4 matrix by componentwise conversion. + /// uint2x4 to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(uint2x4 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + this.c2 = (int2)v.c2; + this.c3 = (int2)v.c3; + } + + /// Constructs a int2x4 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(float v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + this.c2 = (int2)v; + this.c3 = (int2)v; + } + + /// Constructs a int2x4 matrix from a float2x4 matrix by componentwise conversion. + /// float2x4 to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(float2x4 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + this.c2 = (int2)v.c2; + this.c3 = (int2)v.c3; + } + + /// Constructs a int2x4 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(double v) + { + this.c0 = (int2)v; + this.c1 = (int2)v; + this.c2 = (int2)v; + this.c3 = (int2)v; + } + + /// Constructs a int2x4 matrix from a double2x4 matrix by componentwise conversion. + /// double2x4 to convert to int2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2x4(double2x4 v) + { + this.c0 = (int2)v.c0; + this.c1 = (int2)v.c1; + this.c2 = (int2)v.c2; + this.c3 = (int2)v.c3; + } + + + /// Implicitly converts a single int value to a int2x4 matrix by assigning it to every component. + /// int to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int2x4(int v) { return new int2x4(v); } + + /// Explicitly converts a single bool value to a int2x4 matrix by converting it to int and assigning it to every component. + /// bool to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x4(bool v) { return new int2x4(v); } + + /// Explicitly converts a bool2x4 matrix to a int2x4 matrix by componentwise conversion. + /// bool2x4 to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x4(bool2x4 v) { return new int2x4(v); } + + /// Explicitly converts a single uint value to a int2x4 matrix by converting it to int and assigning it to every component. + /// uint to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x4(uint v) { return new int2x4(v); } + + /// Explicitly converts a uint2x4 matrix to a int2x4 matrix by componentwise conversion. + /// uint2x4 to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x4(uint2x4 v) { return new int2x4(v); } + + /// Explicitly converts a single float value to a int2x4 matrix by converting it to int and assigning it to every component. + /// float to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x4(float v) { return new int2x4(v); } + + /// Explicitly converts a float2x4 matrix to a int2x4 matrix by componentwise conversion. + /// float2x4 to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x4(float2x4 v) { return new int2x4(v); } + + /// Explicitly converts a single double value to a int2x4 matrix by converting it to int and assigning it to every component. + /// double to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x4(double v) { return new int2x4(v); } + + /// Explicitly converts a double2x4 matrix to a int2x4 matrix by componentwise conversion. + /// double2x4 to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int2x4(double2x4 v) { return new int2x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise multiplication. + /// Right hand side int2x4 to use to compute componentwise multiplication. + /// int2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator * (int2x4 lhs, int2x4 rhs) { return new int2x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator * (int2x4 lhs, int rhs) { return new int2x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int2x4 to use to compute componentwise multiplication. + /// int2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator * (int lhs, int2x4 rhs) { return new int2x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise addition. + /// Right hand side int2x4 to use to compute componentwise addition. + /// int2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator + (int2x4 lhs, int2x4 rhs) { return new int2x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator + (int2x4 lhs, int rhs) { return new int2x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int2x4 to use to compute componentwise addition. + /// int2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator + (int lhs, int2x4 rhs) { return new int2x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise subtraction. + /// Right hand side int2x4 to use to compute componentwise subtraction. + /// int2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator - (int2x4 lhs, int2x4 rhs) { return new int2x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator - (int2x4 lhs, int rhs) { return new int2x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int2x4 to use to compute componentwise subtraction. + /// int2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator - (int lhs, int2x4 rhs) { return new int2x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise division. + /// Right hand side int2x4 to use to compute componentwise division. + /// int2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator / (int2x4 lhs, int2x4 rhs) { return new int2x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator / (int2x4 lhs, int rhs) { return new int2x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int2x4 to use to compute componentwise division. + /// int2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator / (int lhs, int2x4 rhs) { return new int2x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise modulus. + /// Right hand side int2x4 to use to compute componentwise modulus. + /// int2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator % (int2x4 lhs, int2x4 rhs) { return new int2x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator % (int2x4 lhs, int rhs) { return new int2x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int2x4 to use to compute componentwise modulus. + /// int2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator % (int lhs, int2x4 rhs) { return new int2x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on an int2x4 matrix. + /// Value to use when computing the componentwise increment. + /// int2x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator ++ (int2x4 val) { return new int2x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on an int2x4 matrix. + /// Value to use when computing the componentwise decrement. + /// int2x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator -- (int2x4 val) { return new int2x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise less than. + /// Right hand side int2x4 to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (int2x4 lhs, int2x4 rhs) { return new bool2x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (int2x4 lhs, int rhs) { return new bool2x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int2x4 to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (int lhs, int2x4 rhs) { return new bool2x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise less or equal. + /// Right hand side int2x4 to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (int2x4 lhs, int2x4 rhs) { return new bool2x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (int2x4 lhs, int rhs) { return new bool2x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int2x4 to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (int lhs, int2x4 rhs) { return new bool2x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise greater than. + /// Right hand side int2x4 to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (int2x4 lhs, int2x4 rhs) { return new bool2x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (int2x4 lhs, int rhs) { return new bool2x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int2x4 to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (int lhs, int2x4 rhs) { return new bool2x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise greater or equal. + /// Right hand side int2x4 to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (int2x4 lhs, int2x4 rhs) { return new bool2x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (int2x4 lhs, int rhs) { return new bool2x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int2x4 to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (int lhs, int2x4 rhs) { return new bool2x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on an int2x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// int2x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator - (int2x4 val) { return new int2x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on an int2x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// int2x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator + (int2x4 val) { return new int2x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise left shift operation on an int2x4 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator << (int2x4 x, int n) { return new int2x4 (x.c0 << n, x.c1 << n, x.c2 << n, x.c3 << n); } + + /// Returns the result of a componentwise right shift operation on an int2x4 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator >> (int2x4 x, int n) { return new int2x4 (x.c0 >> n, x.c1 >> n, x.c2 >> n, x.c3 >> n); } + + /// Returns the result of a componentwise equality operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise equality. + /// Right hand side int2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (int2x4 lhs, int2x4 rhs) { return new bool2x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (int2x4 lhs, int rhs) { return new bool2x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (int lhs, int2x4 rhs) { return new bool2x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise not equal. + /// Right hand side int2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (int2x4 lhs, int2x4 rhs) { return new bool2x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (int2x4 lhs, int rhs) { return new bool2x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (int lhs, int2x4 rhs) { return new bool2x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise bitwise not operation on an int2x4 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int2x4 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator ~ (int2x4 val) { return new int2x4 (~val.c0, ~val.c1, ~val.c2, ~val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise bitwise and. + /// Right hand side int2x4 to use to compute componentwise bitwise and. + /// int2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator & (int2x4 lhs, int2x4 rhs) { return new int2x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator & (int2x4 lhs, int rhs) { return new int2x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int2x4 to use to compute componentwise bitwise and. + /// int2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator & (int lhs, int2x4 rhs) { return new int2x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise bitwise or. + /// Right hand side int2x4 to use to compute componentwise bitwise or. + /// int2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator | (int2x4 lhs, int2x4 rhs) { return new int2x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator | (int2x4 lhs, int rhs) { return new int2x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int2x4 to use to compute componentwise bitwise or. + /// int2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator | (int lhs, int2x4 rhs) { return new int2x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int2x4 matrices. + /// Left hand side int2x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side int2x4 to use to compute componentwise bitwise exclusive or. + /// int2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator ^ (int2x4 lhs, int2x4 rhs) { return new int2x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int2x4 matrix and an int value. + /// Left hand side int2x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator ^ (int2x4 lhs, int rhs) { return new int2x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int2x4 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int2x4 to use to compute componentwise bitwise exclusive or. + /// int2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 operator ^ (int lhs, int2x4 rhs) { return new int2x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the int2 element at a specified index. + unsafe public ref int2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (int2x4* array = &this) { return ref ((int2*)array)[index]; } + } + } + + /// Returns true if the int2x4 is equal to a given int2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int2x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the int2x4 is equal to a given int2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int2x4 converted && Equals(converted); } + + + /// Returns a hash code for the int2x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int2x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int2x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y); + } + + /// Returns a string representation of the int2x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int2x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int2x4 matrix constructed from four int2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// int2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(int2 c0, int2 c1, int2 c2, int2 c3) { return new int2x4(c0, c1, c2, c3); } + + /// Returns a int2x4 matrix constructed from from 8 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// int2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(int m00, int m01, int m02, int m03, + int m10, int m11, int m12, int m13) + { + return new int2x4(m00, m01, m02, m03, + m10, m11, m12, m13); + } + + /// Returns a int2x4 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(int v) { return new int2x4(v); } + + /// Returns a int2x4 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(bool v) { return new int2x4(v); } + + /// Return a int2x4 matrix constructed from a bool2x4 matrix by componentwise conversion. + /// bool2x4 to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(bool2x4 v) { return new int2x4(v); } + + /// Returns a int2x4 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(uint v) { return new int2x4(v); } + + /// Return a int2x4 matrix constructed from a uint2x4 matrix by componentwise conversion. + /// uint2x4 to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(uint2x4 v) { return new int2x4(v); } + + /// Returns a int2x4 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(float v) { return new int2x4(v); } + + /// Return a int2x4 matrix constructed from a float2x4 matrix by componentwise conversion. + /// float2x4 to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(float2x4 v) { return new int2x4(v); } + + /// Returns a int2x4 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(double v) { return new int2x4(v); } + + /// Return a int2x4 matrix constructed from a double2x4 matrix by componentwise conversion. + /// double2x4 to convert to int2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 int2x4(double2x4 v) { return new int2x4(v); } + + /// Return the int4x2 transpose of a int2x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 transpose(int2x4 v) + { + return int4x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y, + v.c3.x, v.c3.y); + } + + /// Returns a uint hash code of a int2x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int2x4 v) + { + return csum(asuint(v.c0) * uint2(0x7AA07CD3u, 0xAF642BA9u) + + asuint(v.c1) * uint2(0xA8F2213Bu, 0x9F3FDC37u) + + asuint(v.c2) * uint2(0xAC60D0C3u, 0x9263662Fu) + + asuint(v.c3) * uint2(0xE69626FFu, 0xBD010EEBu)) + 0x9CEDE1D1u; + } + + /// + /// Returns a uint2 vector hash code of a int2x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(int2x4 v) + { + return (asuint(v.c0) * uint2(0x43BE0B51u, 0xAF836EE1u) + + asuint(v.c1) * uint2(0xB130C137u, 0x54834775u) + + asuint(v.c2) * uint2(0x7C022221u, 0xA2D00EDFu) + + asuint(v.c3) * uint2(0xA8977779u, 0x9F1C739Bu)) + 0x4B1BD187u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int3.gen.cs b/ThirdParty/Unity.Mathematics/int3.gen.cs new file mode 100644 index 0000000..082a91a --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int3.gen.cs @@ -0,0 +1,1921 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3 component vector of ints. + [DebuggerTypeProxy(typeof(int3.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int3 : System.IEquatable, IFormattable + { + /// x component of the vector. + public int x; + /// y component of the vector. + public int y; + /// z component of the vector. + public int z; + + /// int3 zero value. + public static readonly int3 zero; + + /// Constructs a int3 vector from three int values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(int x, int y, int z) + { + this.x = x; + this.y = y; + this.z = z; + } + + /// Constructs a int3 vector from an int value and an int2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(int x, int2 yz) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + } + + /// Constructs a int3 vector from an int2 vector and an int value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(int2 xy, int z) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + } + + /// Constructs a int3 vector from an int3 vector. + /// The constructed vector's xyz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(int3 xyz) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + } + + /// Constructs a int3 vector from a single int value by assigning it to every component. + /// int to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(int v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a int3 vector from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(bool v) + { + this.x = v ? 1 : 0; + this.y = v ? 1 : 0; + this.z = v ? 1 : 0; + } + + /// Constructs a int3 vector from a bool3 vector by componentwise conversion. + /// bool3 to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(bool3 v) + { + this.x = v.x ? 1 : 0; + this.y = v.y ? 1 : 0; + this.z = v.z ? 1 : 0; + } + + /// Constructs a int3 vector from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(uint v) + { + this.x = (int)v; + this.y = (int)v; + this.z = (int)v; + } + + /// Constructs a int3 vector from a uint3 vector by componentwise conversion. + /// uint3 to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(uint3 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + this.z = (int)v.z; + } + + /// Constructs a int3 vector from a single float value by converting it to int and assigning it to every component. + /// float to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(float v) + { + this.x = (int)v; + this.y = (int)v; + this.z = (int)v; + } + + /// Constructs a int3 vector from a float3 vector by componentwise conversion. + /// float3 to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(float3 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + this.z = (int)v.z; + } + + /// Constructs a int3 vector from a single double value by converting it to int and assigning it to every component. + /// double to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(double v) + { + this.x = (int)v; + this.y = (int)v; + this.z = (int)v; + } + + /// Constructs a int3 vector from a double3 vector by componentwise conversion. + /// double3 to convert to int3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3(double3 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + this.z = (int)v.z; + } + + + /// Implicitly converts a single int value to a int3 vector by assigning it to every component. + /// int to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int3(int v) { return new int3(v); } + + /// Explicitly converts a single bool value to a int3 vector by converting it to int and assigning it to every component. + /// bool to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3(bool v) { return new int3(v); } + + /// Explicitly converts a bool3 vector to a int3 vector by componentwise conversion. + /// bool3 to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3(bool3 v) { return new int3(v); } + + /// Explicitly converts a single uint value to a int3 vector by converting it to int and assigning it to every component. + /// uint to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3(uint v) { return new int3(v); } + + /// Explicitly converts a uint3 vector to a int3 vector by componentwise conversion. + /// uint3 to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3(uint3 v) { return new int3(v); } + + /// Explicitly converts a single float value to a int3 vector by converting it to int and assigning it to every component. + /// float to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3(float v) { return new int3(v); } + + /// Explicitly converts a float3 vector to a int3 vector by componentwise conversion. + /// float3 to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3(float3 v) { return new int3(v); } + + /// Explicitly converts a single double value to a int3 vector by converting it to int and assigning it to every component. + /// double to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3(double v) { return new int3(v); } + + /// Explicitly converts a double3 vector to a int3 vector by componentwise conversion. + /// double3 to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3(double3 v) { return new int3(v); } + + + /// Returns the result of a componentwise multiplication operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise multiplication. + /// Right hand side int3 to use to compute componentwise multiplication. + /// int3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator * (int3 lhs, int3 rhs) { return new int3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } + + /// Returns the result of a componentwise multiplication operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator * (int3 lhs, int rhs) { return new int3 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int3 to use to compute componentwise multiplication. + /// int3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator * (int lhs, int3 rhs) { return new int3 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); } + + + /// Returns the result of a componentwise addition operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise addition. + /// Right hand side int3 to use to compute componentwise addition. + /// int3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator + (int3 lhs, int3 rhs) { return new int3 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); } + + /// Returns the result of a componentwise addition operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator + (int3 lhs, int rhs) { return new int3 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int3 to use to compute componentwise addition. + /// int3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator + (int lhs, int3 rhs) { return new int3 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z); } + + + /// Returns the result of a componentwise subtraction operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise subtraction. + /// Right hand side int3 to use to compute componentwise subtraction. + /// int3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator - (int3 lhs, int3 rhs) { return new int3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); } + + /// Returns the result of a componentwise subtraction operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator - (int3 lhs, int rhs) { return new int3 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int3 to use to compute componentwise subtraction. + /// int3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator - (int lhs, int3 rhs) { return new int3 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z); } + + + /// Returns the result of a componentwise division operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise division. + /// Right hand side int3 to use to compute componentwise division. + /// int3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator / (int3 lhs, int3 rhs) { return new int3 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z); } + + /// Returns the result of a componentwise division operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator / (int3 lhs, int rhs) { return new int3 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int3 to use to compute componentwise division. + /// int3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator / (int lhs, int3 rhs) { return new int3 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z); } + + + /// Returns the result of a componentwise modulus operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise modulus. + /// Right hand side int3 to use to compute componentwise modulus. + /// int3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator % (int3 lhs, int3 rhs) { return new int3 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z); } + + /// Returns the result of a componentwise modulus operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator % (int3 lhs, int rhs) { return new int3 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int3 to use to compute componentwise modulus. + /// int3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator % (int lhs, int3 rhs) { return new int3 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z); } + + + /// Returns the result of a componentwise increment operation on an int3 vector. + /// Value to use when computing the componentwise increment. + /// int3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator ++ (int3 val) { return new int3 (++val.x, ++val.y, ++val.z); } + + + /// Returns the result of a componentwise decrement operation on an int3 vector. + /// Value to use when computing the componentwise decrement. + /// int3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator -- (int3 val) { return new int3 (--val.x, --val.y, --val.z); } + + + /// Returns the result of a componentwise less than operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise less than. + /// Right hand side int3 to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (int3 lhs, int3 rhs) { return new bool3 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z); } + + /// Returns the result of a componentwise less than operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (int3 lhs, int rhs) { return new bool3 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int3 to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (int lhs, int3 rhs) { return new bool3 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z); } + + + /// Returns the result of a componentwise less or equal operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise less or equal. + /// Right hand side int3 to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (int3 lhs, int3 rhs) { return new bool3 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z); } + + /// Returns the result of a componentwise less or equal operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (int3 lhs, int rhs) { return new bool3 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int3 to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (int lhs, int3 rhs) { return new bool3 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z); } + + + /// Returns the result of a componentwise greater than operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise greater than. + /// Right hand side int3 to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (int3 lhs, int3 rhs) { return new bool3 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z); } + + /// Returns the result of a componentwise greater than operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (int3 lhs, int rhs) { return new bool3 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int3 to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (int lhs, int3 rhs) { return new bool3 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z); } + + + /// Returns the result of a componentwise greater or equal operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise greater or equal. + /// Right hand side int3 to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (int3 lhs, int3 rhs) { return new bool3 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z); } + + /// Returns the result of a componentwise greater or equal operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (int3 lhs, int rhs) { return new bool3 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int3 to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (int lhs, int3 rhs) { return new bool3 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z); } + + + /// Returns the result of a componentwise unary minus operation on an int3 vector. + /// Value to use when computing the componentwise unary minus. + /// int3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator - (int3 val) { return new int3 (-val.x, -val.y, -val.z); } + + + /// Returns the result of a componentwise unary plus operation on an int3 vector. + /// Value to use when computing the componentwise unary plus. + /// int3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator + (int3 val) { return new int3 (+val.x, +val.y, +val.z); } + + + /// Returns the result of a componentwise left shift operation on an int3 vector by a number of bits specified by a single int. + /// The vector to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator << (int3 x, int n) { return new int3 (x.x << n, x.y << n, x.z << n); } + + /// Returns the result of a componentwise right shift operation on an int3 vector by a number of bits specified by a single int. + /// The vector to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator >> (int3 x, int n) { return new int3 (x.x >> n, x.y >> n, x.z >> n); } + + /// Returns the result of a componentwise equality operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise equality. + /// Right hand side int3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (int3 lhs, int3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); } + + /// Returns the result of a componentwise equality operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (int3 lhs, int rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (int lhs, int3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); } + + + /// Returns the result of a componentwise not equal operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise not equal. + /// Right hand side int3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (int3 lhs, int3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); } + + /// Returns the result of a componentwise not equal operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (int3 lhs, int rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (int lhs, int3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); } + + + /// Returns the result of a componentwise bitwise not operation on an int3 vector. + /// Value to use when computing the componentwise bitwise not. + /// int3 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator ~ (int3 val) { return new int3 (~val.x, ~val.y, ~val.z); } + + + /// Returns the result of a componentwise bitwise and operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise bitwise and. + /// Right hand side int3 to use to compute componentwise bitwise and. + /// int3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator & (int3 lhs, int3 rhs) { return new int3 (lhs.x & rhs.x, lhs.y & rhs.y, lhs.z & rhs.z); } + + /// Returns the result of a componentwise bitwise and operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator & (int3 lhs, int rhs) { return new int3 (lhs.x & rhs, lhs.y & rhs, lhs.z & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int3 to use to compute componentwise bitwise and. + /// int3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator & (int lhs, int3 rhs) { return new int3 (lhs & rhs.x, lhs & rhs.y, lhs & rhs.z); } + + + /// Returns the result of a componentwise bitwise or operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise bitwise or. + /// Right hand side int3 to use to compute componentwise bitwise or. + /// int3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator | (int3 lhs, int3 rhs) { return new int3 (lhs.x | rhs.x, lhs.y | rhs.y, lhs.z | rhs.z); } + + /// Returns the result of a componentwise bitwise or operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator | (int3 lhs, int rhs) { return new int3 (lhs.x | rhs, lhs.y | rhs, lhs.z | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int3 to use to compute componentwise bitwise or. + /// int3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator | (int lhs, int3 rhs) { return new int3 (lhs | rhs.x, lhs | rhs.y, lhs | rhs.z); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int3 vectors. + /// Left hand side int3 to use to compute componentwise bitwise exclusive or. + /// Right hand side int3 to use to compute componentwise bitwise exclusive or. + /// int3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator ^ (int3 lhs, int3 rhs) { return new int3 (lhs.x ^ rhs.x, lhs.y ^ rhs.y, lhs.z ^ rhs.z); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int3 vector and an int value. + /// Left hand side int3 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator ^ (int3 lhs, int rhs) { return new int3 (lhs.x ^ rhs, lhs.y ^ rhs, lhs.z ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int3 vector. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int3 to use to compute componentwise bitwise exclusive or. + /// int3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 operator ^ (int lhs, int3 rhs) { return new int3 (lhs ^ rhs.x, lhs ^ rhs.y, lhs ^ rhs.z); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(z, z); } + } + + + + /// Returns the int element at a specified index. + unsafe public int this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (int3* array = &this) { return ((int*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (int* array = &x) { array[index] = value; } + } + } + + /// Returns true if the int3 is equal to a given int3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } + + /// Returns true if the int3 is equal to a given int3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int3 converted && Equals(converted); } + + + /// Returns a hash code for the int3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int3({0}, {1}, {2})", x, y, z); + } + + /// Returns a string representation of the int3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int3({0}, {1}, {2})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public int x; + public int y; + public int z; + public DebuggerProxy(int3 v) + { + x = v.x; + y = v.y; + z = v.z; + } + } + + } + + public static partial class math + { + /// Returns a int3 vector constructed from three int values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// int3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(int x, int y, int z) { return new int3(x, y, z); } + + /// Returns a int3 vector constructed from an int value and an int2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// int3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(int x, int2 yz) { return new int3(x, yz); } + + /// Returns a int3 vector constructed from an int2 vector and an int value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// int3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(int2 xy, int z) { return new int3(xy, z); } + + /// Returns a int3 vector constructed from an int3 vector. + /// The constructed vector's xyz components will be set to this value. + /// int3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(int3 xyz) { return new int3(xyz); } + + /// Returns a int3 vector constructed from a single int value by assigning it to every component. + /// int to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(int v) { return new int3(v); } + + /// Returns a int3 vector constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(bool v) { return new int3(v); } + + /// Return a int3 vector constructed from a bool3 vector by componentwise conversion. + /// bool3 to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(bool3 v) { return new int3(v); } + + /// Returns a int3 vector constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(uint v) { return new int3(v); } + + /// Return a int3 vector constructed from a uint3 vector by componentwise conversion. + /// uint3 to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(uint3 v) { return new int3(v); } + + /// Returns a int3 vector constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(float v) { return new int3(v); } + + /// Return a int3 vector constructed from a float3 vector by componentwise conversion. + /// float3 to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(float3 v) { return new int3(v); } + + /// Returns a int3 vector constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(double v) { return new int3(v); } + + /// Return a int3 vector constructed from a double3 vector by componentwise conversion. + /// double3 to convert to int3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 int3(double3 v) { return new int3(v); } + + /// Returns a uint hash code of a int3 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int3 v) + { + return csum(asuint(v) * uint3(0x4C7F6DD1u, 0x4822A3E9u, 0xAAC3C25Du)) + 0xD21D0945u; + } + + /// + /// Returns a uint3 vector hash code of a int3 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(int3 v) + { + return (asuint(v) * uint3(0x88FCAB2Du, 0x614DA60Du, 0x5BA2C50Bu)) + 0x8C455ACBu; + } + + /// Returns the result of specified shuffling of the components from two int3 vectors into an int value. + /// int3 to use as the left argument of the shuffle operation. + /// int3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int. + /// int result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int shuffle(int3 left, int3 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two int3 vectors into an int2 vector. + /// int3 to use as the left argument of the shuffle operation. + /// int3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int2 x component. + /// The ShuffleComponent to use when setting the resulting int2 y component. + /// int2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 shuffle(int3 left, int3 right, ShuffleComponent x, ShuffleComponent y) + { + return int2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two int3 vectors into an int3 vector. + /// int3 to use as the left argument of the shuffle operation. + /// int3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int3 x component. + /// The ShuffleComponent to use when setting the resulting int3 y component. + /// The ShuffleComponent to use when setting the resulting int3 z component. + /// int3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 shuffle(int3 left, int3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return int3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two int3 vectors into an int4 vector. + /// int3 to use as the left argument of the shuffle operation. + /// int3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int4 x component. + /// The ShuffleComponent to use when setting the resulting int4 y component. + /// The ShuffleComponent to use when setting the resulting int4 z component. + /// The ShuffleComponent to use when setting the resulting int4 w component. + /// int4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 shuffle(int3 left, int3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return int4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int select_shuffle_component(int3 a, int3 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int3x2.gen.cs b/ThirdParty/Unity.Mathematics/int3x2.gen.cs new file mode 100644 index 0000000..894901b --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int3x2.gen.cs @@ -0,0 +1,719 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x2 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int3x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int3 c0; + /// Column 1 of the matrix. + public int3 c1; + + /// int3x2 zero value. + public static readonly int3x2 zero; + + /// Constructs a int3x2 matrix from two int3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(int3 c0, int3 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a int3x2 matrix from 6 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(int m00, int m01, + int m10, int m11, + int m20, int m21) + { + this.c0 = new int3(m00, m10, m20); + this.c1 = new int3(m01, m11, m21); + } + + /// Constructs a int3x2 matrix from a single int value by assigning it to every component. + /// int to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a int3x2 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(bool v) + { + this.c0 = math.select(new int3(0), new int3(1), v); + this.c1 = math.select(new int3(0), new int3(1), v); + } + + /// Constructs a int3x2 matrix from a bool3x2 matrix by componentwise conversion. + /// bool3x2 to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(bool3x2 v) + { + this.c0 = math.select(new int3(0), new int3(1), v.c0); + this.c1 = math.select(new int3(0), new int3(1), v.c1); + } + + /// Constructs a int3x2 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(uint v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + } + + /// Constructs a int3x2 matrix from a uint3x2 matrix by componentwise conversion. + /// uint3x2 to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(uint3x2 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + } + + /// Constructs a int3x2 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(float v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + } + + /// Constructs a int3x2 matrix from a float3x2 matrix by componentwise conversion. + /// float3x2 to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(float3x2 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + } + + /// Constructs a int3x2 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(double v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + } + + /// Constructs a int3x2 matrix from a double3x2 matrix by componentwise conversion. + /// double3x2 to convert to int3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x2(double3x2 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + } + + + /// Implicitly converts a single int value to a int3x2 matrix by assigning it to every component. + /// int to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int3x2(int v) { return new int3x2(v); } + + /// Explicitly converts a single bool value to a int3x2 matrix by converting it to int and assigning it to every component. + /// bool to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x2(bool v) { return new int3x2(v); } + + /// Explicitly converts a bool3x2 matrix to a int3x2 matrix by componentwise conversion. + /// bool3x2 to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x2(bool3x2 v) { return new int3x2(v); } + + /// Explicitly converts a single uint value to a int3x2 matrix by converting it to int and assigning it to every component. + /// uint to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x2(uint v) { return new int3x2(v); } + + /// Explicitly converts a uint3x2 matrix to a int3x2 matrix by componentwise conversion. + /// uint3x2 to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x2(uint3x2 v) { return new int3x2(v); } + + /// Explicitly converts a single float value to a int3x2 matrix by converting it to int and assigning it to every component. + /// float to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x2(float v) { return new int3x2(v); } + + /// Explicitly converts a float3x2 matrix to a int3x2 matrix by componentwise conversion. + /// float3x2 to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x2(float3x2 v) { return new int3x2(v); } + + /// Explicitly converts a single double value to a int3x2 matrix by converting it to int and assigning it to every component. + /// double to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x2(double v) { return new int3x2(v); } + + /// Explicitly converts a double3x2 matrix to a int3x2 matrix by componentwise conversion. + /// double3x2 to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x2(double3x2 v) { return new int3x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise multiplication. + /// Right hand side int3x2 to use to compute componentwise multiplication. + /// int3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator * (int3x2 lhs, int3x2 rhs) { return new int3x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator * (int3x2 lhs, int rhs) { return new int3x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int3x2 to use to compute componentwise multiplication. + /// int3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator * (int lhs, int3x2 rhs) { return new int3x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise addition. + /// Right hand side int3x2 to use to compute componentwise addition. + /// int3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator + (int3x2 lhs, int3x2 rhs) { return new int3x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator + (int3x2 lhs, int rhs) { return new int3x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int3x2 to use to compute componentwise addition. + /// int3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator + (int lhs, int3x2 rhs) { return new int3x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise subtraction. + /// Right hand side int3x2 to use to compute componentwise subtraction. + /// int3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator - (int3x2 lhs, int3x2 rhs) { return new int3x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator - (int3x2 lhs, int rhs) { return new int3x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int3x2 to use to compute componentwise subtraction. + /// int3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator - (int lhs, int3x2 rhs) { return new int3x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise division. + /// Right hand side int3x2 to use to compute componentwise division. + /// int3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator / (int3x2 lhs, int3x2 rhs) { return new int3x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator / (int3x2 lhs, int rhs) { return new int3x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int3x2 to use to compute componentwise division. + /// int3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator / (int lhs, int3x2 rhs) { return new int3x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise modulus. + /// Right hand side int3x2 to use to compute componentwise modulus. + /// int3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator % (int3x2 lhs, int3x2 rhs) { return new int3x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator % (int3x2 lhs, int rhs) { return new int3x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int3x2 to use to compute componentwise modulus. + /// int3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator % (int lhs, int3x2 rhs) { return new int3x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on an int3x2 matrix. + /// Value to use when computing the componentwise increment. + /// int3x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator ++ (int3x2 val) { return new int3x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on an int3x2 matrix. + /// Value to use when computing the componentwise decrement. + /// int3x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator -- (int3x2 val) { return new int3x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise less than. + /// Right hand side int3x2 to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (int3x2 lhs, int3x2 rhs) { return new bool3x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (int3x2 lhs, int rhs) { return new bool3x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int3x2 to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (int lhs, int3x2 rhs) { return new bool3x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise less or equal. + /// Right hand side int3x2 to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (int3x2 lhs, int3x2 rhs) { return new bool3x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (int3x2 lhs, int rhs) { return new bool3x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int3x2 to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (int lhs, int3x2 rhs) { return new bool3x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise greater than. + /// Right hand side int3x2 to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (int3x2 lhs, int3x2 rhs) { return new bool3x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (int3x2 lhs, int rhs) { return new bool3x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int3x2 to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (int lhs, int3x2 rhs) { return new bool3x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise greater or equal. + /// Right hand side int3x2 to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (int3x2 lhs, int3x2 rhs) { return new bool3x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (int3x2 lhs, int rhs) { return new bool3x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int3x2 to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (int lhs, int3x2 rhs) { return new bool3x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on an int3x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// int3x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator - (int3x2 val) { return new int3x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on an int3x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// int3x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator + (int3x2 val) { return new int3x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise left shift operation on an int3x2 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator << (int3x2 x, int n) { return new int3x2 (x.c0 << n, x.c1 << n); } + + /// Returns the result of a componentwise right shift operation on an int3x2 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator >> (int3x2 x, int n) { return new int3x2 (x.c0 >> n, x.c1 >> n); } + + /// Returns the result of a componentwise equality operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise equality. + /// Right hand side int3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (int3x2 lhs, int3x2 rhs) { return new bool3x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (int3x2 lhs, int rhs) { return new bool3x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (int lhs, int3x2 rhs) { return new bool3x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise not equal. + /// Right hand side int3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (int3x2 lhs, int3x2 rhs) { return new bool3x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (int3x2 lhs, int rhs) { return new bool3x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (int lhs, int3x2 rhs) { return new bool3x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise bitwise not operation on an int3x2 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int3x2 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator ~ (int3x2 val) { return new int3x2 (~val.c0, ~val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise bitwise and. + /// Right hand side int3x2 to use to compute componentwise bitwise and. + /// int3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator & (int3x2 lhs, int3x2 rhs) { return new int3x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator & (int3x2 lhs, int rhs) { return new int3x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int3x2 to use to compute componentwise bitwise and. + /// int3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator & (int lhs, int3x2 rhs) { return new int3x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise bitwise or. + /// Right hand side int3x2 to use to compute componentwise bitwise or. + /// int3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator | (int3x2 lhs, int3x2 rhs) { return new int3x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator | (int3x2 lhs, int rhs) { return new int3x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int3x2 to use to compute componentwise bitwise or. + /// int3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator | (int lhs, int3x2 rhs) { return new int3x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int3x2 matrices. + /// Left hand side int3x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side int3x2 to use to compute componentwise bitwise exclusive or. + /// int3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator ^ (int3x2 lhs, int3x2 rhs) { return new int3x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int3x2 matrix and an int value. + /// Left hand side int3x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator ^ (int3x2 lhs, int rhs) { return new int3x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int3x2 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int3x2 to use to compute componentwise bitwise exclusive or. + /// int3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 operator ^ (int lhs, int3x2 rhs) { return new int3x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the int3 element at a specified index. + unsafe public ref int3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (int3x2* array = &this) { return ref ((int3*)array)[index]; } + } + } + + /// Returns true if the int3x2 is equal to a given int3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int3x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the int3x2 is equal to a given int3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int3x2 converted && Equals(converted); } + + + /// Returns a hash code for the int3x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int3x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int3x2({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z); + } + + /// Returns a string representation of the int3x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int3x2({0}, {1}, {2}, {3}, {4}, {5})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int3x2 matrix constructed from two int3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// int3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(int3 c0, int3 c1) { return new int3x2(c0, c1); } + + /// Returns a int3x2 matrix constructed from from 6 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// int3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(int m00, int m01, + int m10, int m11, + int m20, int m21) + { + return new int3x2(m00, m01, + m10, m11, + m20, m21); + } + + /// Returns a int3x2 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(int v) { return new int3x2(v); } + + /// Returns a int3x2 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(bool v) { return new int3x2(v); } + + /// Return a int3x2 matrix constructed from a bool3x2 matrix by componentwise conversion. + /// bool3x2 to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(bool3x2 v) { return new int3x2(v); } + + /// Returns a int3x2 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(uint v) { return new int3x2(v); } + + /// Return a int3x2 matrix constructed from a uint3x2 matrix by componentwise conversion. + /// uint3x2 to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(uint3x2 v) { return new int3x2(v); } + + /// Returns a int3x2 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(float v) { return new int3x2(v); } + + /// Return a int3x2 matrix constructed from a float3x2 matrix by componentwise conversion. + /// float3x2 to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(float3x2 v) { return new int3x2(v); } + + /// Returns a int3x2 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(double v) { return new int3x2(v); } + + /// Return a int3x2 matrix constructed from a double3x2 matrix by componentwise conversion. + /// double3x2 to convert to int3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 int3x2(double3x2 v) { return new int3x2(v); } + + /// Return the int2x3 transpose of a int3x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 transpose(int3x2 v) + { + return int2x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z); + } + + /// Returns a uint hash code of a int3x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int3x2 v) + { + return csum(asuint(v.c0) * uint3(0xDB3DE101u, 0x7B6D1B4Bu, 0x58399E77u) + + asuint(v.c1) * uint3(0x5EAC29C9u, 0xFC6014F9u, 0x6BF6693Fu)) + 0x9D1B1D9Bu; + } + + /// + /// Returns a uint3 vector hash code of a int3x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(int3x2 v) + { + return (asuint(v.c0) * uint3(0xF842F5C1u, 0xA47EC335u, 0xA477DF57u) + + asuint(v.c1) * uint3(0xC4B1493Fu, 0xBA0966D3u, 0xAFBEE253u)) + 0x5B419C01u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int3x3.gen.cs b/ThirdParty/Unity.Mathematics/int3x3.gen.cs new file mode 100644 index 0000000..e4c27e5 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int3x3.gen.cs @@ -0,0 +1,763 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x3 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int3x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int3 c0; + /// Column 1 of the matrix. + public int3 c1; + /// Column 2 of the matrix. + public int3 c2; + + /// int3x3 identity transform. + public static readonly int3x3 identity = new int3x3(1, 0, 0, 0, 1, 0, 0, 0, 1); + + /// int3x3 zero value. + public static readonly int3x3 zero; + + /// Constructs a int3x3 matrix from three int3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(int3 c0, int3 c1, int3 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a int3x3 matrix from 9 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(int m00, int m01, int m02, + int m10, int m11, int m12, + int m20, int m21, int m22) + { + this.c0 = new int3(m00, m10, m20); + this.c1 = new int3(m01, m11, m21); + this.c2 = new int3(m02, m12, m22); + } + + /// Constructs a int3x3 matrix from a single int value by assigning it to every component. + /// int to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a int3x3 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(bool v) + { + this.c0 = math.select(new int3(0), new int3(1), v); + this.c1 = math.select(new int3(0), new int3(1), v); + this.c2 = math.select(new int3(0), new int3(1), v); + } + + /// Constructs a int3x3 matrix from a bool3x3 matrix by componentwise conversion. + /// bool3x3 to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(bool3x3 v) + { + this.c0 = math.select(new int3(0), new int3(1), v.c0); + this.c1 = math.select(new int3(0), new int3(1), v.c1); + this.c2 = math.select(new int3(0), new int3(1), v.c2); + } + + /// Constructs a int3x3 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(uint v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + this.c2 = (int3)v; + } + + /// Constructs a int3x3 matrix from a uint3x3 matrix by componentwise conversion. + /// uint3x3 to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(uint3x3 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + this.c2 = (int3)v.c2; + } + + /// Constructs a int3x3 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(float v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + this.c2 = (int3)v; + } + + /// Constructs a int3x3 matrix from a float3x3 matrix by componentwise conversion. + /// float3x3 to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(float3x3 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + this.c2 = (int3)v.c2; + } + + /// Constructs a int3x3 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(double v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + this.c2 = (int3)v; + } + + /// Constructs a int3x3 matrix from a double3x3 matrix by componentwise conversion. + /// double3x3 to convert to int3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x3(double3x3 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + this.c2 = (int3)v.c2; + } + + + /// Implicitly converts a single int value to a int3x3 matrix by assigning it to every component. + /// int to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int3x3(int v) { return new int3x3(v); } + + /// Explicitly converts a single bool value to a int3x3 matrix by converting it to int and assigning it to every component. + /// bool to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x3(bool v) { return new int3x3(v); } + + /// Explicitly converts a bool3x3 matrix to a int3x3 matrix by componentwise conversion. + /// bool3x3 to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x3(bool3x3 v) { return new int3x3(v); } + + /// Explicitly converts a single uint value to a int3x3 matrix by converting it to int and assigning it to every component. + /// uint to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x3(uint v) { return new int3x3(v); } + + /// Explicitly converts a uint3x3 matrix to a int3x3 matrix by componentwise conversion. + /// uint3x3 to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x3(uint3x3 v) { return new int3x3(v); } + + /// Explicitly converts a single float value to a int3x3 matrix by converting it to int and assigning it to every component. + /// float to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x3(float v) { return new int3x3(v); } + + /// Explicitly converts a float3x3 matrix to a int3x3 matrix by componentwise conversion. + /// float3x3 to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x3(float3x3 v) { return new int3x3(v); } + + /// Explicitly converts a single double value to a int3x3 matrix by converting it to int and assigning it to every component. + /// double to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x3(double v) { return new int3x3(v); } + + /// Explicitly converts a double3x3 matrix to a int3x3 matrix by componentwise conversion. + /// double3x3 to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x3(double3x3 v) { return new int3x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise multiplication. + /// Right hand side int3x3 to use to compute componentwise multiplication. + /// int3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator * (int3x3 lhs, int3x3 rhs) { return new int3x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator * (int3x3 lhs, int rhs) { return new int3x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int3x3 to use to compute componentwise multiplication. + /// int3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator * (int lhs, int3x3 rhs) { return new int3x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise addition. + /// Right hand side int3x3 to use to compute componentwise addition. + /// int3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator + (int3x3 lhs, int3x3 rhs) { return new int3x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator + (int3x3 lhs, int rhs) { return new int3x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int3x3 to use to compute componentwise addition. + /// int3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator + (int lhs, int3x3 rhs) { return new int3x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise subtraction. + /// Right hand side int3x3 to use to compute componentwise subtraction. + /// int3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator - (int3x3 lhs, int3x3 rhs) { return new int3x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator - (int3x3 lhs, int rhs) { return new int3x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int3x3 to use to compute componentwise subtraction. + /// int3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator - (int lhs, int3x3 rhs) { return new int3x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise division. + /// Right hand side int3x3 to use to compute componentwise division. + /// int3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator / (int3x3 lhs, int3x3 rhs) { return new int3x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator / (int3x3 lhs, int rhs) { return new int3x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int3x3 to use to compute componentwise division. + /// int3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator / (int lhs, int3x3 rhs) { return new int3x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise modulus. + /// Right hand side int3x3 to use to compute componentwise modulus. + /// int3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator % (int3x3 lhs, int3x3 rhs) { return new int3x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator % (int3x3 lhs, int rhs) { return new int3x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int3x3 to use to compute componentwise modulus. + /// int3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator % (int lhs, int3x3 rhs) { return new int3x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on an int3x3 matrix. + /// Value to use when computing the componentwise increment. + /// int3x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator ++ (int3x3 val) { return new int3x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on an int3x3 matrix. + /// Value to use when computing the componentwise decrement. + /// int3x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator -- (int3x3 val) { return new int3x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise less than. + /// Right hand side int3x3 to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (int3x3 lhs, int3x3 rhs) { return new bool3x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (int3x3 lhs, int rhs) { return new bool3x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int3x3 to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (int lhs, int3x3 rhs) { return new bool3x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise less or equal. + /// Right hand side int3x3 to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (int3x3 lhs, int3x3 rhs) { return new bool3x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (int3x3 lhs, int rhs) { return new bool3x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int3x3 to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (int lhs, int3x3 rhs) { return new bool3x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise greater than. + /// Right hand side int3x3 to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (int3x3 lhs, int3x3 rhs) { return new bool3x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (int3x3 lhs, int rhs) { return new bool3x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int3x3 to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (int lhs, int3x3 rhs) { return new bool3x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise greater or equal. + /// Right hand side int3x3 to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (int3x3 lhs, int3x3 rhs) { return new bool3x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (int3x3 lhs, int rhs) { return new bool3x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int3x3 to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (int lhs, int3x3 rhs) { return new bool3x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on an int3x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// int3x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator - (int3x3 val) { return new int3x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on an int3x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// int3x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator + (int3x3 val) { return new int3x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise left shift operation on an int3x3 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator << (int3x3 x, int n) { return new int3x3 (x.c0 << n, x.c1 << n, x.c2 << n); } + + /// Returns the result of a componentwise right shift operation on an int3x3 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator >> (int3x3 x, int n) { return new int3x3 (x.c0 >> n, x.c1 >> n, x.c2 >> n); } + + /// Returns the result of a componentwise equality operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise equality. + /// Right hand side int3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (int3x3 lhs, int3x3 rhs) { return new bool3x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (int3x3 lhs, int rhs) { return new bool3x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (int lhs, int3x3 rhs) { return new bool3x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise not equal. + /// Right hand side int3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (int3x3 lhs, int3x3 rhs) { return new bool3x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (int3x3 lhs, int rhs) { return new bool3x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (int lhs, int3x3 rhs) { return new bool3x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise bitwise not operation on an int3x3 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int3x3 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator ~ (int3x3 val) { return new int3x3 (~val.c0, ~val.c1, ~val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise bitwise and. + /// Right hand side int3x3 to use to compute componentwise bitwise and. + /// int3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator & (int3x3 lhs, int3x3 rhs) { return new int3x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator & (int3x3 lhs, int rhs) { return new int3x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int3x3 to use to compute componentwise bitwise and. + /// int3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator & (int lhs, int3x3 rhs) { return new int3x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise bitwise or. + /// Right hand side int3x3 to use to compute componentwise bitwise or. + /// int3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator | (int3x3 lhs, int3x3 rhs) { return new int3x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator | (int3x3 lhs, int rhs) { return new int3x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int3x3 to use to compute componentwise bitwise or. + /// int3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator | (int lhs, int3x3 rhs) { return new int3x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int3x3 matrices. + /// Left hand side int3x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side int3x3 to use to compute componentwise bitwise exclusive or. + /// int3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator ^ (int3x3 lhs, int3x3 rhs) { return new int3x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int3x3 matrix and an int value. + /// Left hand side int3x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator ^ (int3x3 lhs, int rhs) { return new int3x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int3x3 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int3x3 to use to compute componentwise bitwise exclusive or. + /// int3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 operator ^ (int lhs, int3x3 rhs) { return new int3x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the int3 element at a specified index. + unsafe public ref int3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (int3x3* array = &this) { return ref ((int3*)array)[index]; } + } + } + + /// Returns true if the int3x3 is equal to a given int3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int3x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the int3x3 is equal to a given int3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int3x3 converted && Equals(converted); } + + + /// Returns a hash code for the int3x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int3x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int3x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z); + } + + /// Returns a string representation of the int3x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int3x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int3x3 matrix constructed from three int3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// int3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(int3 c0, int3 c1, int3 c2) { return new int3x3(c0, c1, c2); } + + /// Returns a int3x3 matrix constructed from from 9 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// int3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(int m00, int m01, int m02, + int m10, int m11, int m12, + int m20, int m21, int m22) + { + return new int3x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22); + } + + /// Returns a int3x3 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(int v) { return new int3x3(v); } + + /// Returns a int3x3 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(bool v) { return new int3x3(v); } + + /// Return a int3x3 matrix constructed from a bool3x3 matrix by componentwise conversion. + /// bool3x3 to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(bool3x3 v) { return new int3x3(v); } + + /// Returns a int3x3 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(uint v) { return new int3x3(v); } + + /// Return a int3x3 matrix constructed from a uint3x3 matrix by componentwise conversion. + /// uint3x3 to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(uint3x3 v) { return new int3x3(v); } + + /// Returns a int3x3 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(float v) { return new int3x3(v); } + + /// Return a int3x3 matrix constructed from a float3x3 matrix by componentwise conversion. + /// float3x3 to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(float3x3 v) { return new int3x3(v); } + + /// Returns a int3x3 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(double v) { return new int3x3(v); } + + /// Return a int3x3 matrix constructed from a double3x3 matrix by componentwise conversion. + /// double3x3 to convert to int3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 int3x3(double3x3 v) { return new int3x3(v); } + + /// Return the int3x3 transpose of a int3x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 transpose(int3x3 v) + { + return int3x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z); + } + + /// Returns the determinant of a int3x3 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int determinant(int3x3 m) + { + int3 c0 = m.c0; + int3 c1 = m.c1; + int3 c2 = m.c2; + + int m00 = c1.y * c2.z - c1.z * c2.y; + int m01 = c0.y * c2.z - c0.z * c2.y; + int m02 = c0.y * c1.z - c0.z * c1.y; + + return c0.x * m00 - c1.x * m01 + c2.x * m02; + } + + /// Returns a uint hash code of a int3x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int3x3 v) + { + return csum(asuint(v.c0) * uint3(0x93C30C2Bu, 0xDCAF0351u, 0x6E050B01u) + + asuint(v.c1) * uint3(0x750FDBF5u, 0x7F3DD499u, 0x52EAAEBBu) + + asuint(v.c2) * uint3(0x4599C793u, 0x83B5E729u, 0xC267163Fu)) + 0x67BC9149u; + } + + /// + /// Returns a uint3 vector hash code of a int3x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(int3x3 v) + { + return (asuint(v.c0) * uint3(0xAD7C5EC1u, 0x822A7D6Du, 0xB492BF15u) + + asuint(v.c1) * uint3(0xD37220E3u, 0x7AA2C2BDu, 0xE16BC89Du) + + asuint(v.c2) * uint3(0x7AA07CD3u, 0xAF642BA9u, 0xA8F2213Bu)) + 0x9F3FDC37u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int3x4.gen.cs b/ThirdParty/Unity.Mathematics/int3x4.gen.cs new file mode 100644 index 0000000..99a96e6 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int3x4.gen.cs @@ -0,0 +1,767 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x4 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int3x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int3 c0; + /// Column 1 of the matrix. + public int3 c1; + /// Column 2 of the matrix. + public int3 c2; + /// Column 3 of the matrix. + public int3 c3; + + /// int3x4 zero value. + public static readonly int3x4 zero; + + /// Constructs a int3x4 matrix from four int3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(int3 c0, int3 c1, int3 c2, int3 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a int3x4 matrix from 12 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(int m00, int m01, int m02, int m03, + int m10, int m11, int m12, int m13, + int m20, int m21, int m22, int m23) + { + this.c0 = new int3(m00, m10, m20); + this.c1 = new int3(m01, m11, m21); + this.c2 = new int3(m02, m12, m22); + this.c3 = new int3(m03, m13, m23); + } + + /// Constructs a int3x4 matrix from a single int value by assigning it to every component. + /// int to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a int3x4 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(bool v) + { + this.c0 = math.select(new int3(0), new int3(1), v); + this.c1 = math.select(new int3(0), new int3(1), v); + this.c2 = math.select(new int3(0), new int3(1), v); + this.c3 = math.select(new int3(0), new int3(1), v); + } + + /// Constructs a int3x4 matrix from a bool3x4 matrix by componentwise conversion. + /// bool3x4 to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(bool3x4 v) + { + this.c0 = math.select(new int3(0), new int3(1), v.c0); + this.c1 = math.select(new int3(0), new int3(1), v.c1); + this.c2 = math.select(new int3(0), new int3(1), v.c2); + this.c3 = math.select(new int3(0), new int3(1), v.c3); + } + + /// Constructs a int3x4 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(uint v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + this.c2 = (int3)v; + this.c3 = (int3)v; + } + + /// Constructs a int3x4 matrix from a uint3x4 matrix by componentwise conversion. + /// uint3x4 to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(uint3x4 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + this.c2 = (int3)v.c2; + this.c3 = (int3)v.c3; + } + + /// Constructs a int3x4 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(float v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + this.c2 = (int3)v; + this.c3 = (int3)v; + } + + /// Constructs a int3x4 matrix from a float3x4 matrix by componentwise conversion. + /// float3x4 to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(float3x4 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + this.c2 = (int3)v.c2; + this.c3 = (int3)v.c3; + } + + /// Constructs a int3x4 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(double v) + { + this.c0 = (int3)v; + this.c1 = (int3)v; + this.c2 = (int3)v; + this.c3 = (int3)v; + } + + /// Constructs a int3x4 matrix from a double3x4 matrix by componentwise conversion. + /// double3x4 to convert to int3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3x4(double3x4 v) + { + this.c0 = (int3)v.c0; + this.c1 = (int3)v.c1; + this.c2 = (int3)v.c2; + this.c3 = (int3)v.c3; + } + + + /// Implicitly converts a single int value to a int3x4 matrix by assigning it to every component. + /// int to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int3x4(int v) { return new int3x4(v); } + + /// Explicitly converts a single bool value to a int3x4 matrix by converting it to int and assigning it to every component. + /// bool to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x4(bool v) { return new int3x4(v); } + + /// Explicitly converts a bool3x4 matrix to a int3x4 matrix by componentwise conversion. + /// bool3x4 to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x4(bool3x4 v) { return new int3x4(v); } + + /// Explicitly converts a single uint value to a int3x4 matrix by converting it to int and assigning it to every component. + /// uint to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x4(uint v) { return new int3x4(v); } + + /// Explicitly converts a uint3x4 matrix to a int3x4 matrix by componentwise conversion. + /// uint3x4 to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x4(uint3x4 v) { return new int3x4(v); } + + /// Explicitly converts a single float value to a int3x4 matrix by converting it to int and assigning it to every component. + /// float to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x4(float v) { return new int3x4(v); } + + /// Explicitly converts a float3x4 matrix to a int3x4 matrix by componentwise conversion. + /// float3x4 to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x4(float3x4 v) { return new int3x4(v); } + + /// Explicitly converts a single double value to a int3x4 matrix by converting it to int and assigning it to every component. + /// double to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x4(double v) { return new int3x4(v); } + + /// Explicitly converts a double3x4 matrix to a int3x4 matrix by componentwise conversion. + /// double3x4 to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int3x4(double3x4 v) { return new int3x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise multiplication. + /// Right hand side int3x4 to use to compute componentwise multiplication. + /// int3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator * (int3x4 lhs, int3x4 rhs) { return new int3x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator * (int3x4 lhs, int rhs) { return new int3x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int3x4 to use to compute componentwise multiplication. + /// int3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator * (int lhs, int3x4 rhs) { return new int3x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise addition. + /// Right hand side int3x4 to use to compute componentwise addition. + /// int3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator + (int3x4 lhs, int3x4 rhs) { return new int3x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator + (int3x4 lhs, int rhs) { return new int3x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int3x4 to use to compute componentwise addition. + /// int3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator + (int lhs, int3x4 rhs) { return new int3x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise subtraction. + /// Right hand side int3x4 to use to compute componentwise subtraction. + /// int3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator - (int3x4 lhs, int3x4 rhs) { return new int3x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator - (int3x4 lhs, int rhs) { return new int3x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int3x4 to use to compute componentwise subtraction. + /// int3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator - (int lhs, int3x4 rhs) { return new int3x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise division. + /// Right hand side int3x4 to use to compute componentwise division. + /// int3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator / (int3x4 lhs, int3x4 rhs) { return new int3x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator / (int3x4 lhs, int rhs) { return new int3x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int3x4 to use to compute componentwise division. + /// int3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator / (int lhs, int3x4 rhs) { return new int3x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise modulus. + /// Right hand side int3x4 to use to compute componentwise modulus. + /// int3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator % (int3x4 lhs, int3x4 rhs) { return new int3x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator % (int3x4 lhs, int rhs) { return new int3x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int3x4 to use to compute componentwise modulus. + /// int3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator % (int lhs, int3x4 rhs) { return new int3x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on an int3x4 matrix. + /// Value to use when computing the componentwise increment. + /// int3x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator ++ (int3x4 val) { return new int3x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on an int3x4 matrix. + /// Value to use when computing the componentwise decrement. + /// int3x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator -- (int3x4 val) { return new int3x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise less than. + /// Right hand side int3x4 to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (int3x4 lhs, int3x4 rhs) { return new bool3x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (int3x4 lhs, int rhs) { return new bool3x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int3x4 to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (int lhs, int3x4 rhs) { return new bool3x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise less or equal. + /// Right hand side int3x4 to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (int3x4 lhs, int3x4 rhs) { return new bool3x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (int3x4 lhs, int rhs) { return new bool3x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int3x4 to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (int lhs, int3x4 rhs) { return new bool3x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise greater than. + /// Right hand side int3x4 to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (int3x4 lhs, int3x4 rhs) { return new bool3x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (int3x4 lhs, int rhs) { return new bool3x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int3x4 to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (int lhs, int3x4 rhs) { return new bool3x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise greater or equal. + /// Right hand side int3x4 to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (int3x4 lhs, int3x4 rhs) { return new bool3x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (int3x4 lhs, int rhs) { return new bool3x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int3x4 to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (int lhs, int3x4 rhs) { return new bool3x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on an int3x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// int3x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator - (int3x4 val) { return new int3x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on an int3x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// int3x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator + (int3x4 val) { return new int3x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise left shift operation on an int3x4 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator << (int3x4 x, int n) { return new int3x4 (x.c0 << n, x.c1 << n, x.c2 << n, x.c3 << n); } + + /// Returns the result of a componentwise right shift operation on an int3x4 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator >> (int3x4 x, int n) { return new int3x4 (x.c0 >> n, x.c1 >> n, x.c2 >> n, x.c3 >> n); } + + /// Returns the result of a componentwise equality operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise equality. + /// Right hand side int3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (int3x4 lhs, int3x4 rhs) { return new bool3x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (int3x4 lhs, int rhs) { return new bool3x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (int lhs, int3x4 rhs) { return new bool3x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise not equal. + /// Right hand side int3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (int3x4 lhs, int3x4 rhs) { return new bool3x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (int3x4 lhs, int rhs) { return new bool3x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (int lhs, int3x4 rhs) { return new bool3x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise bitwise not operation on an int3x4 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int3x4 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator ~ (int3x4 val) { return new int3x4 (~val.c0, ~val.c1, ~val.c2, ~val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise bitwise and. + /// Right hand side int3x4 to use to compute componentwise bitwise and. + /// int3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator & (int3x4 lhs, int3x4 rhs) { return new int3x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator & (int3x4 lhs, int rhs) { return new int3x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int3x4 to use to compute componentwise bitwise and. + /// int3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator & (int lhs, int3x4 rhs) { return new int3x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise bitwise or. + /// Right hand side int3x4 to use to compute componentwise bitwise or. + /// int3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator | (int3x4 lhs, int3x4 rhs) { return new int3x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator | (int3x4 lhs, int rhs) { return new int3x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int3x4 to use to compute componentwise bitwise or. + /// int3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator | (int lhs, int3x4 rhs) { return new int3x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int3x4 matrices. + /// Left hand side int3x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side int3x4 to use to compute componentwise bitwise exclusive or. + /// int3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator ^ (int3x4 lhs, int3x4 rhs) { return new int3x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int3x4 matrix and an int value. + /// Left hand side int3x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator ^ (int3x4 lhs, int rhs) { return new int3x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int3x4 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int3x4 to use to compute componentwise bitwise exclusive or. + /// int3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 operator ^ (int lhs, int3x4 rhs) { return new int3x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the int3 element at a specified index. + unsafe public ref int3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (int3x4* array = &this) { return ref ((int3*)array)[index]; } + } + } + + /// Returns true if the int3x4 is equal to a given int3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int3x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the int3x4 is equal to a given int3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int3x4 converted && Equals(converted); } + + + /// Returns a hash code for the int3x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int3x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int3x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z); + } + + /// Returns a string representation of the int3x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int3x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c3.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int3x4 matrix constructed from four int3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// int3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(int3 c0, int3 c1, int3 c2, int3 c3) { return new int3x4(c0, c1, c2, c3); } + + /// Returns a int3x4 matrix constructed from from 12 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// int3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(int m00, int m01, int m02, int m03, + int m10, int m11, int m12, int m13, + int m20, int m21, int m22, int m23) + { + return new int3x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23); + } + + /// Returns a int3x4 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(int v) { return new int3x4(v); } + + /// Returns a int3x4 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(bool v) { return new int3x4(v); } + + /// Return a int3x4 matrix constructed from a bool3x4 matrix by componentwise conversion. + /// bool3x4 to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(bool3x4 v) { return new int3x4(v); } + + /// Returns a int3x4 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(uint v) { return new int3x4(v); } + + /// Return a int3x4 matrix constructed from a uint3x4 matrix by componentwise conversion. + /// uint3x4 to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(uint3x4 v) { return new int3x4(v); } + + /// Returns a int3x4 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(float v) { return new int3x4(v); } + + /// Return a int3x4 matrix constructed from a float3x4 matrix by componentwise conversion. + /// float3x4 to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(float3x4 v) { return new int3x4(v); } + + /// Returns a int3x4 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(double v) { return new int3x4(v); } + + /// Return a int3x4 matrix constructed from a double3x4 matrix by componentwise conversion. + /// double3x4 to convert to int3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 int3x4(double3x4 v) { return new int3x4(v); } + + /// Return the int4x3 transpose of a int3x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 transpose(int3x4 v) + { + return int4x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z, + v.c3.x, v.c3.y, v.c3.z); + } + + /// Returns a uint hash code of a int3x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int3x4 v) + { + return csum(asuint(v.c0) * uint3(0x5AB3E8CDu, 0x676E8407u, 0xB36DE767u) + + asuint(v.c1) * uint3(0x6FCA387Du, 0xAF0F3103u, 0xE4A056C7u) + + asuint(v.c2) * uint3(0x841D8225u, 0xC9393C7Du, 0xD42EAFA3u) + + asuint(v.c3) * uint3(0xD9AFD06Du, 0x97A65421u, 0x7809205Fu)) + 0x9C9F0823u; + } + + /// + /// Returns a uint3 vector hash code of a int3x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(int3x4 v) + { + return (asuint(v.c0) * uint3(0x5A9CA13Bu, 0xAFCDD5EFu, 0xA88D187Du) + + asuint(v.c1) * uint3(0xCF6EBA1Du, 0x9D88E5A1u, 0xEADF0775u) + + asuint(v.c2) * uint3(0x747A9D7Bu, 0x4111F799u, 0xB5F05AF1u) + + asuint(v.c3) * uint3(0xFD80290Bu, 0x8B65ADB7u, 0xDFF4F563u)) + 0x7069770Du; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int4.gen.cs b/ThirdParty/Unity.Mathematics/int4.gen.cs new file mode 100644 index 0000000..495d2f9 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int4.gen.cs @@ -0,0 +1,4093 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4 component vector of ints. + [DebuggerTypeProxy(typeof(int4.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int4 : System.IEquatable, IFormattable + { + /// x component of the vector. + public int x; + /// y component of the vector. + public int y; + /// z component of the vector. + public int z; + /// w component of the vector. + public int w; + + /// int4 zero value. + public static readonly int4 zero; + + /// Constructs a int4 vector from four int values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int x, int y, int z, int w) + { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + /// Constructs a int4 vector from two int values and an int2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int x, int y, int2 zw) + { + this.x = x; + this.y = y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a int4 vector from an int value, an int2 vector and an int value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int x, int2 yz, int w) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + this.w = w; + } + + /// Constructs a int4 vector from an int value and an int3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int x, int3 yzw) + { + this.x = x; + this.y = yzw.x; + this.z = yzw.y; + this.w = yzw.z; + } + + /// Constructs a int4 vector from an int2 vector and two int values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int2 xy, int z, int w) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + this.w = w; + } + + /// Constructs a int4 vector from two int2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int2 xy, int2 zw) + { + this.x = xy.x; + this.y = xy.y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a int4 vector from an int3 vector and an int value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int3 xyz, int w) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + this.w = w; + } + + /// Constructs a int4 vector from an int4 vector. + /// The constructed vector's xyzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int4 xyzw) + { + this.x = xyzw.x; + this.y = xyzw.y; + this.z = xyzw.z; + this.w = xyzw.w; + } + + /// Constructs a int4 vector from a single int value by assigning it to every component. + /// int to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(int v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a int4 vector from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(bool v) + { + this.x = v ? 1 : 0; + this.y = v ? 1 : 0; + this.z = v ? 1 : 0; + this.w = v ? 1 : 0; + } + + /// Constructs a int4 vector from a bool4 vector by componentwise conversion. + /// bool4 to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(bool4 v) + { + this.x = v.x ? 1 : 0; + this.y = v.y ? 1 : 0; + this.z = v.z ? 1 : 0; + this.w = v.w ? 1 : 0; + } + + /// Constructs a int4 vector from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(uint v) + { + this.x = (int)v; + this.y = (int)v; + this.z = (int)v; + this.w = (int)v; + } + + /// Constructs a int4 vector from a uint4 vector by componentwise conversion. + /// uint4 to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(uint4 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + this.z = (int)v.z; + this.w = (int)v.w; + } + + /// Constructs a int4 vector from a single float value by converting it to int and assigning it to every component. + /// float to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(float v) + { + this.x = (int)v; + this.y = (int)v; + this.z = (int)v; + this.w = (int)v; + } + + /// Constructs a int4 vector from a float4 vector by componentwise conversion. + /// float4 to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(float4 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + this.z = (int)v.z; + this.w = (int)v.w; + } + + /// Constructs a int4 vector from a single double value by converting it to int and assigning it to every component. + /// double to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(double v) + { + this.x = (int)v; + this.y = (int)v; + this.z = (int)v; + this.w = (int)v; + } + + /// Constructs a int4 vector from a double4 vector by componentwise conversion. + /// double4 to convert to int4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4(double4 v) + { + this.x = (int)v.x; + this.y = (int)v.y; + this.z = (int)v.z; + this.w = (int)v.w; + } + + + /// Implicitly converts a single int value to a int4 vector by assigning it to every component. + /// int to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int4(int v) { return new int4(v); } + + /// Explicitly converts a single bool value to a int4 vector by converting it to int and assigning it to every component. + /// bool to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4(bool v) { return new int4(v); } + + /// Explicitly converts a bool4 vector to a int4 vector by componentwise conversion. + /// bool4 to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4(bool4 v) { return new int4(v); } + + /// Explicitly converts a single uint value to a int4 vector by converting it to int and assigning it to every component. + /// uint to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4(uint v) { return new int4(v); } + + /// Explicitly converts a uint4 vector to a int4 vector by componentwise conversion. + /// uint4 to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4(uint4 v) { return new int4(v); } + + /// Explicitly converts a single float value to a int4 vector by converting it to int and assigning it to every component. + /// float to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4(float v) { return new int4(v); } + + /// Explicitly converts a float4 vector to a int4 vector by componentwise conversion. + /// float4 to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4(float4 v) { return new int4(v); } + + /// Explicitly converts a single double value to a int4 vector by converting it to int and assigning it to every component. + /// double to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4(double v) { return new int4(v); } + + /// Explicitly converts a double4 vector to a int4 vector by componentwise conversion. + /// double4 to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4(double4 v) { return new int4(v); } + + + /// Returns the result of a componentwise multiplication operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise multiplication. + /// Right hand side int4 to use to compute componentwise multiplication. + /// int4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator * (int4 lhs, int4 rhs) { return new int4 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z, lhs.w * rhs.w); } + + /// Returns the result of a componentwise multiplication operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator * (int4 lhs, int rhs) { return new int4 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs, lhs.w * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int4 to use to compute componentwise multiplication. + /// int4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator * (int lhs, int4 rhs) { return new int4 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z, lhs * rhs.w); } + + + /// Returns the result of a componentwise addition operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise addition. + /// Right hand side int4 to use to compute componentwise addition. + /// int4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator + (int4 lhs, int4 rhs) { return new int4 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z, lhs.w + rhs.w); } + + /// Returns the result of a componentwise addition operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator + (int4 lhs, int rhs) { return new int4 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs, lhs.w + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int4 to use to compute componentwise addition. + /// int4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator + (int lhs, int4 rhs) { return new int4 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z, lhs + rhs.w); } + + + /// Returns the result of a componentwise subtraction operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise subtraction. + /// Right hand side int4 to use to compute componentwise subtraction. + /// int4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator - (int4 lhs, int4 rhs) { return new int4 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z, lhs.w - rhs.w); } + + /// Returns the result of a componentwise subtraction operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator - (int4 lhs, int rhs) { return new int4 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs, lhs.w - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int4 to use to compute componentwise subtraction. + /// int4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator - (int lhs, int4 rhs) { return new int4 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z, lhs - rhs.w); } + + + /// Returns the result of a componentwise division operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise division. + /// Right hand side int4 to use to compute componentwise division. + /// int4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator / (int4 lhs, int4 rhs) { return new int4 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z, lhs.w / rhs.w); } + + /// Returns the result of a componentwise division operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator / (int4 lhs, int rhs) { return new int4 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs, lhs.w / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int4 to use to compute componentwise division. + /// int4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator / (int lhs, int4 rhs) { return new int4 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z, lhs / rhs.w); } + + + /// Returns the result of a componentwise modulus operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise modulus. + /// Right hand side int4 to use to compute componentwise modulus. + /// int4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator % (int4 lhs, int4 rhs) { return new int4 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z, lhs.w % rhs.w); } + + /// Returns the result of a componentwise modulus operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator % (int4 lhs, int rhs) { return new int4 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs, lhs.w % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int4 to use to compute componentwise modulus. + /// int4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator % (int lhs, int4 rhs) { return new int4 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z, lhs % rhs.w); } + + + /// Returns the result of a componentwise increment operation on an int4 vector. + /// Value to use when computing the componentwise increment. + /// int4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator ++ (int4 val) { return new int4 (++val.x, ++val.y, ++val.z, ++val.w); } + + + /// Returns the result of a componentwise decrement operation on an int4 vector. + /// Value to use when computing the componentwise decrement. + /// int4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator -- (int4 val) { return new int4 (--val.x, --val.y, --val.z, --val.w); } + + + /// Returns the result of a componentwise less than operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise less than. + /// Right hand side int4 to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (int4 lhs, int4 rhs) { return new bool4 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z, lhs.w < rhs.w); } + + /// Returns the result of a componentwise less than operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (int4 lhs, int rhs) { return new bool4 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs, lhs.w < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int4 to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (int lhs, int4 rhs) { return new bool4 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z, lhs < rhs.w); } + + + /// Returns the result of a componentwise less or equal operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise less or equal. + /// Right hand side int4 to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (int4 lhs, int4 rhs) { return new bool4 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z, lhs.w <= rhs.w); } + + /// Returns the result of a componentwise less or equal operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (int4 lhs, int rhs) { return new bool4 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs, lhs.w <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int4 to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (int lhs, int4 rhs) { return new bool4 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z, lhs <= rhs.w); } + + + /// Returns the result of a componentwise greater than operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise greater than. + /// Right hand side int4 to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (int4 lhs, int4 rhs) { return new bool4 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z, lhs.w > rhs.w); } + + /// Returns the result of a componentwise greater than operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (int4 lhs, int rhs) { return new bool4 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs, lhs.w > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int4 to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (int lhs, int4 rhs) { return new bool4 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z, lhs > rhs.w); } + + + /// Returns the result of a componentwise greater or equal operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise greater or equal. + /// Right hand side int4 to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (int4 lhs, int4 rhs) { return new bool4 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z, lhs.w >= rhs.w); } + + /// Returns the result of a componentwise greater or equal operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (int4 lhs, int rhs) { return new bool4 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs, lhs.w >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int4 to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (int lhs, int4 rhs) { return new bool4 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z, lhs >= rhs.w); } + + + /// Returns the result of a componentwise unary minus operation on an int4 vector. + /// Value to use when computing the componentwise unary minus. + /// int4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator - (int4 val) { return new int4 (-val.x, -val.y, -val.z, -val.w); } + + + /// Returns the result of a componentwise unary plus operation on an int4 vector. + /// Value to use when computing the componentwise unary plus. + /// int4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator + (int4 val) { return new int4 (+val.x, +val.y, +val.z, +val.w); } + + + /// Returns the result of a componentwise left shift operation on an int4 vector by a number of bits specified by a single int. + /// The vector to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator << (int4 x, int n) { return new int4 (x.x << n, x.y << n, x.z << n, x.w << n); } + + /// Returns the result of a componentwise right shift operation on an int4 vector by a number of bits specified by a single int. + /// The vector to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator >> (int4 x, int n) { return new int4 (x.x >> n, x.y >> n, x.z >> n, x.w >> n); } + + /// Returns the result of a componentwise equality operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise equality. + /// Right hand side int4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (int4 lhs, int4 rhs) { return new bool4 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z, lhs.w == rhs.w); } + + /// Returns the result of a componentwise equality operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (int4 lhs, int rhs) { return new bool4 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs, lhs.w == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (int lhs, int4 rhs) { return new bool4 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z, lhs == rhs.w); } + + + /// Returns the result of a componentwise not equal operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise not equal. + /// Right hand side int4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (int4 lhs, int4 rhs) { return new bool4 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z, lhs.w != rhs.w); } + + /// Returns the result of a componentwise not equal operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (int4 lhs, int rhs) { return new bool4 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs, lhs.w != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (int lhs, int4 rhs) { return new bool4 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z, lhs != rhs.w); } + + + /// Returns the result of a componentwise bitwise not operation on an int4 vector. + /// Value to use when computing the componentwise bitwise not. + /// int4 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator ~ (int4 val) { return new int4 (~val.x, ~val.y, ~val.z, ~val.w); } + + + /// Returns the result of a componentwise bitwise and operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise bitwise and. + /// Right hand side int4 to use to compute componentwise bitwise and. + /// int4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator & (int4 lhs, int4 rhs) { return new int4 (lhs.x & rhs.x, lhs.y & rhs.y, lhs.z & rhs.z, lhs.w & rhs.w); } + + /// Returns the result of a componentwise bitwise and operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator & (int4 lhs, int rhs) { return new int4 (lhs.x & rhs, lhs.y & rhs, lhs.z & rhs, lhs.w & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int4 to use to compute componentwise bitwise and. + /// int4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator & (int lhs, int4 rhs) { return new int4 (lhs & rhs.x, lhs & rhs.y, lhs & rhs.z, lhs & rhs.w); } + + + /// Returns the result of a componentwise bitwise or operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise bitwise or. + /// Right hand side int4 to use to compute componentwise bitwise or. + /// int4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator | (int4 lhs, int4 rhs) { return new int4 (lhs.x | rhs.x, lhs.y | rhs.y, lhs.z | rhs.z, lhs.w | rhs.w); } + + /// Returns the result of a componentwise bitwise or operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator | (int4 lhs, int rhs) { return new int4 (lhs.x | rhs, lhs.y | rhs, lhs.z | rhs, lhs.w | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int4 to use to compute componentwise bitwise or. + /// int4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator | (int lhs, int4 rhs) { return new int4 (lhs | rhs.x, lhs | rhs.y, lhs | rhs.z, lhs | rhs.w); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int4 vectors. + /// Left hand side int4 to use to compute componentwise bitwise exclusive or. + /// Right hand side int4 to use to compute componentwise bitwise exclusive or. + /// int4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator ^ (int4 lhs, int4 rhs) { return new int4 (lhs.x ^ rhs.x, lhs.y ^ rhs.y, lhs.z ^ rhs.z, lhs.w ^ rhs.w); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int4 vector and an int value. + /// Left hand side int4 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator ^ (int4 lhs, int rhs) { return new int4 (lhs.x ^ rhs, lhs.y ^ rhs, lhs.z ^ rhs, lhs.w ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int4 vector. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int4 to use to compute componentwise bitwise exclusive or. + /// int4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 operator ^ (int lhs, int4 rhs) { return new int4 (lhs ^ rhs.x, lhs ^ rhs.y, lhs ^ rhs.z, lhs ^ rhs.w); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 xwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(x, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 yzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 ywww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(y, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 zwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(z, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int4 wwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int4(w, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 xww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 ywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 ywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 ywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 yww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 zww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 wwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int3 www + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int3(w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 xw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 yw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 zw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 wx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 wy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 wz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public int2 ww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new int2(w, w); } + } + + + + /// Returns the int element at a specified index. + unsafe public int this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (int4* array = &this) { return ((int*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (int* array = &x) { array[index] = value; } + } + } + + /// Returns true if the int4 is equal to a given int4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } + + /// Returns true if the int4 is equal to a given int4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int4 converted && Equals(converted); } + + + /// Returns a hash code for the int4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int4({0}, {1}, {2}, {3})", x, y, z, w); + } + + /// Returns a string representation of the int4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int4({0}, {1}, {2}, {3})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public int x; + public int y; + public int z; + public int w; + public DebuggerProxy(int4 v) + { + x = v.x; + y = v.y; + z = v.z; + w = v.w; + } + } + + } + + public static partial class math + { + /// Returns a int4 vector constructed from four int values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// int4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int x, int y, int z, int w) { return new int4(x, y, z, w); } + + /// Returns a int4 vector constructed from two int values and an int2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// int4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int x, int y, int2 zw) { return new int4(x, y, zw); } + + /// Returns a int4 vector constructed from an int value, an int2 vector and an int value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// int4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int x, int2 yz, int w) { return new int4(x, yz, w); } + + /// Returns a int4 vector constructed from an int value and an int3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + /// int4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int x, int3 yzw) { return new int4(x, yzw); } + + /// Returns a int4 vector constructed from an int2 vector and two int values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// int4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int2 xy, int z, int w) { return new int4(xy, z, w); } + + /// Returns a int4 vector constructed from two int2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// int4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int2 xy, int2 zw) { return new int4(xy, zw); } + + /// Returns a int4 vector constructed from an int3 vector and an int value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// int4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int3 xyz, int w) { return new int4(xyz, w); } + + /// Returns a int4 vector constructed from an int4 vector. + /// The constructed vector's xyzw components will be set to this value. + /// int4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int4 xyzw) { return new int4(xyzw); } + + /// Returns a int4 vector constructed from a single int value by assigning it to every component. + /// int to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(int v) { return new int4(v); } + + /// Returns a int4 vector constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(bool v) { return new int4(v); } + + /// Return a int4 vector constructed from a bool4 vector by componentwise conversion. + /// bool4 to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(bool4 v) { return new int4(v); } + + /// Returns a int4 vector constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(uint v) { return new int4(v); } + + /// Return a int4 vector constructed from a uint4 vector by componentwise conversion. + /// uint4 to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(uint4 v) { return new int4(v); } + + /// Returns a int4 vector constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(float v) { return new int4(v); } + + /// Return a int4 vector constructed from a float4 vector by componentwise conversion. + /// float4 to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(float4 v) { return new int4(v); } + + /// Returns a int4 vector constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(double v) { return new int4(v); } + + /// Return a int4 vector constructed from a double4 vector by componentwise conversion. + /// double4 to convert to int4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 int4(double4 v) { return new int4(v); } + + /// Returns a uint hash code of a int4 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int4 v) + { + return csum(asuint(v) * uint4(0x6E050B01u, 0x750FDBF5u, 0x7F3DD499u, 0x52EAAEBBu)) + 0x4599C793u; + } + + /// + /// Returns a uint4 vector hash code of a int4 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(int4 v) + { + return (asuint(v) * uint4(0x83B5E729u, 0xC267163Fu, 0x67BC9149u, 0xAD7C5EC1u)) + 0x822A7D6Du; + } + + /// Returns the result of specified shuffling of the components from two int4 vectors into an int value. + /// int4 to use as the left argument of the shuffle operation. + /// int4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int. + /// int result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int shuffle(int4 left, int4 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two int4 vectors into an int2 vector. + /// int4 to use as the left argument of the shuffle operation. + /// int4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int2 x component. + /// The ShuffleComponent to use when setting the resulting int2 y component. + /// int2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 shuffle(int4 left, int4 right, ShuffleComponent x, ShuffleComponent y) + { + return int2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two int4 vectors into an int3 vector. + /// int4 to use as the left argument of the shuffle operation. + /// int4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int3 x component. + /// The ShuffleComponent to use when setting the resulting int3 y component. + /// The ShuffleComponent to use when setting the resulting int3 z component. + /// int3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 shuffle(int4 left, int4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return int3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two int4 vectors into an int4 vector. + /// int4 to use as the left argument of the shuffle operation. + /// int4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting int4 x component. + /// The ShuffleComponent to use when setting the resulting int4 y component. + /// The ShuffleComponent to use when setting the resulting int4 z component. + /// The ShuffleComponent to use when setting the resulting int4 w component. + /// int4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 shuffle(int4 left, int4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return int4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static int select_shuffle_component(int4 a, int4 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.LeftW: + return a.w; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + case ShuffleComponent.RightW: + return b.w; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int4x2.gen.cs b/ThirdParty/Unity.Mathematics/int4x2.gen.cs new file mode 100644 index 0000000..c1766a7 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int4x2.gen.cs @@ -0,0 +1,726 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x2 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int4x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int4 c0; + /// Column 1 of the matrix. + public int4 c1; + + /// int4x2 zero value. + public static readonly int4x2 zero; + + /// Constructs a int4x2 matrix from two int4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(int4 c0, int4 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a int4x2 matrix from 8 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(int m00, int m01, + int m10, int m11, + int m20, int m21, + int m30, int m31) + { + this.c0 = new int4(m00, m10, m20, m30); + this.c1 = new int4(m01, m11, m21, m31); + } + + /// Constructs a int4x2 matrix from a single int value by assigning it to every component. + /// int to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(int v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a int4x2 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(bool v) + { + this.c0 = math.select(new int4(0), new int4(1), v); + this.c1 = math.select(new int4(0), new int4(1), v); + } + + /// Constructs a int4x2 matrix from a bool4x2 matrix by componentwise conversion. + /// bool4x2 to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(bool4x2 v) + { + this.c0 = math.select(new int4(0), new int4(1), v.c0); + this.c1 = math.select(new int4(0), new int4(1), v.c1); + } + + /// Constructs a int4x2 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(uint v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + } + + /// Constructs a int4x2 matrix from a uint4x2 matrix by componentwise conversion. + /// uint4x2 to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(uint4x2 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + } + + /// Constructs a int4x2 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(float v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + } + + /// Constructs a int4x2 matrix from a float4x2 matrix by componentwise conversion. + /// float4x2 to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(float4x2 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + } + + /// Constructs a int4x2 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(double v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + } + + /// Constructs a int4x2 matrix from a double4x2 matrix by componentwise conversion. + /// double4x2 to convert to int4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x2(double4x2 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + } + + + /// Implicitly converts a single int value to a int4x2 matrix by assigning it to every component. + /// int to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int4x2(int v) { return new int4x2(v); } + + /// Explicitly converts a single bool value to a int4x2 matrix by converting it to int and assigning it to every component. + /// bool to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x2(bool v) { return new int4x2(v); } + + /// Explicitly converts a bool4x2 matrix to a int4x2 matrix by componentwise conversion. + /// bool4x2 to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x2(bool4x2 v) { return new int4x2(v); } + + /// Explicitly converts a single uint value to a int4x2 matrix by converting it to int and assigning it to every component. + /// uint to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x2(uint v) { return new int4x2(v); } + + /// Explicitly converts a uint4x2 matrix to a int4x2 matrix by componentwise conversion. + /// uint4x2 to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x2(uint4x2 v) { return new int4x2(v); } + + /// Explicitly converts a single float value to a int4x2 matrix by converting it to int and assigning it to every component. + /// float to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x2(float v) { return new int4x2(v); } + + /// Explicitly converts a float4x2 matrix to a int4x2 matrix by componentwise conversion. + /// float4x2 to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x2(float4x2 v) { return new int4x2(v); } + + /// Explicitly converts a single double value to a int4x2 matrix by converting it to int and assigning it to every component. + /// double to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x2(double v) { return new int4x2(v); } + + /// Explicitly converts a double4x2 matrix to a int4x2 matrix by componentwise conversion. + /// double4x2 to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x2(double4x2 v) { return new int4x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise multiplication. + /// Right hand side int4x2 to use to compute componentwise multiplication. + /// int4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator * (int4x2 lhs, int4x2 rhs) { return new int4x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator * (int4x2 lhs, int rhs) { return new int4x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int4x2 to use to compute componentwise multiplication. + /// int4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator * (int lhs, int4x2 rhs) { return new int4x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise addition. + /// Right hand side int4x2 to use to compute componentwise addition. + /// int4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator + (int4x2 lhs, int4x2 rhs) { return new int4x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator + (int4x2 lhs, int rhs) { return new int4x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int4x2 to use to compute componentwise addition. + /// int4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator + (int lhs, int4x2 rhs) { return new int4x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise subtraction. + /// Right hand side int4x2 to use to compute componentwise subtraction. + /// int4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator - (int4x2 lhs, int4x2 rhs) { return new int4x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator - (int4x2 lhs, int rhs) { return new int4x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int4x2 to use to compute componentwise subtraction. + /// int4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator - (int lhs, int4x2 rhs) { return new int4x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise division. + /// Right hand side int4x2 to use to compute componentwise division. + /// int4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator / (int4x2 lhs, int4x2 rhs) { return new int4x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator / (int4x2 lhs, int rhs) { return new int4x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int4x2 to use to compute componentwise division. + /// int4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator / (int lhs, int4x2 rhs) { return new int4x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise modulus. + /// Right hand side int4x2 to use to compute componentwise modulus. + /// int4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator % (int4x2 lhs, int4x2 rhs) { return new int4x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator % (int4x2 lhs, int rhs) { return new int4x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int4x2 to use to compute componentwise modulus. + /// int4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator % (int lhs, int4x2 rhs) { return new int4x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on an int4x2 matrix. + /// Value to use when computing the componentwise increment. + /// int4x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator ++ (int4x2 val) { return new int4x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on an int4x2 matrix. + /// Value to use when computing the componentwise decrement. + /// int4x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator -- (int4x2 val) { return new int4x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise less than. + /// Right hand side int4x2 to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (int4x2 lhs, int4x2 rhs) { return new bool4x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (int4x2 lhs, int rhs) { return new bool4x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int4x2 to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (int lhs, int4x2 rhs) { return new bool4x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise less or equal. + /// Right hand side int4x2 to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (int4x2 lhs, int4x2 rhs) { return new bool4x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (int4x2 lhs, int rhs) { return new bool4x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int4x2 to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (int lhs, int4x2 rhs) { return new bool4x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise greater than. + /// Right hand side int4x2 to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (int4x2 lhs, int4x2 rhs) { return new bool4x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (int4x2 lhs, int rhs) { return new bool4x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int4x2 to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (int lhs, int4x2 rhs) { return new bool4x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise greater or equal. + /// Right hand side int4x2 to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (int4x2 lhs, int4x2 rhs) { return new bool4x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (int4x2 lhs, int rhs) { return new bool4x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int4x2 to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (int lhs, int4x2 rhs) { return new bool4x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on an int4x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// int4x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator - (int4x2 val) { return new int4x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on an int4x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// int4x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator + (int4x2 val) { return new int4x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise left shift operation on an int4x2 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator << (int4x2 x, int n) { return new int4x2 (x.c0 << n, x.c1 << n); } + + /// Returns the result of a componentwise right shift operation on an int4x2 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator >> (int4x2 x, int n) { return new int4x2 (x.c0 >> n, x.c1 >> n); } + + /// Returns the result of a componentwise equality operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise equality. + /// Right hand side int4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (int4x2 lhs, int4x2 rhs) { return new bool4x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (int4x2 lhs, int rhs) { return new bool4x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (int lhs, int4x2 rhs) { return new bool4x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise not equal. + /// Right hand side int4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (int4x2 lhs, int4x2 rhs) { return new bool4x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (int4x2 lhs, int rhs) { return new bool4x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (int lhs, int4x2 rhs) { return new bool4x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise bitwise not operation on an int4x2 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int4x2 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator ~ (int4x2 val) { return new int4x2 (~val.c0, ~val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise bitwise and. + /// Right hand side int4x2 to use to compute componentwise bitwise and. + /// int4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator & (int4x2 lhs, int4x2 rhs) { return new int4x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator & (int4x2 lhs, int rhs) { return new int4x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int4x2 to use to compute componentwise bitwise and. + /// int4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator & (int lhs, int4x2 rhs) { return new int4x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise bitwise or. + /// Right hand side int4x2 to use to compute componentwise bitwise or. + /// int4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator | (int4x2 lhs, int4x2 rhs) { return new int4x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator | (int4x2 lhs, int rhs) { return new int4x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int4x2 to use to compute componentwise bitwise or. + /// int4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator | (int lhs, int4x2 rhs) { return new int4x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int4x2 matrices. + /// Left hand side int4x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side int4x2 to use to compute componentwise bitwise exclusive or. + /// int4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator ^ (int4x2 lhs, int4x2 rhs) { return new int4x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int4x2 matrix and an int value. + /// Left hand side int4x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator ^ (int4x2 lhs, int rhs) { return new int4x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int4x2 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int4x2 to use to compute componentwise bitwise exclusive or. + /// int4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 operator ^ (int lhs, int4x2 rhs) { return new int4x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the int4 element at a specified index. + unsafe public ref int4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (int4x2* array = &this) { return ref ((int4*)array)[index]; } + } + } + + /// Returns true if the int4x2 is equal to a given int4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int4x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the int4x2 is equal to a given int4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int4x2 converted && Equals(converted); } + + + /// Returns a hash code for the int4x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int4x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int4x2({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z, c0.w, c1.w); + } + + /// Returns a string representation of the int4x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int4x2({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int4x2 matrix constructed from two int4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// int4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(int4 c0, int4 c1) { return new int4x2(c0, c1); } + + /// Returns a int4x2 matrix constructed from from 8 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// int4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(int m00, int m01, + int m10, int m11, + int m20, int m21, + int m30, int m31) + { + return new int4x2(m00, m01, + m10, m11, + m20, m21, + m30, m31); + } + + /// Returns a int4x2 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(int v) { return new int4x2(v); } + + /// Returns a int4x2 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(bool v) { return new int4x2(v); } + + /// Return a int4x2 matrix constructed from a bool4x2 matrix by componentwise conversion. + /// bool4x2 to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(bool4x2 v) { return new int4x2(v); } + + /// Returns a int4x2 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(uint v) { return new int4x2(v); } + + /// Return a int4x2 matrix constructed from a uint4x2 matrix by componentwise conversion. + /// uint4x2 to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(uint4x2 v) { return new int4x2(v); } + + /// Returns a int4x2 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(float v) { return new int4x2(v); } + + /// Return a int4x2 matrix constructed from a float4x2 matrix by componentwise conversion. + /// float4x2 to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(float4x2 v) { return new int4x2(v); } + + /// Returns a int4x2 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(double v) { return new int4x2(v); } + + /// Return a int4x2 matrix constructed from a double4x2 matrix by componentwise conversion. + /// double4x2 to convert to int4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 int4x2(double4x2 v) { return new int4x2(v); } + + /// Return the int2x4 transpose of a int4x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 transpose(int4x2 v) + { + return int2x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w); + } + + /// Returns a uint hash code of a int4x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int4x2 v) + { + return csum(asuint(v.c0) * uint4(0xFAAF07DDu, 0x625C45BDu, 0xC9F27FCBu, 0x6D2523B1u) + + asuint(v.c1) * uint4(0x6E2BF6A9u, 0xCC74B3B7u, 0x83B58237u, 0x833E3E29u)) + 0xA9D919BFu; + } + + /// + /// Returns a uint4 vector hash code of a int4x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(int4x2 v) + { + return (asuint(v.c0) * uint4(0xC3EC1D97u, 0xB8B208C7u, 0x5D3ED947u, 0x4473BBB1u) + + asuint(v.c1) * uint4(0xCBA11D5Fu, 0x685835CFu, 0xC3D32AE1u, 0xB966942Fu)) + 0xFE9856B3u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int4x3.gen.cs b/ThirdParty/Unity.Mathematics/int4x3.gen.cs new file mode 100644 index 0000000..c6a8e38 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int4x3.gen.cs @@ -0,0 +1,752 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x3 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int4x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int4 c0; + /// Column 1 of the matrix. + public int4 c1; + /// Column 2 of the matrix. + public int4 c2; + + /// int4x3 zero value. + public static readonly int4x3 zero; + + /// Constructs a int4x3 matrix from three int4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(int4 c0, int4 c1, int4 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a int4x3 matrix from 12 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(int m00, int m01, int m02, + int m10, int m11, int m12, + int m20, int m21, int m22, + int m30, int m31, int m32) + { + this.c0 = new int4(m00, m10, m20, m30); + this.c1 = new int4(m01, m11, m21, m31); + this.c2 = new int4(m02, m12, m22, m32); + } + + /// Constructs a int4x3 matrix from a single int value by assigning it to every component. + /// int to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a int4x3 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(bool v) + { + this.c0 = math.select(new int4(0), new int4(1), v); + this.c1 = math.select(new int4(0), new int4(1), v); + this.c2 = math.select(new int4(0), new int4(1), v); + } + + /// Constructs a int4x3 matrix from a bool4x3 matrix by componentwise conversion. + /// bool4x3 to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(bool4x3 v) + { + this.c0 = math.select(new int4(0), new int4(1), v.c0); + this.c1 = math.select(new int4(0), new int4(1), v.c1); + this.c2 = math.select(new int4(0), new int4(1), v.c2); + } + + /// Constructs a int4x3 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(uint v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + this.c2 = (int4)v; + } + + /// Constructs a int4x3 matrix from a uint4x3 matrix by componentwise conversion. + /// uint4x3 to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(uint4x3 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + this.c2 = (int4)v.c2; + } + + /// Constructs a int4x3 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(float v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + this.c2 = (int4)v; + } + + /// Constructs a int4x3 matrix from a float4x3 matrix by componentwise conversion. + /// float4x3 to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(float4x3 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + this.c2 = (int4)v.c2; + } + + /// Constructs a int4x3 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(double v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + this.c2 = (int4)v; + } + + /// Constructs a int4x3 matrix from a double4x3 matrix by componentwise conversion. + /// double4x3 to convert to int4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x3(double4x3 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + this.c2 = (int4)v.c2; + } + + + /// Implicitly converts a single int value to a int4x3 matrix by assigning it to every component. + /// int to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int4x3(int v) { return new int4x3(v); } + + /// Explicitly converts a single bool value to a int4x3 matrix by converting it to int and assigning it to every component. + /// bool to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x3(bool v) { return new int4x3(v); } + + /// Explicitly converts a bool4x3 matrix to a int4x3 matrix by componentwise conversion. + /// bool4x3 to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x3(bool4x3 v) { return new int4x3(v); } + + /// Explicitly converts a single uint value to a int4x3 matrix by converting it to int and assigning it to every component. + /// uint to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x3(uint v) { return new int4x3(v); } + + /// Explicitly converts a uint4x3 matrix to a int4x3 matrix by componentwise conversion. + /// uint4x3 to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x3(uint4x3 v) { return new int4x3(v); } + + /// Explicitly converts a single float value to a int4x3 matrix by converting it to int and assigning it to every component. + /// float to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x3(float v) { return new int4x3(v); } + + /// Explicitly converts a float4x3 matrix to a int4x3 matrix by componentwise conversion. + /// float4x3 to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x3(float4x3 v) { return new int4x3(v); } + + /// Explicitly converts a single double value to a int4x3 matrix by converting it to int and assigning it to every component. + /// double to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x3(double v) { return new int4x3(v); } + + /// Explicitly converts a double4x3 matrix to a int4x3 matrix by componentwise conversion. + /// double4x3 to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x3(double4x3 v) { return new int4x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise multiplication. + /// Right hand side int4x3 to use to compute componentwise multiplication. + /// int4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator * (int4x3 lhs, int4x3 rhs) { return new int4x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator * (int4x3 lhs, int rhs) { return new int4x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int4x3 to use to compute componentwise multiplication. + /// int4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator * (int lhs, int4x3 rhs) { return new int4x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise addition. + /// Right hand side int4x3 to use to compute componentwise addition. + /// int4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator + (int4x3 lhs, int4x3 rhs) { return new int4x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator + (int4x3 lhs, int rhs) { return new int4x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int4x3 to use to compute componentwise addition. + /// int4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator + (int lhs, int4x3 rhs) { return new int4x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise subtraction. + /// Right hand side int4x3 to use to compute componentwise subtraction. + /// int4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator - (int4x3 lhs, int4x3 rhs) { return new int4x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator - (int4x3 lhs, int rhs) { return new int4x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int4x3 to use to compute componentwise subtraction. + /// int4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator - (int lhs, int4x3 rhs) { return new int4x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise division. + /// Right hand side int4x3 to use to compute componentwise division. + /// int4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator / (int4x3 lhs, int4x3 rhs) { return new int4x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator / (int4x3 lhs, int rhs) { return new int4x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int4x3 to use to compute componentwise division. + /// int4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator / (int lhs, int4x3 rhs) { return new int4x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise modulus. + /// Right hand side int4x3 to use to compute componentwise modulus. + /// int4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator % (int4x3 lhs, int4x3 rhs) { return new int4x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator % (int4x3 lhs, int rhs) { return new int4x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int4x3 to use to compute componentwise modulus. + /// int4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator % (int lhs, int4x3 rhs) { return new int4x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on an int4x3 matrix. + /// Value to use when computing the componentwise increment. + /// int4x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator ++ (int4x3 val) { return new int4x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on an int4x3 matrix. + /// Value to use when computing the componentwise decrement. + /// int4x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator -- (int4x3 val) { return new int4x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise less than. + /// Right hand side int4x3 to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (int4x3 lhs, int4x3 rhs) { return new bool4x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (int4x3 lhs, int rhs) { return new bool4x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int4x3 to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (int lhs, int4x3 rhs) { return new bool4x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise less or equal. + /// Right hand side int4x3 to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (int4x3 lhs, int4x3 rhs) { return new bool4x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (int4x3 lhs, int rhs) { return new bool4x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int4x3 to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (int lhs, int4x3 rhs) { return new bool4x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise greater than. + /// Right hand side int4x3 to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (int4x3 lhs, int4x3 rhs) { return new bool4x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (int4x3 lhs, int rhs) { return new bool4x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int4x3 to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (int lhs, int4x3 rhs) { return new bool4x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise greater or equal. + /// Right hand side int4x3 to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (int4x3 lhs, int4x3 rhs) { return new bool4x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (int4x3 lhs, int rhs) { return new bool4x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int4x3 to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (int lhs, int4x3 rhs) { return new bool4x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on an int4x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// int4x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator - (int4x3 val) { return new int4x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on an int4x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// int4x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator + (int4x3 val) { return new int4x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise left shift operation on an int4x3 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator << (int4x3 x, int n) { return new int4x3 (x.c0 << n, x.c1 << n, x.c2 << n); } + + /// Returns the result of a componentwise right shift operation on an int4x3 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator >> (int4x3 x, int n) { return new int4x3 (x.c0 >> n, x.c1 >> n, x.c2 >> n); } + + /// Returns the result of a componentwise equality operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise equality. + /// Right hand side int4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (int4x3 lhs, int4x3 rhs) { return new bool4x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (int4x3 lhs, int rhs) { return new bool4x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (int lhs, int4x3 rhs) { return new bool4x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise not equal. + /// Right hand side int4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (int4x3 lhs, int4x3 rhs) { return new bool4x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (int4x3 lhs, int rhs) { return new bool4x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (int lhs, int4x3 rhs) { return new bool4x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise bitwise not operation on an int4x3 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int4x3 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator ~ (int4x3 val) { return new int4x3 (~val.c0, ~val.c1, ~val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise bitwise and. + /// Right hand side int4x3 to use to compute componentwise bitwise and. + /// int4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator & (int4x3 lhs, int4x3 rhs) { return new int4x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator & (int4x3 lhs, int rhs) { return new int4x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int4x3 to use to compute componentwise bitwise and. + /// int4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator & (int lhs, int4x3 rhs) { return new int4x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise bitwise or. + /// Right hand side int4x3 to use to compute componentwise bitwise or. + /// int4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator | (int4x3 lhs, int4x3 rhs) { return new int4x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator | (int4x3 lhs, int rhs) { return new int4x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int4x3 to use to compute componentwise bitwise or. + /// int4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator | (int lhs, int4x3 rhs) { return new int4x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int4x3 matrices. + /// Left hand side int4x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side int4x3 to use to compute componentwise bitwise exclusive or. + /// int4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator ^ (int4x3 lhs, int4x3 rhs) { return new int4x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int4x3 matrix and an int value. + /// Left hand side int4x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator ^ (int4x3 lhs, int rhs) { return new int4x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int4x3 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int4x3 to use to compute componentwise bitwise exclusive or. + /// int4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 operator ^ (int lhs, int4x3 rhs) { return new int4x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the int4 element at a specified index. + unsafe public ref int4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (int4x3* array = &this) { return ref ((int4*)array)[index]; } + } + } + + /// Returns true if the int4x3 is equal to a given int4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int4x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the int4x3 is equal to a given int4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int4x3 converted && Equals(converted); } + + + /// Returns a hash code for the int4x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int4x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int4x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z, c0.w, c1.w, c2.w); + } + + /// Returns a string representation of the int4x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int4x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider), c2.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int4x3 matrix constructed from three int4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// int4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(int4 c0, int4 c1, int4 c2) { return new int4x3(c0, c1, c2); } + + /// Returns a int4x3 matrix constructed from from 12 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// int4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(int m00, int m01, int m02, + int m10, int m11, int m12, + int m20, int m21, int m22, + int m30, int m31, int m32) + { + return new int4x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22, + m30, m31, m32); + } + + /// Returns a int4x3 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(int v) { return new int4x3(v); } + + /// Returns a int4x3 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(bool v) { return new int4x3(v); } + + /// Return a int4x3 matrix constructed from a bool4x3 matrix by componentwise conversion. + /// bool4x3 to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(bool4x3 v) { return new int4x3(v); } + + /// Returns a int4x3 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(uint v) { return new int4x3(v); } + + /// Return a int4x3 matrix constructed from a uint4x3 matrix by componentwise conversion. + /// uint4x3 to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(uint4x3 v) { return new int4x3(v); } + + /// Returns a int4x3 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(float v) { return new int4x3(v); } + + /// Return a int4x3 matrix constructed from a float4x3 matrix by componentwise conversion. + /// float4x3 to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(float4x3 v) { return new int4x3(v); } + + /// Returns a int4x3 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(double v) { return new int4x3(v); } + + /// Return a int4x3 matrix constructed from a double4x3 matrix by componentwise conversion. + /// double4x3 to convert to int4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 int4x3(double4x3 v) { return new int4x3(v); } + + /// Return the int3x4 transpose of a int4x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 transpose(int4x3 v) + { + return int3x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w); + } + + /// Returns a uint hash code of a int4x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int4x3 v) + { + return csum(asuint(v.c0) * uint4(0x69B60C81u, 0xE0EB6C25u, 0xF648BEABu, 0x6BDB2B07u) + + asuint(v.c1) * uint4(0xEF63C699u, 0x9001903Fu, 0xA895B9CDu, 0x9D23B201u) + + asuint(v.c2) * uint4(0x4B01D3E1u, 0x7461CA0Du, 0x79725379u, 0xD6258E5Bu)) + 0xEE390C97u; + } + + /// + /// Returns a uint4 vector hash code of a int4x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(int4x3 v) + { + return (asuint(v.c0) * uint4(0x9C8A2F05u, 0x4DDC6509u, 0x7CF083CBu, 0x5C4D6CEDu) + + asuint(v.c1) * uint4(0xF9137117u, 0xE857DCE1u, 0xF62213C5u, 0x9CDAA959u) + + asuint(v.c2) * uint4(0xAA269ABFu, 0xD54BA36Fu, 0xFD0847B9u, 0x8189A683u)) + 0xB139D651u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/int4x4.gen.cs b/ThirdParty/Unity.Mathematics/int4x4.gen.cs new file mode 100644 index 0000000..7d0d38a --- /dev/null +++ b/ThirdParty/Unity.Mathematics/int4x4.gen.cs @@ -0,0 +1,799 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x4 matrix of ints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct int4x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public int4 c0; + /// Column 1 of the matrix. + public int4 c1; + /// Column 2 of the matrix. + public int4 c2; + /// Column 3 of the matrix. + public int4 c3; + + /// int4x4 identity transform. + public static readonly int4x4 identity = new int4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + + /// int4x4 zero value. + public static readonly int4x4 zero; + + /// Constructs a int4x4 matrix from four int4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(int4 c0, int4 c1, int4 c2, int4 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a int4x4 matrix from 16 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(int m00, int m01, int m02, int m03, + int m10, int m11, int m12, int m13, + int m20, int m21, int m22, int m23, + int m30, int m31, int m32, int m33) + { + this.c0 = new int4(m00, m10, m20, m30); + this.c1 = new int4(m01, m11, m21, m31); + this.c2 = new int4(m02, m12, m22, m32); + this.c3 = new int4(m03, m13, m23, m33); + } + + /// Constructs a int4x4 matrix from a single int value by assigning it to every component. + /// int to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(int v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a int4x4 matrix from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(bool v) + { + this.c0 = math.select(new int4(0), new int4(1), v); + this.c1 = math.select(new int4(0), new int4(1), v); + this.c2 = math.select(new int4(0), new int4(1), v); + this.c3 = math.select(new int4(0), new int4(1), v); + } + + /// Constructs a int4x4 matrix from a bool4x4 matrix by componentwise conversion. + /// bool4x4 to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(bool4x4 v) + { + this.c0 = math.select(new int4(0), new int4(1), v.c0); + this.c1 = math.select(new int4(0), new int4(1), v.c1); + this.c2 = math.select(new int4(0), new int4(1), v.c2); + this.c3 = math.select(new int4(0), new int4(1), v.c3); + } + + /// Constructs a int4x4 matrix from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(uint v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + this.c2 = (int4)v; + this.c3 = (int4)v; + } + + /// Constructs a int4x4 matrix from a uint4x4 matrix by componentwise conversion. + /// uint4x4 to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(uint4x4 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + this.c2 = (int4)v.c2; + this.c3 = (int4)v.c3; + } + + /// Constructs a int4x4 matrix from a single float value by converting it to int and assigning it to every component. + /// float to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(float v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + this.c2 = (int4)v; + this.c3 = (int4)v; + } + + /// Constructs a int4x4 matrix from a float4x4 matrix by componentwise conversion. + /// float4x4 to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(float4x4 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + this.c2 = (int4)v.c2; + this.c3 = (int4)v.c3; + } + + /// Constructs a int4x4 matrix from a single double value by converting it to int and assigning it to every component. + /// double to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(double v) + { + this.c0 = (int4)v; + this.c1 = (int4)v; + this.c2 = (int4)v; + this.c3 = (int4)v; + } + + /// Constructs a int4x4 matrix from a double4x4 matrix by componentwise conversion. + /// double4x4 to convert to int4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4x4(double4x4 v) + { + this.c0 = (int4)v.c0; + this.c1 = (int4)v.c1; + this.c2 = (int4)v.c2; + this.c3 = (int4)v.c3; + } + + + /// Implicitly converts a single int value to a int4x4 matrix by assigning it to every component. + /// int to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int4x4(int v) { return new int4x4(v); } + + /// Explicitly converts a single bool value to a int4x4 matrix by converting it to int and assigning it to every component. + /// bool to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x4(bool v) { return new int4x4(v); } + + /// Explicitly converts a bool4x4 matrix to a int4x4 matrix by componentwise conversion. + /// bool4x4 to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x4(bool4x4 v) { return new int4x4(v); } + + /// Explicitly converts a single uint value to a int4x4 matrix by converting it to int and assigning it to every component. + /// uint to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x4(uint v) { return new int4x4(v); } + + /// Explicitly converts a uint4x4 matrix to a int4x4 matrix by componentwise conversion. + /// uint4x4 to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x4(uint4x4 v) { return new int4x4(v); } + + /// Explicitly converts a single float value to a int4x4 matrix by converting it to int and assigning it to every component. + /// float to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x4(float v) { return new int4x4(v); } + + /// Explicitly converts a float4x4 matrix to a int4x4 matrix by componentwise conversion. + /// float4x4 to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x4(float4x4 v) { return new int4x4(v); } + + /// Explicitly converts a single double value to a int4x4 matrix by converting it to int and assigning it to every component. + /// double to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x4(double v) { return new int4x4(v); } + + /// Explicitly converts a double4x4 matrix to a int4x4 matrix by componentwise conversion. + /// double4x4 to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator int4x4(double4x4 v) { return new int4x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise multiplication. + /// Right hand side int4x4 to use to compute componentwise multiplication. + /// int4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator * (int4x4 lhs, int4x4 rhs) { return new int4x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise multiplication. + /// Right hand side int to use to compute componentwise multiplication. + /// int4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator * (int4x4 lhs, int rhs) { return new int4x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise multiplication. + /// Right hand side int4x4 to use to compute componentwise multiplication. + /// int4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator * (int lhs, int4x4 rhs) { return new int4x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise addition. + /// Right hand side int4x4 to use to compute componentwise addition. + /// int4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator + (int4x4 lhs, int4x4 rhs) { return new int4x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise addition. + /// Right hand side int to use to compute componentwise addition. + /// int4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator + (int4x4 lhs, int rhs) { return new int4x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise addition. + /// Right hand side int4x4 to use to compute componentwise addition. + /// int4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator + (int lhs, int4x4 rhs) { return new int4x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise subtraction. + /// Right hand side int4x4 to use to compute componentwise subtraction. + /// int4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator - (int4x4 lhs, int4x4 rhs) { return new int4x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise subtraction. + /// Right hand side int to use to compute componentwise subtraction. + /// int4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator - (int4x4 lhs, int rhs) { return new int4x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise subtraction. + /// Right hand side int4x4 to use to compute componentwise subtraction. + /// int4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator - (int lhs, int4x4 rhs) { return new int4x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise division. + /// Right hand side int4x4 to use to compute componentwise division. + /// int4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator / (int4x4 lhs, int4x4 rhs) { return new int4x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise division. + /// Right hand side int to use to compute componentwise division. + /// int4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator / (int4x4 lhs, int rhs) { return new int4x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise division. + /// Right hand side int4x4 to use to compute componentwise division. + /// int4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator / (int lhs, int4x4 rhs) { return new int4x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise modulus. + /// Right hand side int4x4 to use to compute componentwise modulus. + /// int4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator % (int4x4 lhs, int4x4 rhs) { return new int4x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise modulus. + /// Right hand side int to use to compute componentwise modulus. + /// int4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator % (int4x4 lhs, int rhs) { return new int4x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise modulus. + /// Right hand side int4x4 to use to compute componentwise modulus. + /// int4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator % (int lhs, int4x4 rhs) { return new int4x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on an int4x4 matrix. + /// Value to use when computing the componentwise increment. + /// int4x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator ++ (int4x4 val) { return new int4x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on an int4x4 matrix. + /// Value to use when computing the componentwise decrement. + /// int4x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator -- (int4x4 val) { return new int4x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise less than. + /// Right hand side int4x4 to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (int4x4 lhs, int4x4 rhs) { return new bool4x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise less than. + /// Right hand side int to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (int4x4 lhs, int rhs) { return new bool4x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise less than. + /// Right hand side int4x4 to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (int lhs, int4x4 rhs) { return new bool4x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise less or equal. + /// Right hand side int4x4 to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (int4x4 lhs, int4x4 rhs) { return new bool4x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise less or equal. + /// Right hand side int to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (int4x4 lhs, int rhs) { return new bool4x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise less or equal. + /// Right hand side int4x4 to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (int lhs, int4x4 rhs) { return new bool4x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise greater than. + /// Right hand side int4x4 to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (int4x4 lhs, int4x4 rhs) { return new bool4x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise greater than. + /// Right hand side int to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (int4x4 lhs, int rhs) { return new bool4x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise greater than. + /// Right hand side int4x4 to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (int lhs, int4x4 rhs) { return new bool4x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise greater or equal. + /// Right hand side int4x4 to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (int4x4 lhs, int4x4 rhs) { return new bool4x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise greater or equal. + /// Right hand side int to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (int4x4 lhs, int rhs) { return new bool4x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise greater or equal. + /// Right hand side int4x4 to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (int lhs, int4x4 rhs) { return new bool4x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on an int4x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// int4x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator - (int4x4 val) { return new int4x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on an int4x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// int4x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator + (int4x4 val) { return new int4x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise left shift operation on an int4x4 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator << (int4x4 x, int n) { return new int4x4 (x.c0 << n, x.c1 << n, x.c2 << n, x.c3 << n); } + + /// Returns the result of a componentwise right shift operation on an int4x4 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator >> (int4x4 x, int n) { return new int4x4 (x.c0 >> n, x.c1 >> n, x.c2 >> n, x.c3 >> n); } + + /// Returns the result of a componentwise equality operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise equality. + /// Right hand side int4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (int4x4 lhs, int4x4 rhs) { return new bool4x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise equality. + /// Right hand side int to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (int4x4 lhs, int rhs) { return new bool4x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise equality. + /// Right hand side int4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (int lhs, int4x4 rhs) { return new bool4x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise not equal. + /// Right hand side int4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (int4x4 lhs, int4x4 rhs) { return new bool4x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise not equal. + /// Right hand side int to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (int4x4 lhs, int rhs) { return new bool4x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise not equal. + /// Right hand side int4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (int lhs, int4x4 rhs) { return new bool4x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise bitwise not operation on an int4x4 matrix. + /// Value to use when computing the componentwise bitwise not. + /// int4x4 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator ~ (int4x4 val) { return new int4x4 (~val.c0, ~val.c1, ~val.c2, ~val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise bitwise and. + /// Right hand side int4x4 to use to compute componentwise bitwise and. + /// int4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator & (int4x4 lhs, int4x4 rhs) { return new int4x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise bitwise and. + /// Right hand side int to use to compute componentwise bitwise and. + /// int4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator & (int4x4 lhs, int rhs) { return new int4x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise bitwise and. + /// Right hand side int4x4 to use to compute componentwise bitwise and. + /// int4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator & (int lhs, int4x4 rhs) { return new int4x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise bitwise or. + /// Right hand side int4x4 to use to compute componentwise bitwise or. + /// int4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator | (int4x4 lhs, int4x4 rhs) { return new int4x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise bitwise or. + /// Right hand side int to use to compute componentwise bitwise or. + /// int4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator | (int4x4 lhs, int rhs) { return new int4x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise bitwise or. + /// Right hand side int4x4 to use to compute componentwise bitwise or. + /// int4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator | (int lhs, int4x4 rhs) { return new int4x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two int4x4 matrices. + /// Left hand side int4x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side int4x4 to use to compute componentwise bitwise exclusive or. + /// int4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator ^ (int4x4 lhs, int4x4 rhs) { return new int4x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int4x4 matrix and an int value. + /// Left hand side int4x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side int to use to compute componentwise bitwise exclusive or. + /// int4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator ^ (int4x4 lhs, int rhs) { return new int4x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on an int value and an int4x4 matrix. + /// Left hand side int to use to compute componentwise bitwise exclusive or. + /// Right hand side int4x4 to use to compute componentwise bitwise exclusive or. + /// int4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 operator ^ (int lhs, int4x4 rhs) { return new int4x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the int4 element at a specified index. + unsafe public ref int4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (int4x4* array = &this) { return ref ((int4*)array)[index]; } + } + } + + /// Returns true if the int4x4 is equal to a given int4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(int4x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the int4x4 is equal to a given int4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is int4x4 converted && Equals(converted); } + + + /// Returns a hash code for the int4x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the int4x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("int4x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z, c0.w, c1.w, c2.w, c3.w); + } + + /// Returns a string representation of the int4x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("int4x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c3.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider), c2.w.ToString(format, formatProvider), c3.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a int4x4 matrix constructed from four int4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// int4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(int4 c0, int4 c1, int4 c2, int4 c3) { return new int4x4(c0, c1, c2, c3); } + + /// Returns a int4x4 matrix constructed from from 16 int values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + /// int4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(int m00, int m01, int m02, int m03, + int m10, int m11, int m12, int m13, + int m20, int m21, int m22, int m23, + int m30, int m31, int m32, int m33) + { + return new int4x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23, + m30, m31, m32, m33); + } + + /// Returns a int4x4 matrix constructed from a single int value by assigning it to every component. + /// int to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(int v) { return new int4x4(v); } + + /// Returns a int4x4 matrix constructed from a single bool value by converting it to int and assigning it to every component. + /// bool to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(bool v) { return new int4x4(v); } + + /// Return a int4x4 matrix constructed from a bool4x4 matrix by componentwise conversion. + /// bool4x4 to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(bool4x4 v) { return new int4x4(v); } + + /// Returns a int4x4 matrix constructed from a single uint value by converting it to int and assigning it to every component. + /// uint to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(uint v) { return new int4x4(v); } + + /// Return a int4x4 matrix constructed from a uint4x4 matrix by componentwise conversion. + /// uint4x4 to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(uint4x4 v) { return new int4x4(v); } + + /// Returns a int4x4 matrix constructed from a single float value by converting it to int and assigning it to every component. + /// float to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(float v) { return new int4x4(v); } + + /// Return a int4x4 matrix constructed from a float4x4 matrix by componentwise conversion. + /// float4x4 to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(float4x4 v) { return new int4x4(v); } + + /// Returns a int4x4 matrix constructed from a single double value by converting it to int and assigning it to every component. + /// double to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(double v) { return new int4x4(v); } + + /// Return a int4x4 matrix constructed from a double4x4 matrix by componentwise conversion. + /// double4x4 to convert to int4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 int4x4(double4x4 v) { return new int4x4(v); } + + /// Return the int4x4 transpose of a int4x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 transpose(int4x4 v) + { + return int4x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w, + v.c3.x, v.c3.y, v.c3.z, v.c3.w); + } + + /// Returns the determinant of a int4x4 matrix. + /// Matrix to use when computing determinant. + /// The determinant of the matrix. + public static int determinant(int4x4 m) + { + int4 c0 = m.c0; + int4 c1 = m.c1; + int4 c2 = m.c2; + int4 c3 = m.c3; + + int m00 = c1.y * (c2.z * c3.w - c2.w * c3.z) - c2.y * (c1.z * c3.w - c1.w * c3.z) + c3.y * (c1.z * c2.w - c1.w * c2.z); + int m01 = c0.y * (c2.z * c3.w - c2.w * c3.z) - c2.y * (c0.z * c3.w - c0.w * c3.z) + c3.y * (c0.z * c2.w - c0.w * c2.z); + int m02 = c0.y * (c1.z * c3.w - c1.w * c3.z) - c1.y * (c0.z * c3.w - c0.w * c3.z) + c3.y * (c0.z * c1.w - c0.w * c1.z); + int m03 = c0.y * (c1.z * c2.w - c1.w * c2.z) - c1.y * (c0.z * c2.w - c0.w * c2.z) + c2.y * (c0.z * c1.w - c0.w * c1.z); + + return c0.x * m00 - c1.x * m01 + c2.x * m02 - c3.x * m03; + } + + /// Returns a uint hash code of a int4x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(int4x4 v) + { + return csum(asuint(v.c0) * uint4(0x5D1B165Bu, 0x87096CD7u, 0x4C7F6DD1u, 0x4822A3E9u) + + asuint(v.c1) * uint4(0xAAC3C25Du, 0xD21D0945u, 0x88FCAB2Du, 0x614DA60Du) + + asuint(v.c2) * uint4(0x5BA2C50Bu, 0x8C455ACBu, 0xCD266C89u, 0xF1852A33u) + + asuint(v.c3) * uint4(0x77E35E77u, 0x863E3729u, 0xE191B035u, 0x68586FAFu)) + 0xD4DFF6D3u; + } + + /// + /// Returns a uint4 vector hash code of a int4x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(int4x4 v) + { + return (asuint(v.c0) * uint4(0xCB634F4Du, 0x9B13B92Du, 0x4ABF0813u, 0x86068063u) + + asuint(v.c1) * uint4(0xD75513F9u, 0x5AB3E8CDu, 0x676E8407u, 0xB36DE767u) + + asuint(v.c2) * uint4(0x6FCA387Du, 0xAF0F3103u, 0xE4A056C7u, 0x841D8225u) + + asuint(v.c3) * uint4(0xC9393C7Du, 0xD42EAFA3u, 0xD9AFD06Du, 0x97A65421u)) + 0x7809205Fu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/math.cs b/ThirdParty/Unity.Mathematics/math.cs new file mode 100644 index 0000000..a1b4800 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/math.cs @@ -0,0 +1,7261 @@ +using System; +using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +namespace Unity.Mathematics +{ + /// + /// A static class to contain various math functions and constants. + /// + [Il2CppEagerStaticClassConstruction] + public static partial class math + { + /// Extrinsic rotation order. Specifies in which order rotations around the principal axes (x, y and z) are to be applied. + public enum RotationOrder : byte + { + /// Extrinsic rotation around the x axis, then around the y axis and finally around the z axis. + XYZ, + /// Extrinsic rotation around the x axis, then around the z axis and finally around the y axis. + XZY, + /// Extrinsic rotation around the y axis, then around the x axis and finally around the z axis. + YXZ, + /// Extrinsic rotation around the y axis, then around the z axis and finally around the x axis. + YZX, + /// Extrinsic rotation around the z axis, then around the x axis and finally around the y axis. + ZXY, + /// Extrinsic rotation around the z axis, then around the y axis and finally around the x axis. + ZYX, + /// Unity default rotation order. Extrinsic Rotation around the z axis, then around the x axis and finally around the y axis. + Default = ZXY + }; + + /// Specifies a shuffle component. + public enum ShuffleComponent : byte + { + /// Specified the x component of the left vector. + LeftX, + /// Specified the y component of the left vector. + LeftY, + /// Specified the z component of the left vector. + LeftZ, + /// Specified the w component of the left vector. + LeftW, + + /// Specified the x component of the right vector. + RightX, + /// Specified the y component of the right vector. + RightY, + /// Specified the z component of the right vector. + RightZ, + /// Specified the w component of the right vector. + RightW + }; + + /// The mathematical constant e also known as Euler's number. Approximately 2.72. This is a f64/double precision constant. + public const double E_DBL = 2.71828182845904523536; + + /// The base 2 logarithm of e. Approximately 1.44. This is a f64/double precision constant. + public const double LOG2E_DBL = 1.44269504088896340736; + + /// The base 10 logarithm of e. Approximately 0.43. This is a f64/double precision constant. + public const double LOG10E_DBL = 0.434294481903251827651; + + /// The natural logarithm of 2. Approximately 0.69. This is a f64/double precision constant. + public const double LN2_DBL = 0.693147180559945309417; + + /// The natural logarithm of 10. Approximately 2.30. This is a f64/double precision constant. + public const double LN10_DBL = 2.30258509299404568402; + + /// The mathematical constant pi. Approximately 3.14. This is a f64/double precision constant. + public const double PI_DBL = 3.14159265358979323846; + + /// + /// The mathematical constant (2 * pi). Approximately 6.28. This is a f64/double precision constant. Also known as . + /// + public const double PI2_DBL = PI_DBL * 2.0; + + /// + /// The mathematical constant (pi / 2). Approximately 1.57. This is a f64/double precision constant. + /// + public const double PIHALF_DBL = PI_DBL * 0.5; + + /// + /// The mathematical constant tau. Approximately 6.28. This is a f64/double precision constant. Also known as . + /// + public const double TAU_DBL = PI2_DBL; + + /// + /// The conversion constant used to convert radians to degrees. Multiply the radian value by this constant to get degrees. + /// + /// Multiplying by this constant is equivalent to using . + public const double TODEGREES_DBL = 57.29577951308232; + + /// + /// The conversion constant used to convert degrees to radians. Multiply the degree value by this constant to get radians. + /// + /// Multiplying by this constant is equivalent to using . + public const double TORADIANS_DBL = 0.017453292519943296; + + /// The square root 2. Approximately 1.41. This is a f64/double precision constant. + public const double SQRT2_DBL = 1.41421356237309504880; + + /// + /// The difference between 1.0 and the next representable f64/double precision number. + /// + /// Beware: + /// This value is different from System.Double.Epsilon, which is the smallest, positive, denormalized f64/double. + /// + public const double EPSILON_DBL = 2.22044604925031308085e-16; + + /// + /// Double precision constant for positive infinity. + /// + public const double INFINITY_DBL = Double.PositiveInfinity; + + /// + /// Double precision constant for Not a Number. + /// + /// NAN_DBL is considered unordered, which means all comparisons involving it are false except for not equal (operator !=). + /// As a consequence, NAN_DBL == NAN_DBL is false but NAN_DBL != NAN_DBL is true. + /// + /// Additionally, there are multiple bit representations for Not a Number, so if you must test if your value + /// is NAN_DBL, use isnan(). + /// + public const double NAN_DBL = Double.NaN; + + /// The smallest positive normal number representable in a float. + public const float FLT_MIN_NORMAL = 1.175494351e-38F; + + /// The smallest positive normal number representable in a double. This is a f64/double precision constant. + public const double DBL_MIN_NORMAL = 2.2250738585072014e-308; + + /// The mathematical constant e also known as Euler's number. Approximately 2.72. + public const float E = (float)E_DBL; + + /// The base 2 logarithm of e. Approximately 1.44. + public const float LOG2E = (float)LOG2E_DBL; + + /// The base 10 logarithm of e. Approximately 0.43. + public const float LOG10E = (float)LOG10E_DBL; + + /// The natural logarithm of 2. Approximately 0.69. + public const float LN2 = (float)LN2_DBL; + + /// The natural logarithm of 10. Approximately 2.30. + public const float LN10 = (float)LN10_DBL; + + /// The mathematical constant pi. Approximately 3.14. + public const float PI = (float)PI_DBL; + + /// + /// The mathematical constant (2 * pi). Approximately 6.28. Also known as . + /// + public const float PI2 = (float)PI2_DBL; + + /// + /// The mathematical constant (pi / 2). Approximately 1.57. + /// + public const float PIHALF = (float)PIHALF_DBL; + + /// + /// The mathematical constant tau. Approximately 6.28. Also known as . + /// + public const float TAU = (float)PI2_DBL; + + /// + /// The conversion constant used to convert radians to degrees. Multiply the radian value by this constant to get degrees. + /// + /// Multiplying by this constant is equivalent to using . + public const float TODEGREES = (float)TODEGREES_DBL; + + /// + /// The conversion constant used to convert degrees to radians. Multiply the degree value by this constant to get radians. + /// + /// Multiplying by this constant is equivalent to using . + public const float TORADIANS = (float)TORADIANS_DBL; + + /// The square root 2. Approximately 1.41. + public const float SQRT2 = (float)SQRT2_DBL; + + /// + /// The difference between 1.0f and the next representable f32/single precision number. + /// + /// Beware: + /// This value is different from System.Single.Epsilon, which is the smallest, positive, denormalized f32/single. + /// + public const float EPSILON = 1.1920928955078125e-7f; + + /// + /// Single precision constant for positive infinity. + /// + public const float INFINITY = Single.PositiveInfinity; + + /// + /// Single precision constant for Not a Number. + /// + /// NAN is considered unordered, which means all comparisons involving it are false except for not equal (operator !=). + /// As a consequence, NAN == NAN is false but NAN != NAN is true. + /// + /// Additionally, there are multiple bit representations for Not a Number, so if you must test if your value + /// is NAN, use isnan(). + /// + public const float NAN = Single.NaN; + + /// Returns the bit pattern of a uint as an int. + /// The uint bits to copy. + /// The int with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int asint(uint x) + { + unsafe + { + return *(int*)&x; + } + } + + /// Returns the bit pattern of a uint2 as an int2. + /// The uint2 bits to copy. + /// The int2 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 asint(uint2 x) + { + unsafe + { + return *(int2*)&x; + } + } + + /// Returns the bit pattern of a uint3 as an int3. + /// The uint3 bits to copy. + /// The int3 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 asint(uint3 x) + { + unsafe + { + return *(int3*)&x; + } + } + + /// Returns the bit pattern of a uint4 as an int4. + /// The uint4 bits to copy. + /// The int4 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 asint(uint4 x) + { + unsafe + { + return *(int4*)&x; + } + } + + /// Returns the bit pattern of a float as an int. + /// The float bits to copy. + /// The int with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int asint(float x) + { + unsafe + { + return *(int*)&x; + } + } + + /// Returns the bit pattern of a float2 as an int2. + /// The float2 bits to copy. + /// The int2 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 asint(float2 x) + { + unsafe + { + return *(int2*)&x; + } + } + + /// Returns the bit pattern of a float3 as an int3. + /// The float3 bits to copy. + /// The int3 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 asint(float3 x) + { + unsafe + { + return *(int3*)&x; + } + } + + /// Returns the bit pattern of a float4 as an int4. + /// The float4 bits to copy. + /// The int4 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 asint(float4 x) + { + unsafe + { + return *(int4*)&x; + } + } + + /// Returns the bit pattern of an int as a uint. + /// The int bits to copy. + /// The uint with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint asuint(int x) { return (uint)x; } + + /// Returns the bit pattern of an int2 as a uint2. + /// The int2 bits to copy. + /// The uint2 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 asuint(int2 x) + { + unsafe + { + return *(uint2*)&x; + } + } + + /// Returns the bit pattern of an int3 as a uint3. + /// The int3 bits to copy. + /// The uint3 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 asuint(int3 x) + { + unsafe + { + return *(uint3*)&x; + } + } + + /// Returns the bit pattern of an int4 as a uint4. + /// The int4 bits to copy. + /// The uint4 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 asuint(int4 x) + { + unsafe + { + return *(uint4*)&x; + } + } + + /// Returns the bit pattern of a float as a uint. + /// The float bits to copy. + /// The uint with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint asuint(float x) + { + unsafe + { + return *(uint*)&x; + } + } + + /// Returns the bit pattern of a float2 as a uint2. + /// The float2 bits to copy. + /// The uint2 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 asuint(float2 x) + { + unsafe + { + return *(uint2*)&x; + } + } + + /// Returns the bit pattern of a float3 as a uint3. + /// The float3 bits to copy. + /// The uint3 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 asuint(float3 x) + { + unsafe + { + return *(uint3*)&x; + } + } + + /// Returns the bit pattern of a float4 as a uint4. + /// The float4 bits to copy. + /// The uint4 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 asuint(float4 x) + { + unsafe + { + return *(uint4*)&x; + } + } + + /// Returns the bit pattern of a ulong as a long. + /// The ulong bits to copy. + /// The long with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long aslong(ulong x) { return (long)x; } + + /// Returns the bit pattern of a double as a long. + /// The double bits to copy. + /// The long with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long aslong(double x) + { + unsafe + { + return *(long*)&x; + } + } + + /// Returns the bit pattern of a long as a ulong. + /// The long bits to copy. + /// The ulong with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong asulong(long x) { return (ulong)x; } + + /// Returns the bit pattern of a double as a ulong. + /// The double bits to copy. + /// The ulong with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong asulong(double x) + { + unsafe + { + return *(ulong*)&x; + } + } + + /// Returns the bit pattern of an int as a float. + /// The int bits to copy. + /// The float with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float asfloat(int x) + { + unsafe + { + return *(float*)&x; + } + } + + /// Returns the bit pattern of an int2 as a float2. + /// The int2 bits to copy. + /// The float2 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 asfloat(int2 x) + { + unsafe + { + return *(float2*)&x; + } + } + + /// Returns the bit pattern of an int3 as a float3. + /// The int3 bits to copy. + /// The float3 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 asfloat(int3 x) + { + unsafe + { + return *(float3*)&x; + } + } + + /// Returns the bit pattern of an int4 as a float4. + /// The int4 bits to copy. + /// The float4 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 asfloat(int4 x) + { + unsafe + { + return *(float4*)&x; + } + } + + /// Returns the bit pattern of a uint as a float. + /// The uint bits to copy. + /// The float with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float asfloat(uint x) + { + unsafe + { + return *(float*)&x; + } + } + + /// Returns the bit pattern of a uint2 as a float2. + /// The uint2 bits to copy. + /// The float2 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 asfloat(uint2 x) + { + unsafe + { + return *(float2*)&x; + } + } + + /// Returns the bit pattern of a uint3 as a float3. + /// The uint3 bits to copy. + /// The float3 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 asfloat(uint3 x) + { + unsafe + { + return *(float3*)&x; + } + } + + /// Returns the bit pattern of a uint4 as a float4. + /// The uint4 bits to copy. + /// The float4 with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 asfloat(uint4 x) + { + unsafe + { + return *(float4*)&x; + } + } + + /// + /// Returns a bitmask representation of a bool4. Storing one 1 bit per component + /// in LSB order, from lower to higher bits (so 4 bits in total). + /// The component x is stored at bit 0, + /// The component y is stored at bit 1, + /// The component z is stored at bit 2, + /// The component w is stored at bit 3 + /// The bool4(x = true, y = true, z = false, w = true) would produce the value 1011 = 0xB + /// + /// The input bool4 to calculate the bitmask for + /// A bitmask representation of the bool4, in LSB order + public static int bitmask(bool4 value) + { + int mask = 0; + if (value.x) mask |= 0x01; + if (value.y) mask |= 0x02; + if (value.z) mask |= 0x04; + if (value.w) mask |= 0x08; + return mask; + } + + /// Returns the bit pattern of a long as a double. + /// The long bits to copy. + /// The double with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double asdouble(long x) + { + unsafe + { + return *(double*)&x; + } + } + + /// Returns the bit pattern of a ulong as a double. + /// The ulong bits to copy. + /// The double with the same bit pattern as the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double asdouble(ulong x) + { + unsafe + { + return *(double*)&x; + } + } + + /// Returns true if the input float is a finite floating point value, false otherwise. + /// The float value to test. + /// True if the float is finite, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool isfinite(float x) { return abs(x) < float.PositiveInfinity; } + + /// Returns a bool2 indicating for each component of a float2 whether it is a finite floating point value. + /// The float2 value to test. + /// A bool2 where it is true in a component if that component is finite, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 isfinite(float2 x) { return abs(x) < float.PositiveInfinity; } + + /// Returns a bool3 indicating for each component of a float3 whether it is a finite floating point value. + /// The float3 value to test. + /// A bool3 where it is true in a component if that component is finite, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 isfinite(float3 x) { return abs(x) < float.PositiveInfinity; } + + /// Returns a bool4 indicating for each component of a float4 whether it is a finite floating point value. + /// The float4 value to test. + /// A bool4 where it is true in a component if that component is finite, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 isfinite(float4 x) { return abs(x) < float.PositiveInfinity; } + + + /// Returns true if the input double is a finite floating point value, false otherwise. + /// The double value to test. + /// True if the double is finite, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool isfinite(double x) { return abs(x) < double.PositiveInfinity; } + + /// Returns a bool2 indicating for each component of a double2 whether it is a finite floating point value. + /// The double2 value to test. + /// A bool2 where it is true in a component if that component is finite, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 isfinite(double2 x) { return abs(x) < double.PositiveInfinity; } + + /// Returns a bool3 indicating for each component of a double3 whether it is a finite floating point value. + /// The double3 value to test. + /// A bool3 where it is true in a component if that component is finite, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 isfinite(double3 x) { return abs(x) < double.PositiveInfinity; } + + /// Returns a bool4 indicating for each component of a double4 whether it is a finite floating point value. + /// The double4 value to test. + /// A bool4 where it is true in a component if that component is finite, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 isfinite(double4 x) { return abs(x) < double.PositiveInfinity; } + + + /// Returns true if the input float is an infinite floating point value, false otherwise. + /// Input value. + /// True if the input was an infinite value; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool isinf(float x) { return abs(x) == float.PositiveInfinity; } + + /// Returns a bool2 indicating for each component of a float2 whether it is an infinite floating point value. + /// Input value. + /// True if the component was an infinite value; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 isinf(float2 x) { return abs(x) == float.PositiveInfinity; } + + /// Returns a bool3 indicating for each component of a float3 whether it is an infinite floating point value. + /// Input value. + /// True if the component was an infinite value; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 isinf(float3 x) { return abs(x) == float.PositiveInfinity; } + + /// Returns a bool4 indicating for each component of a float4 whether it is an infinite floating point value. + /// Input value. + /// True if the component was an infinite value; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 isinf(float4 x) { return abs(x) == float.PositiveInfinity; } + + /// Returns true if the input double is an infinite floating point value, false otherwise. + /// Input value. + /// True if the input was an infinite value; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool isinf(double x) { return abs(x) == double.PositiveInfinity; } + + /// Returns a bool2 indicating for each component of a double2 whether it is an infinite floating point value. + /// Input value. + /// True if the component was an infinite value; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 isinf(double2 x) { return abs(x) == double.PositiveInfinity; } + + /// Returns a bool3 indicating for each component of a double3 whether it is an infinite floating point value. + /// Input value. + /// True if the component was an infinite value; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 isinf(double3 x) { return abs(x) == double.PositiveInfinity; } + + /// Returns a bool4 indicating for each component of a double4 whether it is an infinite floating point value. + /// Input value. + /// True if the component was an infinite value; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 isinf(double4 x) { return abs(x) == double.PositiveInfinity; } + + + /// Returns true if the input float is a NaN (not a number) floating point value, false otherwise. + /// + /// NaN has several representations and may vary across architectures. Use this function to check if you have a NaN. + /// + /// Input value. + /// True if the value was NaN; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool isnan(float x) { return (asuint(x) & 0x7FFFFFFF) > 0x7F800000; } + + /// Returns a bool2 indicating for each component of a float2 whether it is a NaN (not a number) floating point value. + /// + /// NaN has several representations and may vary across architectures. Use this function to check if you have a NaN. + /// + /// Input value. + /// True if the component was NaN; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 isnan(float2 x) { return (asuint(x) & 0x7FFFFFFF) > 0x7F800000; } + + /// Returns a bool3 indicating for each component of a float3 whether it is a NaN (not a number) floating point value. + /// + /// NaN has several representations and may vary across architectures. Use this function to check if you have a NaN. + /// + /// Input value. + /// True if the component was NaN; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 isnan(float3 x) { return (asuint(x) & 0x7FFFFFFF) > 0x7F800000; } + + /// Returns a bool4 indicating for each component of a float4 whether it is a NaN (not a number) floating point value. + /// + /// NaN has several representations and may vary across architectures. Use this function to check if you have a NaN. + /// + /// Input value. + /// True if the component was NaN; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 isnan(float4 x) { return (asuint(x) & 0x7FFFFFFF) > 0x7F800000; } + + + /// Returns true if the input double is a NaN (not a number) floating point value, false otherwise. + /// + /// NaN has several representations and may vary across architectures. Use this function to check if you have a NaN. + /// + /// Input value. + /// True if the value was NaN; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool isnan(double x) { return (asulong(x) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000; } + + /// Returns a bool2 indicating for each component of a double2 whether it is a NaN (not a number) floating point value. + /// + /// NaN has several representations and may vary across architectures. Use this function to check if you have a NaN. + /// + /// Input value. + /// True if the component was NaN; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 isnan(double2 x) { + return bool2((asulong(x.x) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000, + (asulong(x.y) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000); + } + + /// Returns a bool3 indicating for each component of a double3 whether it is a NaN (not a number) floating point value. + /// + /// NaN has several representations and may vary across architectures. Use this function to check if you have a NaN. + /// + /// Input value. + /// True if the component was NaN; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 isnan(double3 x) + { + return bool3((asulong(x.x) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000, + (asulong(x.y) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000, + (asulong(x.z) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000); + } + + /// Returns a bool4 indicating for each component of a double4 whether it is a NaN (not a number) floating point value. + /// + /// NaN has several representations and may vary across architectures. Use this function to check if you have a NaN. + /// + /// Input value. + /// True if the component was NaN; false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 isnan(double4 x) + { + return bool4((asulong(x.x) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000, + (asulong(x.y) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000, + (asulong(x.z) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000, + (asulong(x.w) & 0x7FFFFFFFFFFFFFFF) > 0x7FF0000000000000); + } + + /// + /// Checks if the input is a power of two. + /// + /// If x is less than or equal to zero, then this function returns false. + /// Integer input. + /// bool where true indicates that input was a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool ispow2(int x) + { + return x > 0 && ((x & (x - 1)) == 0); + } + + /// + /// Checks if each component of the input is a power of two. + /// + /// If a component of x is less than or equal to zero, then this function returns false in that component. + /// int2 input + /// bool2 where true in a component indicates the same component in the input was a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 ispow2(int2 x) + { + return new bool2(ispow2(x.x), ispow2(x.y)); + } + + /// + /// Checks if each component of the input is a power of two. + /// + /// If a component of x is less than or equal to zero, then this function returns false in that component. + /// int3 input + /// bool3 where true in a component indicates the same component in the input was a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 ispow2(int3 x) + { + return new bool3(ispow2(x.x), ispow2(x.y), ispow2(x.z)); + } + + /// + /// Checks if each component of the input is a power of two. + /// + /// If a component of x is less than or equal to zero, then this function returns false in that component. + /// int4 input + /// bool4 where true in a component indicates the same component in the input was a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 ispow2(int4 x) + { + return new bool4(ispow2(x.x), ispow2(x.y), ispow2(x.z), ispow2(x.w)); + } + + /// + /// Checks if the input is a power of two. + /// + /// If x is less than or equal to zero, then this function returns false. + /// Unsigned integer input. + /// bool where true indicates that input was a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool ispow2(uint x) + { + return x > 0 && ((x & (x - 1)) == 0); + } + + /// + /// Checks if each component of the input is a power of two. + /// + /// If a component of x is less than or equal to zero, then this function returns false in that component. + /// uint2 input + /// bool2 where true in a component indicates the same component in the input was a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 ispow2(uint2 x) + { + return new bool2(ispow2(x.x), ispow2(x.y)); + } + + /// + /// Checks if each component of the input is a power of two. + /// + /// If a component of x is less than or equal to zero, then this function returns false in that component. + /// uint3 input + /// bool3 where true in a component indicates the same component in the input was a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 ispow2(uint3 x) + { + return new bool3(ispow2(x.x), ispow2(x.y), ispow2(x.z)); + } + + /// + /// Checks if each component of the input is a power of two. + /// + /// If a component of x is less than or equal to zero, then this function returns false in that component. + /// uint4 input + /// bool4 where true in a component indicates the same component in the input was a power of two. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 ispow2(uint4 x) + { + return new bool4(ispow2(x.x), ispow2(x.y), ispow2(x.z), ispow2(x.w)); + } + + /// Returns the minimum of two int values. + /// The first input value. + /// The second input value. + /// The minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int min(int x, int y) { return x < y ? x : y; } + + /// Returns the componentwise minimum of two int2 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 min(int2 x, int2 y) { return new int2(min(x.x, y.x), min(x.y, y.y)); } + + /// Returns the componentwise minimum of two int3 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 min(int3 x, int3 y) { return new int3(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z)); } + + /// Returns the componentwise minimum of two int4 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 min(int4 x, int4 y) { return new int4(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z), min(x.w, y.w)); } + + + /// Returns the minimum of two uint values. + /// The first input value. + /// The second input value. + /// The minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint min(uint x, uint y) { return x < y ? x : y; } + + /// Returns the componentwise minimum of two uint2 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 min(uint2 x, uint2 y) { return new uint2(min(x.x, y.x), min(x.y, y.y)); } + + /// Returns the componentwise minimum of two uint3 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 min(uint3 x, uint3 y) { return new uint3(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z)); } + + /// Returns the componentwise minimum of two uint4 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 min(uint4 x, uint4 y) { return new uint4(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z), min(x.w, y.w)); } + + + /// Returns the minimum of two long values. + /// The first input value. + /// The second input value. + /// The minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long min(long x, long y) { return x < y ? x : y; } + + + /// Returns the minimum of two ulong values. + /// The first input value. + /// The second input value. + /// The minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong min(ulong x, ulong y) { return x < y ? x : y; } + + + /// Returns the minimum of two float values. + /// The first input value. + /// The second input value. + /// The minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float min(float x, float y) { return float.IsNaN(y) || x < y ? x : y; } + + /// Returns the componentwise minimum of two float2 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 min(float2 x, float2 y) { return new float2(min(x.x, y.x), min(x.y, y.y)); } + + /// Returns the componentwise minimum of two float3 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 min(float3 x, float3 y) { return new float3(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z)); } + + /// Returns the componentwise minimum of two float4 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 min(float4 x, float4 y) { return new float4(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z), min(x.w, y.w)); } + + + /// Returns the minimum of two double values. + /// The first input value. + /// The second input value. + /// The minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double min(double x, double y) { return double.IsNaN(y) || x < y ? x : y; } + + /// Returns the componentwise minimum of two double2 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 min(double2 x, double2 y) { return new double2(min(x.x, y.x), min(x.y, y.y)); } + + /// Returns the componentwise minimum of two double3 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 min(double3 x, double3 y) { return new double3(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z)); } + + /// Returns the componentwise minimum of two double4 vectors. + /// The first input value. + /// The second input value. + /// The componentwise minimum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 min(double4 x, double4 y) { return new double4(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z), min(x.w, y.w)); } + + + /// Returns the maximum of two int values. + /// The first input value. + /// The second input value. + /// The maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int max(int x, int y) { return x > y ? x : y; } + + /// Returns the componentwise maximum of two int2 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 max(int2 x, int2 y) { return new int2(max(x.x, y.x), max(x.y, y.y)); } + + /// Returns the componentwise maximum of two int3 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 max(int3 x, int3 y) { return new int3(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z)); } + + /// Returns the componentwise maximum of two int4 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 max(int4 x, int4 y) { return new int4(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z), max(x.w, y.w)); } + + + /// Returns the maximum of two uint values. + /// The first input value. + /// The second input value. + /// The maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint max(uint x, uint y) { return x > y ? x : y; } + + /// Returns the componentwise maximum of two uint2 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 max(uint2 x, uint2 y) { return new uint2(max(x.x, y.x), max(x.y, y.y)); } + + /// Returns the componentwise maximum of two uint3 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 max(uint3 x, uint3 y) { return new uint3(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z)); } + + /// Returns the componentwise maximum of two uint4 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 max(uint4 x, uint4 y) { return new uint4(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z), max(x.w, y.w)); } + + + /// Returns the maximum of two long values. + /// The first input value. + /// The second input value. + /// The maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long max(long x, long y) { return x > y ? x : y; } + + + /// Returns the maximum of two ulong values. + /// The first input value. + /// The second input value. + /// The maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong max(ulong x, ulong y) { return x > y ? x : y; } + + + /// Returns the maximum of two float values. + /// The first input value. + /// The second input value. + /// The maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float max(float x, float y) { return float.IsNaN(y) || x > y ? x : y; } + + /// Returns the componentwise maximum of two float2 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 max(float2 x, float2 y) { return new float2(max(x.x, y.x), max(x.y, y.y)); } + + /// Returns the componentwise maximum of two float3 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 max(float3 x, float3 y) { return new float3(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z)); } + + /// Returns the componentwise maximum of two float4 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 max(float4 x, float4 y) { return new float4(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z), max(x.w, y.w)); } + + + /// Returns the maximum of two double values. + /// The first input value. + /// The second input value. + /// The maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double max(double x, double y) { return double.IsNaN(y) || x > y ? x : y; } + + /// Returns the componentwise maximum of two double2 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 max(double2 x, double2 y) { return new double2(max(x.x, y.x), max(x.y, y.y)); } + + /// Returns the componentwise maximum of two double3 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 max(double3 x, double3 y) { return new double3(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z)); } + + /// Returns the componentwise maximum of two double4 vectors. + /// The first input value. + /// The second input value. + /// The componentwise maximum of the two input values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 max(double4 x, double4 y) { return new double4(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z), max(x.w, y.w)); } + + + /// Returns the result of linearly interpolating from start to end using the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The interpolation from start to end. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float lerp(float start, float end, float t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 lerp(float2 start, float2 end, float t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 lerp(float3 start, float3 end, float t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 lerp(float4 start, float4 end, float t) { return start + t * (end - start); } + + + /// Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 lerp(float2 start, float2 end, float2 t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 lerp(float3 start, float3 end, float3 t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 lerp(float4 start, float4 end, float4 t) { return start + t * (end - start); } + + + /// Returns the result of linearly interpolating from x to y using the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double lerp(double start, double end, double t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 lerp(double2 start, double2 end, double t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 lerp(double3 start, double3 end, double t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 lerp(double4 start, double4 end, double t) { return start + t * (end - start); } + + + /// Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 lerp(double2 start, double2 end, double2 t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 lerp(double3 start, double3 end, double3 t) { return start + t * (end - start); } + + /// Returns the result of a componentwise linear interpolating from x to y using the corresponding components of the interpolation parameter t. + /// + /// If the interpolation parameter is not in the range [0, 1], then this function extrapolates. + /// + /// The start point, corresponding to the interpolation parameter value of 0. + /// The end point, corresponding to the interpolation parameter value of 1. + /// The interpolation parameter. May be a value outside the interval [0, 1]. + /// The componentwise interpolation from x to y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 lerp(double4 start, double4 end, double4 t) { return start + t * (end - start); } + + + /// Returns the result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a). + /// The start point of the range. + /// The end point of the range. + /// The value to normalize to the range. + /// The interpolation parameter of x with respect to the input range [a, b]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float unlerp(float start, float end, float x) { return (x - start) / (end - start); } + + /// Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a). + /// The start point of the range. + /// The end point of the range. + /// The value to normalize to the range. + /// The componentwise interpolation parameter of x with respect to the input range [a, b]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 unlerp(float2 start, float2 end, float2 x) { return (x - start) / (end - start); } + + /// Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a). + /// The start point of the range. + /// The end point of the range. + /// The value to normalize to the range. + /// The componentwise interpolation parameter of x with respect to the input range [a, b]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 unlerp(float3 start, float3 end, float3 x) { return (x - start) / (end - start); } + + /// Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a). + /// The start point of the range. + /// The end point of the range. + /// The value to normalize to the range. + /// The componentwise interpolation parameter of x with respect to the input range [a, b]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 unlerp(float4 start, float4 end, float4 x) { return (x - start) / (end - start); } + + + /// Returns the result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a). + /// The start point of the range. + /// The end point of the range. + /// The value to normalize to the range. + /// The interpolation parameter of x with respect to the input range [a, b]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double unlerp(double start, double end, double x) { return (x - start) / (end - start); } + + /// Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a). + /// The start point of the range. + /// The end point of the range. + /// The value to normalize to the range. + /// The componentwise interpolation parameter of x with respect to the input range [a, b]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 unlerp(double2 start, double2 end, double2 x) { return (x - start) / (end - start); } + + /// Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a). + /// The start point of the range. + /// The end point of the range. + /// The value to normalize to the range. + /// The componentwise interpolation parameter of x with respect to the input range [a, b]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 unlerp(double3 start, double3 end, double3 x) { return (x - start) / (end - start); } + + /// Returns the componentwise result of normalizing a floating point value x to a range [a, b]. The opposite of lerp. Equivalent to (x - a) / (b - a). + /// The start point of the range. + /// The end point of the range. + /// The value to normalize to the range. + /// The componentwise interpolation parameter of x with respect to the input range [a, b]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 unlerp(double4 start, double4 end, double4 x) { return (x - start) / (end - start); } + + + /// Returns the result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd]. + /// The start point of the source range [srcStart, srcEnd]. + /// The end point of the source range [srcStart, srcEnd]. + /// The start point of the destination range [dstStart, dstEnd]. + /// The end point of the destination range [dstStart, dstEnd]. + /// The value to remap from the source to destination range. + /// The remap of input x from the source range to the destination range. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float remap(float srcStart, float srcEnd, float dstStart, float dstEnd, float x) { return lerp(dstStart, dstEnd, unlerp(srcStart, srcEnd, x)); } + + /// Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd]. + /// The start point of the source range [srcStart, srcEnd]. + /// The end point of the source range [srcStart, srcEnd]. + /// The start point of the destination range [dstStart, dstEnd]. + /// The end point of the destination range [dstStart, dstEnd]. + /// The value to remap from the source to destination range. + /// The componentwise remap of input x from the source range to the destination range. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 remap(float2 srcStart, float2 srcEnd, float2 dstStart, float2 dstEnd, float2 x) { return lerp(dstStart, dstEnd, unlerp(srcStart, srcEnd, x)); } + + /// Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd]. + /// The start point of the source range [srcStart, srcEnd]. + /// The end point of the source range [srcStart, srcEnd]. + /// The start point of the destination range [dstStart, dstEnd]. + /// The end point of the destination range [dstStart, dstEnd]. + /// The value to remap from the source to destination range. + /// The componentwise remap of input x from the source range to the destination range. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 remap(float3 srcStart, float3 srcEnd, float3 dstStart, float3 dstEnd, float3 x) { return lerp(dstStart, dstEnd, unlerp(srcStart, srcEnd, x)); } + + /// Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd]. + /// The start point of the source range [srcStart, srcEnd]. + /// The end point of the source range [srcStart, srcEnd]. + /// The start point of the destination range [dstStart, dstEnd]. + /// The end point of the destination range [dstStart, dstEnd]. + /// The value to remap from the source to destination range. + /// The componentwise remap of input x from the source range to the destination range. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 remap(float4 srcStart, float4 srcEnd, float4 dstStart, float4 dstEnd, float4 x) { return lerp(dstStart, dstEnd, unlerp(srcStart, srcEnd, x)); } + + + /// Returns the result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd]. + /// The start point of the source range [srcStart, srcEnd]. + /// The end point of the source range [srcStart, srcEnd]. + /// The start point of the destination range [dstStart, dstEnd]. + /// The end point of the destination range [dstStart, dstEnd]. + /// The value to remap from the source to destination range. + /// The remap of input x from the source range to the destination range. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double remap(double srcStart, double srcEnd, double dstStart, double dstEnd, double x) { return lerp(dstStart, dstEnd, unlerp(srcStart, srcEnd, x)); } + + /// Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd]. + /// The start point of the source range [srcStart, srcEnd]. + /// The end point of the source range [srcStart, srcEnd]. + /// The start point of the destination range [dstStart, dstEnd]. + /// The end point of the destination range [dstStart, dstEnd]. + /// The value to remap from the source to destination range. + /// The componentwise remap of input x from the source range to the destination range. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 remap(double2 srcStart, double2 srcEnd, double2 dstStart, double2 dstEnd, double2 x) { return lerp(dstStart, dstEnd, unlerp(srcStart, srcEnd, x)); } + + /// Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd]. + /// The start point of the source range [srcStart, srcEnd]. + /// The end point of the source range [srcStart, srcEnd]. + /// The start point of the destination range [dstStart, dstEnd]. + /// The end point of the destination range [dstStart, dstEnd]. + /// The value to remap from the source to destination range. + /// The componentwise remap of input x from the source range to the destination range. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 remap(double3 srcStart, double3 srcEnd, double3 dstStart, double3 dstEnd, double3 x) { return lerp(dstStart, dstEnd, unlerp(srcStart, srcEnd, x)); } + + /// Returns the componentwise result of a non-clamping linear remapping of a value x from source range [srcStart, srcEnd] to the destination range [dstStart, dstEnd]. + /// The start point of the source range [srcStart, srcEnd]. + /// The end point of the source range [srcStart, srcEnd]. + /// The start point of the destination range [dstStart, dstEnd]. + /// The end point of the destination range [dstStart, dstEnd]. + /// The value to remap from the source to destination range. + /// The componentwise remap of input x from the source range to the destination range. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 remap(double4 srcStart, double4 srcEnd, double4 dstStart, double4 dstEnd, double4 x) { return lerp(dstStart, dstEnd, unlerp(srcStart, srcEnd, x)); } + + + /// Returns the result of a multiply-add operation (a * b + c) on 3 int values. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int mad(int mulA, int mulB, int addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 int2 vectors. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 mad(int2 mulA, int2 mulB, int2 addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 int3 vectors. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 mad(int3 mulA, int3 mulB, int3 addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 int4 vectors. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 mad(int4 mulA, int4 mulB, int4 addC) { return mulA * mulB + addC; } + + + /// Returns the result of a multiply-add operation (a * b + c) on 3 uint values. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint mad(uint mulA, uint mulB, uint addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 uint2 vectors. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 mad(uint2 mulA, uint2 mulB, uint2 addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 uint3 vectors. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 mad(uint3 mulA, uint3 mulB, uint3 addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 uint4 vectors. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 mad(uint4 mulA, uint4 mulB, uint4 addC) { return mulA * mulB + addC; } + + + /// Returns the result of a multiply-add operation (a * b + c) on 3 long values. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long mad(long mulA, long mulB, long addC) { return mulA * mulB + addC; } + + + /// Returns the result of a multiply-add operation (a * b + c) on 3 ulong values. + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong mad(ulong mulA, ulong mulB, ulong addC) { return mulA * mulB + addC; } + + + /// Returns the result of a multiply-add operation (a * b + c) on 3 float values. + /// + /// When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). + /// FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when + /// this computation is not fused. + /// + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float mad(float mulA, float mulB, float addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 float2 vectors. + /// + /// When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). + /// FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when + /// this computation is not fused. + /// + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 mad(float2 mulA, float2 mulB, float2 addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 float3 vectors. + /// + /// When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). + /// FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when + /// this computation is not fused. + /// + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 mad(float3 mulA, float3 mulB, float3 addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 float4 vectors. + /// + /// When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). + /// FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when + /// this computation is not fused. + /// + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mad(float4 mulA, float4 mulB, float4 addC) { return mulA * mulB + addC; } + + + /// Returns the result of a multiply-add operation (a * b + c) on 3 double values. + /// + /// When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). + /// FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when + /// this computation is not fused. + /// + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double mad(double mulA, double mulB, double addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 double2 vectors. + /// + /// When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). + /// FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when + /// this computation is not fused. + /// + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 mad(double2 mulA, double2 mulB, double2 addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 double3 vectors. + /// + /// When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). + /// FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when + /// this computation is not fused. + /// + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 mad(double3 mulA, double3 mulB, double3 addC) { return mulA * mulB + addC; } + + /// Returns the result of a componentwise multiply-add operation (a * b + c) on 3 double4 vectors. + /// + /// When Burst compiled with fast math enabled on some architectures, this could be converted to a fused multiply add (FMA). + /// FMA is more accurate due to rounding once at the end of the computation rather than twice that is required when + /// this computation is not fused. + /// + /// First value to multiply. + /// Second value to multiply. + /// Third value to add to the product of a and b. + /// The componentwise multiply-add of the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 mad(double4 mulA, double4 mulB, double4 addC) { return mulA * mulB + addC; } + + + /// Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are int values. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int clamp(int valueToClamp, int lowerBound, int upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the int2 x into the interval [a, b], where a and b are int2 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 clamp(int2 valueToClamp, int2 lowerBound, int2 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the int3 x into the interval [a, b], where x, a and b are int3 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 clamp(int3 valueToClamp, int3 lowerBound, int3 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are int4 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 clamp(int4 valueToClamp, int4 lowerBound, int4 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + + /// Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are uint values. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint clamp(uint valueToClamp, uint lowerBound, uint upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are uint2 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 clamp(uint2 valueToClamp, uint2 lowerBound, uint2 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are uint3 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 clamp(uint3 valueToClamp, uint3 lowerBound, uint3 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are uint4 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 clamp(uint4 valueToClamp, uint4 lowerBound, uint4 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + + /// Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are long values. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long clamp(long valueToClamp, long lowerBound, long upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are ulong values. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong clamp(ulong valueToClamp, ulong lowerBound, ulong upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + + /// Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are float values. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float clamp(float valueToClamp, float lowerBound, float upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are float2 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 clamp(float2 valueToClamp, float2 lowerBound, float2 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are float3 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 clamp(float3 valueToClamp, float3 lowerBound, float3 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are float4 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 clamp(float4 valueToClamp, float4 lowerBound, float4 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + + /// Returns the result of clamping the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are double values. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double clamp(double valueToClamp, double lowerBound, double upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are double2 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 clamp(double2 valueToClamp, double2 lowerBound, double2 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are double3 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 clamp(double3 valueToClamp, double3 lowerBound, double3 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + /// Returns the result of a componentwise clamping of the value valueToClamp into the interval (inclusive) [lowerBound, upperBound], where valueToClamp, lowerBound and upperBound are double4 vectors. + /// Input value to be clamped. + /// Lower bound of the interval. + /// Upper bound of the interval. + /// The componentwise clamping of the input valueToClamp into the interval (inclusive) [lowerBound, upperBound]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 clamp(double4 valueToClamp, double4 lowerBound, double4 upperBound) { return max(lowerBound, min(upperBound, valueToClamp)); } + + + /// Returns the result of clamping the float value x into the interval [0, 1]. + /// Input value. + /// The clamping of the input into the interval [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float saturate(float x) { return clamp(x, 0.0f, 1.0f); } + + /// Returns the result of a componentwise clamping of the float2 vector x into the interval [0, 1]. + /// Input value. + /// The componentwise clamping of the input into the interval [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 saturate(float2 x) { return clamp(x, new float2(0.0f), new float2(1.0f)); } + + /// Returns the result of a componentwise clamping of the float3 vector x into the interval [0, 1]. + /// Input value. + /// The componentwise clamping of the input into the interval [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 saturate(float3 x) { return clamp(x, new float3(0.0f), new float3(1.0f)); } + + /// Returns the result of a componentwise clamping of the float4 vector x into the interval [0, 1]. + /// Input value. + /// The componentwise clamping of the input into the interval [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 saturate(float4 x) { return clamp(x, new float4(0.0f), new float4(1.0f)); } + + + /// Returns the result of clamping the double value x into the interval [0, 1]. + /// Input value. + /// The clamping of the input into the interval [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double saturate(double x) { return clamp(x, 0.0, 1.0); } + + /// Returns the result of a componentwise clamping of the double2 vector x into the interval [0, 1]. + /// Input value. + /// The componentwise clamping of the input into the interval [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 saturate(double2 x) { return clamp(x, new double2(0.0), new double2(1.0)); } + + /// Returns the result of a componentwise clamping of the double3 vector x into the interval [0, 1]. + /// Input value. + /// The componentwise clamping of the input into the interval [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 saturate(double3 x) { return clamp(x, new double3(0.0), new double3(1.0)); } + + /// Returns the result of a componentwise clamping of the double4 vector x into the interval [0, 1]. + /// Input value. + /// The componentwise clamping of the input into the interval [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 saturate(double4 x) { return clamp(x, new double4(0.0), new double4(1.0)); } + + + /// Returns the absolute value of a int value. + /// Input value. + /// The absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int abs(int x) { return max(-x, x); } + + /// Returns the componentwise absolute value of a int2 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 abs(int2 x) { return max(-x, x); } + + /// Returns the componentwise absolute value of a int3 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 abs(int3 x) { return max(-x, x); } + + /// Returns the componentwise absolute value of a int4 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 abs(int4 x) { return max(-x, x); } + + /// Returns the absolute value of a long value. + /// Input value. + /// The absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long abs(long x) { return max(-x, x); } + + + /// Returns the absolute value of a float value. + /// Input value. + /// The absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float abs(float x) { return asfloat(asuint(x) & 0x7FFFFFFF); } + + /// Returns the componentwise absolute value of a float2 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 abs(float2 x) { return asfloat(asuint(x) & 0x7FFFFFFF); } + + /// Returns the componentwise absolute value of a float3 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 abs(float3 x) { return asfloat(asuint(x) & 0x7FFFFFFF); } + + /// Returns the componentwise absolute value of a float4 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 abs(float4 x) { return asfloat(asuint(x) & 0x7FFFFFFF); } + + + /// Returns the absolute value of a double value. + /// Input value. + /// The absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double abs(double x) { return asdouble(asulong(x) & 0x7FFFFFFFFFFFFFFF); } + + /// Returns the componentwise absolute value of a double2 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 abs(double2 x) { return double2(asdouble(asulong(x.x) & 0x7FFFFFFFFFFFFFFF), asdouble(asulong(x.y) & 0x7FFFFFFFFFFFFFFF)); } + + /// Returns the componentwise absolute value of a double3 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 abs(double3 x) { return double3(asdouble(asulong(x.x) & 0x7FFFFFFFFFFFFFFF), asdouble(asulong(x.y) & 0x7FFFFFFFFFFFFFFF), asdouble(asulong(x.z) & 0x7FFFFFFFFFFFFFFF)); } + + /// Returns the componentwise absolute value of a double4 vector. + /// Input value. + /// The componentwise absolute value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 abs(double4 x) { return double4(asdouble(asulong(x.x) & 0x7FFFFFFFFFFFFFFF), asdouble(asulong(x.y) & 0x7FFFFFFFFFFFFFFF), asdouble(asulong(x.z) & 0x7FFFFFFFFFFFFFFF), asdouble(asulong(x.w) & 0x7FFFFFFFFFFFFFFF)); } + + + /// Returns the dot product of two int values. Equivalent to multiplication. + /// The first value. + /// The second value. + /// The dot product of two values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int dot(int x, int y) { return x * y; } + + /// Returns the dot product of two int2 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int dot(int2 x, int2 y) { return x.x * y.x + x.y * y.y; } + + /// Returns the dot product of two int3 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int dot(int3 x, int3 y) { return x.x * y.x + x.y * y.y + x.z * y.z; } + + /// Returns the dot product of two int4 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int dot(int4 x, int4 y) { return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; } + + + /// Returns the dot product of two uint values. Equivalent to multiplication. + /// The first value. + /// The second value. + /// The dot product of two values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint dot(uint x, uint y) { return x * y; } + + /// Returns the dot product of two uint2 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint dot(uint2 x, uint2 y) { return x.x * y.x + x.y * y.y; } + + /// Returns the dot product of two uint3 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint dot(uint3 x, uint3 y) { return x.x * y.x + x.y * y.y + x.z * y.z; } + + /// Returns the dot product of two uint4 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint dot(uint4 x, uint4 y) { return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; } + + + /// Returns the dot product of two float values. Equivalent to multiplication. + /// The first value. + /// The second value. + /// The dot product of two values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float dot(float x, float y) { return x * y; } + + /// Returns the dot product of two float2 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float dot(float2 x, float2 y) { return x.x * y.x + x.y * y.y; } + + /// Returns the dot product of two float3 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float dot(float3 x, float3 y) { return x.x * y.x + x.y * y.y + x.z * y.z; } + + /// Returns the dot product of two float4 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float dot(float4 x, float4 y) { return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; } + + + /// Returns the dot product of two double values. Equivalent to multiplication. + /// The first value. + /// The second value. + /// The dot product of two values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double dot(double x, double y) { return x * y; } + + /// Returns the dot product of two double2 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double dot(double2 x, double2 y) { return x.x * y.x + x.y * y.y; } + + /// Returns the dot product of two double3 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double dot(double3 x, double3 y) { return x.x * y.x + x.y * y.y + x.z * y.z; } + + /// Returns the dot product of two double4 vectors. + /// The first vector. + /// The second vector. + /// The dot product of two vectors. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double dot(double4 x, double4 y) { return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; } + + + /// Returns the tangent of a float value. + /// Input value. + /// The tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float tan(float x) { return (float)System.Math.Tan(x); } + + /// Returns the componentwise tangent of a float2 vector. + /// Input value. + /// The componentwise tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 tan(float2 x) { return new float2(tan(x.x), tan(x.y)); } + + /// Returns the componentwise tangent of a float3 vector. + /// Input value. + /// The componentwise tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 tan(float3 x) { return new float3(tan(x.x), tan(x.y), tan(x.z)); } + + /// Returns the componentwise tangent of a float4 vector. + /// Input value. + /// The componentwise tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 tan(float4 x) { return new float4(tan(x.x), tan(x.y), tan(x.z), tan(x.w)); } + + + /// Returns the tangent of a double value. + /// Input value. + /// The tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double tan(double x) { return System.Math.Tan(x); } + + /// Returns the componentwise tangent of a double2 vector. + /// Input value. + /// The componentwise tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 tan(double2 x) { return new double2(tan(x.x), tan(x.y)); } + + /// Returns the componentwise tangent of a double3 vector. + /// Input value. + /// The componentwise tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 tan(double3 x) { return new double3(tan(x.x), tan(x.y), tan(x.z)); } + + /// Returns the componentwise tangent of a double4 vector. + /// Input value. + /// The componentwise tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 tan(double4 x) { return new double4(tan(x.x), tan(x.y), tan(x.z), tan(x.w)); } + + + /// Returns the hyperbolic tangent of a float value. + /// Input value. + /// The hyperbolic tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float tanh(float x) { return (float)System.Math.Tanh(x); } + + /// Returns the componentwise hyperbolic tangent of a float2 vector. + /// Input value. + /// The componentwise hyperbolic tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 tanh(float2 x) { return new float2(tanh(x.x), tanh(x.y)); } + + /// Returns the componentwise hyperbolic tangent of a float3 vector. + /// Input value. + /// The componentwise hyperbolic tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 tanh(float3 x) { return new float3(tanh(x.x), tanh(x.y), tanh(x.z)); } + + /// Returns the componentwise hyperbolic tangent of a float4 vector. + /// Input value. + /// The componentwise hyperbolic tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 tanh(float4 x) { return new float4(tanh(x.x), tanh(x.y), tanh(x.z), tanh(x.w)); } + + + /// Returns the hyperbolic tangent of a double value. + /// Input value. + /// The hyperbolic tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double tanh(double x) { return System.Math.Tanh(x); } + + /// Returns the componentwise hyperbolic tangent of a double2 vector. + /// Input value. + /// The componentwise hyperbolic tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 tanh(double2 x) { return new double2(tanh(x.x), tanh(x.y)); } + + /// Returns the componentwise hyperbolic tangent of a double3 vector. + /// Input value. + /// The componentwise hyperbolic tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 tanh(double3 x) { return new double3(tanh(x.x), tanh(x.y), tanh(x.z)); } + + /// Returns the componentwise hyperbolic tangent of a double4 vector. + /// Input value. + /// The componentwise hyperbolic tangent of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 tanh(double4 x) { return new double4(tanh(x.x), tanh(x.y), tanh(x.z), tanh(x.w)); } + + + /// Returns the arctangent of a float value. + /// A tangent value, usually the ratio y/x on the unit circle. + /// The arctangent of the input, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float atan(float x) { return (float)System.Math.Atan(x); } + + /// Returns the componentwise arctangent of a float2 vector. + /// A tangent value, usually the ratio y/x on the unit circle. + /// The componentwise arctangent of the input, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 atan(float2 x) { return new float2(atan(x.x), atan(x.y)); } + + /// Returns the componentwise arctangent of a float3 vector. + /// A tangent value, usually the ratio y/x on the unit circle. + /// The componentwise arctangent of the input, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 atan(float3 x) { return new float3(atan(x.x), atan(x.y), atan(x.z)); } + + /// Returns the componentwise arctangent of a float4 vector. + /// A tangent value, usually the ratio y/x on the unit circle. + /// The componentwise arctangent of the input, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 atan(float4 x) { return new float4(atan(x.x), atan(x.y), atan(x.z), atan(x.w)); } + + + /// Returns the arctangent of a double value. + /// A tangent value, usually the ratio y/x on the unit circle. + /// The arctangent of the input, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double atan(double x) { return System.Math.Atan(x); } + + /// Returns the componentwise arctangent of a double2 vector. + /// A tangent value, usually the ratio y/x on the unit circle. + /// The componentwise arctangent of the input, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 atan(double2 x) { return new double2(atan(x.x), atan(x.y)); } + + /// Returns the componentwise arctangent of a double3 vector. + /// A tangent value, usually the ratio y/x on the unit circle. + /// The componentwise arctangent of the input, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 atan(double3 x) { return new double3(atan(x.x), atan(x.y), atan(x.z)); } + + /// Returns the componentwise arctangent of a double4 vector. + /// A tangent value, usually the ratio y/x on the unit circle. + /// The componentwise arctangent of the input, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 atan(double4 x) { return new double4(atan(x.x), atan(x.y), atan(x.z), atan(x.w)); } + + + /// Returns the 2-argument arctangent of a pair of float values. + /// Numerator of the ratio y/x, usually the y component on the unit circle. + /// Denominator of the ratio y/x, usually the x component on the unit circle. + /// The arctangent of the ratio y/x, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float atan2(float y, float x) { return (float)System.Math.Atan2(y, x); } + + /// Returns the componentwise 2-argument arctangent of a pair of floats2 vectors. + /// Numerator of the ratio y/x, usually the y component on the unit circle. + /// Denominator of the ratio y/x, usually the x component on the unit circle. + /// The componentwise arctangent of the ratio y/x, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 atan2(float2 y, float2 x) { return new float2(atan2(y.x, x.x), atan2(y.y, x.y)); } + + /// Returns the componentwise 2-argument arctangent of a pair of floats3 vectors. + /// Numerator of the ratio y/x, usually the y component on the unit circle. + /// Denominator of the ratio y/x, usually the x component on the unit circle. + /// The componentwise arctangent of the ratio y/x, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 atan2(float3 y, float3 x) { return new float3(atan2(y.x, x.x), atan2(y.y, x.y), atan2(y.z, x.z)); } + + /// Returns the componentwise 2-argument arctangent of a pair of floats4 vectors. + /// Numerator of the ratio y/x, usually the y component on the unit circle. + /// Denominator of the ratio y/x, usually the x component on the unit circle. + /// The componentwise arctangent of the ratio y/x, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 atan2(float4 y, float4 x) { return new float4(atan2(y.x, x.x), atan2(y.y, x.y), atan2(y.z, x.z), atan2(y.w, x.w)); } + + + /// Returns the 2-argument arctangent of a pair of double values. + /// Numerator of the ratio y/x, usually the y component on the unit circle. + /// Denominator of the ratio y/x, usually the x component on the unit circle. + /// The arctangent of the ratio y/x, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double atan2(double y, double x) { return System.Math.Atan2(y, x); } + + /// Returns the 2-argument arctangent of a pair of double2 vectors. + /// Numerator of the ratio y/x, usually the y component on the unit circle. + /// Denominator of the ratio y/x, usually the x component on the unit circle. + /// The componentwise arctangent of the ratio y/x, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 atan2(double2 y, double2 x) { return new double2(atan2(y.x, x.x), atan2(y.y, x.y)); } + + /// Returns the 2-argument arctangent of a pair of double3 vectors. + /// Numerator of the ratio y/x, usually the y component on the unit circle. + /// Denominator of the ratio y/x, usually the x component on the unit circle. + /// The componentwise arctangent of the ratio y/x, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 atan2(double3 y, double3 x) { return new double3(atan2(y.x, x.x), atan2(y.y, x.y), atan2(y.z, x.z)); } + + /// Returns the 2-argument arctangent of a pair of double4 vectors. + /// Numerator of the ratio y/x, usually the y component on the unit circle. + /// Denominator of the ratio y/x, usually the x component on the unit circle. + /// The componentwise arctangent of the ratio y/x, in radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 atan2(double4 y, double4 x) { return new double4(atan2(y.x, x.x), atan2(y.y, x.y), atan2(y.z, x.z), atan2(y.w, x.w)); } + + + /// Returns the cosine of a float value. + /// Input value. + /// The cosine cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float cos(float x) { return (float)System.Math.Cos(x); } + + /// Returns the componentwise cosine of a float2 vector. + /// Input value. + /// The componentwise cosine cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 cos(float2 x) { return new float2(cos(x.x), cos(x.y)); } + + /// Returns the componentwise cosine of a float3 vector. + /// Input value. + /// The componentwise cosine cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 cos(float3 x) { return new float3(cos(x.x), cos(x.y), cos(x.z)); } + + /// Returns the componentwise cosine of a float4 vector. + /// Input value. + /// The componentwise cosine cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 cos(float4 x) { return new float4(cos(x.x), cos(x.y), cos(x.z), cos(x.w)); } + + + /// Returns the cosine of a double value. + /// Input value. + /// The cosine cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double cos(double x) { return System.Math.Cos(x); } + + /// Returns the componentwise cosine of a double2 vector. + /// Input value. + /// The componentwise cosine cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 cos(double2 x) { return new double2(cos(x.x), cos(x.y)); } + + /// Returns the componentwise cosine of a double3 vector. + /// Input value. + /// The componentwise cosine cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 cos(double3 x) { return new double3(cos(x.x), cos(x.y), cos(x.z)); } + + /// Returns the componentwise cosine of a double4 vector. + /// Input value. + /// The componentwise cosine cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 cos(double4 x) { return new double4(cos(x.x), cos(x.y), cos(x.z), cos(x.w)); } + + + /// Returns the hyperbolic cosine of a float value. + /// Input value. + /// The hyperbolic cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float cosh(float x) { return (float)System.Math.Cosh(x); } + + /// Returns the componentwise hyperbolic cosine of a float2 vector. + /// Input value. + /// The componentwise hyperbolic cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 cosh(float2 x) { return new float2(cosh(x.x), cosh(x.y)); } + + /// Returns the componentwise hyperbolic cosine of a float3 vector. + /// Input value. + /// The componentwise hyperbolic cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 cosh(float3 x) { return new float3(cosh(x.x), cosh(x.y), cosh(x.z)); } + + /// Returns the componentwise hyperbolic cosine of a float4 vector. + /// Input value. + /// The componentwise hyperbolic cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 cosh(float4 x) { return new float4(cosh(x.x), cosh(x.y), cosh(x.z), cosh(x.w)); } + + + /// Returns the hyperbolic cosine of a double value. + /// Input value. + /// The hyperbolic cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double cosh(double x) { return System.Math.Cosh(x); } + + /// Returns the componentwise hyperbolic cosine of a double2 vector. + /// Input value. + /// The componentwise hyperbolic cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 cosh(double2 x) { return new double2(cosh(x.x), cosh(x.y)); } + + /// Returns the componentwise hyperbolic cosine of a double3 vector. + /// Input value. + /// The componentwise hyperbolic cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 cosh(double3 x) { return new double3(cosh(x.x), cosh(x.y), cosh(x.z)); } + + /// Returns the componentwise hyperbolic cosine of a double4 vector. + /// Input value. + /// The componentwise hyperbolic cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 cosh(double4 x) { return new double4(cosh(x.x), cosh(x.y), cosh(x.z), cosh(x.w)); } + + + /// Returns the arccosine of a float value. + /// Input value. + /// The arccosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float acos(float x) { return (float)System.Math.Acos((float)x); } + + /// Returns the componentwise arccosine of a float2 vector. + /// Input value. + /// The componentwise arccosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 acos(float2 x) { return new float2(acos(x.x), acos(x.y)); } + + /// Returns the componentwise arccosine of a float3 vector. + /// Input value. + /// The componentwise arccosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 acos(float3 x) { return new float3(acos(x.x), acos(x.y), acos(x.z)); } + + /// Returns the componentwise arccosine of a float4 vector. + /// Input value. + /// The componentwise arccosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 acos(float4 x) { return new float4(acos(x.x), acos(x.y), acos(x.z), acos(x.w)); } + + + /// Returns the arccosine of a double value. + /// Input value. + /// The arccosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double acos(double x) { return System.Math.Acos(x); } + + /// Returns the componentwise arccosine of a double2 vector. + /// Input value. + /// The componentwise arccosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 acos(double2 x) { return new double2(acos(x.x), acos(x.y)); } + + /// Returns the componentwise arccosine of a double3 vector. + /// Input value. + /// The componentwise arccosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 acos(double3 x) { return new double3(acos(x.x), acos(x.y), acos(x.z)); } + + /// Returns the componentwise arccosine of a double4 vector. + /// Input value. + /// The componentwise arccosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 acos(double4 x) { return new double4(acos(x.x), acos(x.y), acos(x.z), acos(x.w)); } + + + /// Returns the sine of a float value. + /// Input value. + /// The sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float sin(float x) { return (float)System.Math.Sin((float)x); } + + /// Returns the componentwise sine of a float2 vector. + /// Input value. + /// The componentwise sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 sin(float2 x) { return new float2(sin(x.x), sin(x.y)); } + + /// Returns the componentwise sine of a float3 vector. + /// Input value. + /// The componentwise sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 sin(float3 x) { return new float3(sin(x.x), sin(x.y), sin(x.z)); } + + /// Returns the componentwise sine of a float4 vector. + /// Input value. + /// The componentwise sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 sin(float4 x) { return new float4(sin(x.x), sin(x.y), sin(x.z), sin(x.w)); } + + + /// Returns the sine of a double value. + /// Input value. + /// The sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double sin(double x) { return System.Math.Sin(x); } + + /// Returns the componentwise sine of a double2 vector. + /// Input value. + /// The componentwise sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 sin(double2 x) { return new double2(sin(x.x), sin(x.y)); } + + /// Returns the componentwise sine of a double3 vector. + /// Input value. + /// The componentwise sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 sin(double3 x) { return new double3(sin(x.x), sin(x.y), sin(x.z)); } + + /// Returns the componentwise sine of a double4 vector. + /// Input value. + /// The componentwise sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 sin(double4 x) { return new double4(sin(x.x), sin(x.y), sin(x.z), sin(x.w)); } + + + /// Returns the hyperbolic sine of a float value. + /// Input value. + /// The hyperbolic sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float sinh(float x) { return (float)System.Math.Sinh((float)x); } + + /// Returns the componentwise hyperbolic sine of a float2 vector. + /// Input value. + /// The componentwise hyperbolic sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 sinh(float2 x) { return new float2(sinh(x.x), sinh(x.y)); } + + /// Returns the componentwise hyperbolic sine of a float3 vector. + /// Input value. + /// The componentwise hyperbolic sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 sinh(float3 x) { return new float3(sinh(x.x), sinh(x.y), sinh(x.z)); } + + /// Returns the componentwise hyperbolic sine of a float4 vector. + /// Input value. + /// The componentwise hyperbolic sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 sinh(float4 x) { return new float4(sinh(x.x), sinh(x.y), sinh(x.z), sinh(x.w)); } + + + /// Returns the hyperbolic sine of a double value. + /// Input value. + /// The hyperbolic sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double sinh(double x) { return System.Math.Sinh(x); } + + /// Returns the componentwise hyperbolic sine of a double2 vector. + /// Input value. + /// The componentwise hyperbolic sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 sinh(double2 x) { return new double2(sinh(x.x), sinh(x.y)); } + + /// Returns the componentwise hyperbolic sine of a double3 vector. + /// Input value. + /// The componentwise hyperbolic sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 sinh(double3 x) { return new double3(sinh(x.x), sinh(x.y), sinh(x.z)); } + + /// Returns the componentwise hyperbolic sine of a double4 vector. + /// Input value. + /// The componentwise hyperbolic sine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 sinh(double4 x) { return new double4(sinh(x.x), sinh(x.y), sinh(x.z), sinh(x.w)); } + + + /// Returns the arcsine of a float value. + /// Input value. + /// The arcsine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float asin(float x) { return (float)System.Math.Asin((float)x); } + + /// Returns the componentwise arcsine of a float2 vector. + /// Input value. + /// The componentwise arcsine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 asin(float2 x) { return new float2(asin(x.x), asin(x.y)); } + + /// Returns the componentwise arcsine of a float3 vector. + /// Input value. + /// The componentwise arcsine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 asin(float3 x) { return new float3(asin(x.x), asin(x.y), asin(x.z)); } + + /// Returns the componentwise arcsine of a float4 vector. + /// Input value. + /// The componentwise arcsine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 asin(float4 x) { return new float4(asin(x.x), asin(x.y), asin(x.z), asin(x.w)); } + + + /// Returns the arcsine of a double value. + /// Input value. + /// The arcsine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double asin(double x) { return System.Math.Asin(x); } + + /// Returns the componentwise arcsine of a double2 vector. + /// Input value. + /// The componentwise arcsine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 asin(double2 x) { return new double2(asin(x.x), asin(x.y)); } + + /// Returns the componentwise arcsine of a double3 vector. + /// Input value. + /// The componentwise arcsine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 asin(double3 x) { return new double3(asin(x.x), asin(x.y), asin(x.z)); } + + /// Returns the componentwise arcsine of a double4 vector. + /// Input value. + /// The componentwise arcsine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 asin(double4 x) { return new double4(asin(x.x), asin(x.y), asin(x.z), asin(x.w)); } + + + /// Returns the result of rounding a float value up to the nearest integral value less or equal to the original value. + /// Input value. + /// The round down to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float floor(float x) { return (float)System.Math.Floor((float)x); } + + /// Returns the result of rounding each component of a float2 vector value down to the nearest value less or equal to the original value. + /// Input value. + /// The componentwise round down to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 floor(float2 x) { return new float2(floor(x.x), floor(x.y)); } + + /// Returns the result of rounding each component of a float3 vector value down to the nearest value less or equal to the original value. + /// Input value. + /// The componentwise round down to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 floor(float3 x) { return new float3(floor(x.x), floor(x.y), floor(x.z)); } + + /// Returns the result of rounding each component of a float4 vector value down to the nearest value less or equal to the original value. + /// Input value. + /// The componentwise round down to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 floor(float4 x) { return new float4(floor(x.x), floor(x.y), floor(x.z), floor(x.w)); } + + + /// Returns the result of rounding a double value up to the nearest integral value less or equal to the original value. + /// Input value. + /// The round down to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double floor(double x) { return System.Math.Floor(x); } + + /// Returns the result of rounding each component of a double2 vector value down to the nearest value less or equal to the original value. + /// Input value. + /// The componentwise round down to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 floor(double2 x) { return new double2(floor(x.x), floor(x.y)); } + + /// Returns the result of rounding each component of a double3 vector value down to the nearest value less or equal to the original value. + /// Input value. + /// The componentwise round down to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 floor(double3 x) { return new double3(floor(x.x), floor(x.y), floor(x.z)); } + + /// Returns the result of rounding each component of a double4 vector value down to the nearest value less or equal to the original value. + /// Input value. + /// The componentwise round down to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 floor(double4 x) { return new double4(floor(x.x), floor(x.y), floor(x.z), floor(x.w)); } + + + /// Returns the result of rounding a float value up to the nearest integral value greater or equal to the original value. + /// Input value. + /// The round up to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float ceil(float x) { return (float)System.Math.Ceiling((float)x); } + + /// Returns the result of rounding each component of a float2 vector value up to the nearest value greater or equal to the original value. + /// Input value. + /// The componentwise round up to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 ceil(float2 x) { return new float2(ceil(x.x), ceil(x.y)); } + + /// Returns the result of rounding each component of a float3 vector value up to the nearest value greater or equal to the original value. + /// Input value. + /// The componentwise round up to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 ceil(float3 x) { return new float3(ceil(x.x), ceil(x.y), ceil(x.z)); } + + /// Returns the result of rounding each component of a float4 vector value up to the nearest value greater or equal to the original value. + /// Input value. + /// The componentwise round up to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 ceil(float4 x) { return new float4(ceil(x.x), ceil(x.y), ceil(x.z), ceil(x.w)); } + + + /// Returns the result of rounding a double value up to the nearest greater integral value greater or equal to the original value. + /// Input value. + /// The round up to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double ceil(double x) { return System.Math.Ceiling(x); } + + /// Returns the result of rounding each component of a double2 vector value up to the nearest integral value greater or equal to the original value. + /// Input value. + /// The componentwise round up to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 ceil(double2 x) { return new double2(ceil(x.x), ceil(x.y)); } + + /// Returns the result of rounding each component of a double3 vector value up to the nearest integral value greater or equal to the original value.. + /// Input value. + /// The componentwise round up to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 ceil(double3 x) { return new double3(ceil(x.x), ceil(x.y), ceil(x.z)); } + + /// Returns the result of rounding each component of a double4 vector value up to the nearest integral value greater or equal to the original value. + /// Input value. + /// The componentwise round up to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 ceil(double4 x) { return new double4(ceil(x.x), ceil(x.y), ceil(x.z), ceil(x.w)); } + + + /// Returns the result of rounding a float value to the nearest integral value. + /// Input value. + /// The round to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float round(float x) { return (float)System.Math.Round((float)x); } + + /// Returns the result of rounding each component of a float2 vector value to the nearest integral value. + /// Input value. + /// The componentwise round to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 round(float2 x) { return new float2(round(x.x), round(x.y)); } + + /// Returns the result of rounding each component of a float3 vector value to the nearest integral value. + /// Input value. + /// The componentwise round to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 round(float3 x) { return new float3(round(x.x), round(x.y), round(x.z)); } + + /// Returns the result of rounding each component of a float4 vector value to the nearest integral value. + /// Input value. + /// The componentwise round to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 round(float4 x) { return new float4(round(x.x), round(x.y), round(x.z), round(x.w)); } + + + /// Returns the result of rounding a double value to the nearest integral value. + /// Input value. + /// The round to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double round(double x) { return System.Math.Round(x); } + + /// Returns the result of rounding each component of a double2 vector value to the nearest integral value. + /// Input value. + /// The componentwise round to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 round(double2 x) { return new double2(round(x.x), round(x.y)); } + + /// Returns the result of rounding each component of a double3 vector value to the nearest integral value. + /// Input value. + /// The componentwise round to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 round(double3 x) { return new double3(round(x.x), round(x.y), round(x.z)); } + + /// Returns the result of rounding each component of a double4 vector value to the nearest integral value. + /// Input value. + /// The componentwise round to nearest integral value of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 round(double4 x) { return new double4(round(x.x), round(x.y), round(x.z), round(x.w)); } + + + /// Returns the result of truncating a float value to an integral float value. + /// Input value. + /// The truncation of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float trunc(float x) { return (float)System.Math.Truncate((float)x); } + + /// Returns the result of a componentwise truncation of a float2 value to an integral float2 value. + /// Input value. + /// The componentwise truncation of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 trunc(float2 x) { return new float2(trunc(x.x), trunc(x.y)); } + + /// Returns the result of a componentwise truncation of a float3 value to an integral float3 value. + /// Input value. + /// The componentwise truncation of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 trunc(float3 x) { return new float3(trunc(x.x), trunc(x.y), trunc(x.z)); } + + /// Returns the result of a componentwise truncation of a float4 value to an integral float4 value. + /// Input value. + /// The componentwise truncation of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 trunc(float4 x) { return new float4(trunc(x.x), trunc(x.y), trunc(x.z), trunc(x.w)); } + + + /// Returns the result of truncating a double value to an integral double value. + /// Input value. + /// The truncation of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double trunc(double x) { return System.Math.Truncate(x); } + + /// Returns the result of a componentwise truncation of a double2 value to an integral double2 value. + /// Input value. + /// The componentwise truncation of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 trunc(double2 x) { return new double2(trunc(x.x), trunc(x.y)); } + + /// Returns the result of a componentwise truncation of a double3 value to an integral double3 value. + /// Input value. + /// The componentwise truncation of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 trunc(double3 x) { return new double3(trunc(x.x), trunc(x.y), trunc(x.z)); } + + /// Returns the result of a componentwise truncation of a double4 value to an integral double4 value. + /// Input value. + /// The componentwise truncation of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 trunc(double4 x) { return new double4(trunc(x.x), trunc(x.y), trunc(x.z), trunc(x.w)); } + + + /// Returns the fractional part of a float value. + /// Input value. + /// The fractional part of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float frac(float x) { return x - floor(x); } + + /// Returns the componentwise fractional parts of a float2 vector. + /// Input value. + /// The componentwise fractional part of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 frac(float2 x) { return x - floor(x); } + + /// Returns the componentwise fractional parts of a float3 vector. + /// Input value. + /// The componentwise fractional part of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 frac(float3 x) { return x - floor(x); } + + /// Returns the componentwise fractional parts of a float4 vector. + /// Input value. + /// The componentwise fractional part of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 frac(float4 x) { return x - floor(x); } + + + /// Returns the fractional part of a double value. + /// Input value. + /// The fractional part of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double frac(double x) { return x - floor(x); } + + /// Returns the componentwise fractional parts of a double2 vector. + /// Input value. + /// The componentwise fractional part of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 frac(double2 x) { return x - floor(x); } + + /// Returns the componentwise fractional parts of a double3 vector. + /// Input value. + /// The componentwise fractional part of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 frac(double3 x) { return x - floor(x); } + + /// Returns the componentwise fractional parts of a double4 vector. + /// Input value. + /// The componentwise fractional part of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 frac(double4 x) { return x - floor(x); } + + + /// Returns the reciprocal a float value. + /// Input value. + /// The reciprocal of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float rcp(float x) { return 1.0f / x; } + + /// Returns the componentwise reciprocal a float2 vector. + /// Input value. + /// The componentwise reciprocal of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 rcp(float2 x) { return 1.0f / x; } + + /// Returns the componentwise reciprocal a float3 vector. + /// Input value. + /// The componentwise reciprocal of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 rcp(float3 x) { return 1.0f / x; } + + /// Returns the componentwise reciprocal a float4 vector. + /// Input value. + /// The componentwise reciprocal of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 rcp(float4 x) { return 1.0f / x; } + + + /// Returns the reciprocal a double value. + /// Input value. + /// The reciprocal of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double rcp(double x) { return 1.0 / x; } + + /// Returns the componentwise reciprocal a double2 vector. + /// Input value. + /// The componentwise reciprocal of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 rcp(double2 x) { return 1.0 / x; } + + /// Returns the componentwise reciprocal a double3 vector. + /// Input value. + /// The componentwise reciprocal of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 rcp(double3 x) { return 1.0 / x; } + + /// Returns the componentwise reciprocal a double4 vector. + /// Input value. + /// The componentwise reciprocal of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 rcp(double4 x) { return 1.0 / x; } + + /// Returns the sign of a int value. -1 if it is less than zero, 0 if it is zero and 1 if it greater than zero. + /// Input value. + /// The sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int sign(int x) { return (x > 0 ? 1 : 0) - (x < 0 ? 1 : 0); } + + /// Returns the componentwise sign of a int2 value. 1 for positive components, 0 for zero components and -1 for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 sign(int2 x) { return new int2(sign(x.x), sign(x.y)); } + + /// Returns the componentwise sign of a int3 value. 1 for positive components, 0 for zero components and -1 for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 sign(int3 x) { return new int3(sign(x.x), sign(x.y), sign(x.z)); } + + /// Returns the componentwise sign of a int4 value. 1 for positive components, 0 for zero components and -1 for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 sign(int4 x) { return new int4(sign(x.x), sign(x.y), sign(x.z), sign(x.w)); } + + /// Returns the sign of a float value. -1.0f if it is less than zero, 0.0f if it is zero and 1.0f if it greater than zero. + /// Input value. + /// The sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float sign(float x) { return (x > 0.0f ? 1.0f : 0.0f) - (x < 0.0f ? 1.0f : 0.0f); } + + /// Returns the componentwise sign of a float2 value. 1.0f for positive components, 0.0f for zero components and -1.0f for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 sign(float2 x) { return new float2(sign(x.x), sign(x.y)); } + + /// Returns the componentwise sign of a float3 value. 1.0f for positive components, 0.0f for zero components and -1.0f for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 sign(float3 x) { return new float3(sign(x.x), sign(x.y), sign(x.z)); } + + /// Returns the componentwise sign of a float4 value. 1.0f for positive components, 0.0f for zero components and -1.0f for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 sign(float4 x) { return new float4(sign(x.x), sign(x.y), sign(x.z), sign(x.w)); } + + + /// Returns the sign of a double value. -1.0 if it is less than zero, 0.0 if it is zero and 1.0 if it greater than zero. + /// Input value. + /// The sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double sign(double x) { return x == 0 ? 0 : (x > 0.0 ? 1.0 : 0.0) - (x < 0.0 ? 1.0 : 0.0); } + + /// Returns the componentwise sign of a double2 value. 1.0 for positive components, 0.0 for zero components and -1.0 for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 sign(double2 x) { return new double2(sign(x.x), sign(x.y)); } + + /// Returns the componentwise sign of a double3 value. 1.0 for positive components, 0.0 for zero components and -1.0 for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 sign(double3 x) { return new double3(sign(x.x), sign(x.y), sign(x.z)); } + + /// Returns the componentwise sign of a double4 value. 1.0 for positive components, 0.0 for zero components and -1.0 for negative components. + /// Input value. + /// The componentwise sign of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 sign(double4 x) { return new double4(sign(x.x), sign(x.y), sign(x.z), sign(x.w)); } + + + /// Returns x raised to the power y. + /// The exponent base. + /// The exponent power. + /// The result of raising x to the power y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float pow(float x, float y) { return (float)System.Math.Pow((float)x, (float)y); } + + /// Returns the componentwise result of raising x to the power y. + /// The exponent base. + /// The exponent power. + /// The componentwise result of raising x to the power y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 pow(float2 x, float2 y) { return new float2(pow(x.x, y.x), pow(x.y, y.y)); } + + /// Returns the componentwise result of raising x to the power y. + /// The exponent base. + /// The exponent power. + /// The componentwise result of raising x to the power y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 pow(float3 x, float3 y) { return new float3(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z)); } + + /// Returns the componentwise result of raising x to the power y. + /// The exponent base. + /// The exponent power. + /// The componentwise result of raising x to the power y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 pow(float4 x, float4 y) { return new float4(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z), pow(x.w, y.w)); } + + + /// Returns x raised to the power y. + /// The exponent base. + /// The exponent power. + /// The result of raising x to the power y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double pow(double x, double y) { return System.Math.Pow(x, y); } + + /// Returns the componentwise result of raising x to the power y. + /// The exponent base. + /// The exponent power. + /// The componentwise result of raising x to the power y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 pow(double2 x, double2 y) { return new double2(pow(x.x, y.x), pow(x.y, y.y)); } + + /// Returns the componentwise result of raising x to the power y. + /// The exponent base. + /// The exponent power. + /// The componentwise result of raising x to the power y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 pow(double3 x, double3 y) { return new double3(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z)); } + + /// Returns the componentwise result of raising x to the power y. + /// The exponent base. + /// The exponent power. + /// The componentwise result of raising x to the power y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 pow(double4 x, double4 y) { return new double4(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z), pow(x.w, y.w)); } + + + /// Returns the base-e exponential of x. + /// Input value. + /// The base-e exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float exp(float x) { return (float)System.Math.Exp((float)x); } + + /// Returns the componentwise base-e exponential of x. + /// Input value. + /// The componentwise base-e exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 exp(float2 x) { return new float2(exp(x.x), exp(x.y)); } + + /// Returns the componentwise base-e exponential of x. + /// Input value. + /// The componentwise base-e exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 exp(float3 x) { return new float3(exp(x.x), exp(x.y), exp(x.z)); } + + /// Returns the componentwise base-e exponential of x. + /// Input value. + /// The componentwise base-e exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 exp(float4 x) { return new float4(exp(x.x), exp(x.y), exp(x.z), exp(x.w)); } + + + /// Returns the base-e exponential of x. + /// Input value. + /// The base-e exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double exp(double x) { return System.Math.Exp(x); } + + /// Returns the componentwise base-e exponential of x. + /// Input value. + /// The componentwise base-e exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 exp(double2 x) { return new double2(exp(x.x), exp(x.y)); } + + /// Returns the componentwise base-e exponential of x. + /// Input value. + /// The componentwise base-e exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 exp(double3 x) { return new double3(exp(x.x), exp(x.y), exp(x.z)); } + + /// Returns the componentwise base-e exponential of x. + /// Input value. + /// The componentwise base-e exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 exp(double4 x) { return new double4(exp(x.x), exp(x.y), exp(x.z), exp(x.w)); } + + + /// Returns the base-2 exponential of x. + /// Input value. + /// The base-2 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float exp2(float x) { return (float)System.Math.Exp((float)x * 0.69314718f); } + + /// Returns the componentwise base-2 exponential of x. + /// Input value. + /// The componentwise base-2 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 exp2(float2 x) { return new float2(exp2(x.x), exp2(x.y)); } + + /// Returns the componentwise base-2 exponential of x. + /// Input value. + /// The componentwise base-2 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 exp2(float3 x) { return new float3(exp2(x.x), exp2(x.y), exp2(x.z)); } + + /// Returns the componentwise base-2 exponential of x. + /// Input value. + /// The componentwise base-2 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 exp2(float4 x) { return new float4(exp2(x.x), exp2(x.y), exp2(x.z), exp2(x.w)); } + + + /// Returns the base-2 exponential of x. + /// Input value. + /// The base-2 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double exp2(double x) { return System.Math.Exp(x * 0.693147180559945309); } + + /// Returns the componentwise base-2 exponential of x. + /// Input value. + /// The componentwise base-2 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 exp2(double2 x) { return new double2(exp2(x.x), exp2(x.y)); } + + /// Returns the componentwise base-2 exponential of x. + /// Input value. + /// The componentwise base-2 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 exp2(double3 x) { return new double3(exp2(x.x), exp2(x.y), exp2(x.z)); } + + /// Returns the componentwise base-2 exponential of x. + /// Input value. + /// The componentwise base-2 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 exp2(double4 x) { return new double4(exp2(x.x), exp2(x.y), exp2(x.z), exp2(x.w)); } + + + /// Returns the base-10 exponential of x. + /// Input value. + /// The base-10 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float exp10(float x) { return (float)System.Math.Exp((float)x * 2.30258509f); } + + /// Returns the componentwise base-10 exponential of x. + /// Input value. + /// The componentwise base-10 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 exp10(float2 x) { return new float2(exp10(x.x), exp10(x.y)); } + + /// Returns the componentwise base-10 exponential of x. + /// Input value. + /// The componentwise base-10 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 exp10(float3 x) { return new float3(exp10(x.x), exp10(x.y), exp10(x.z)); } + + /// Returns the componentwise base-10 exponential of x. + /// Input value. + /// The componentwise base-10 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 exp10(float4 x) { return new float4(exp10(x.x), exp10(x.y), exp10(x.z), exp10(x.w)); } + + + /// Returns the base-10 exponential of x. + /// Input value. + /// The base-10 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double exp10(double x) { return System.Math.Exp(x * 2.302585092994045684); } + + /// Returns the componentwise base-10 exponential of x. + /// Input value. + /// The componentwise base-10 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 exp10(double2 x) { return new double2(exp10(x.x), exp10(x.y)); } + + /// Returns the componentwise base-10 exponential of x. + /// Input value. + /// The componentwise base-10 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 exp10(double3 x) { return new double3(exp10(x.x), exp10(x.y), exp10(x.z)); } + + /// Returns the componentwise base-10 exponential of x. + /// Input value. + /// The componentwise base-10 exponential of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 exp10(double4 x) { return new double4(exp10(x.x), exp10(x.y), exp10(x.z), exp10(x.w)); } + + + /// Returns the natural logarithm of a float value. + /// Input value. + /// The natural logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float log(float x) { return (float)System.Math.Log((float)x); } + + /// Returns the componentwise natural logarithm of a float2 vector. + /// Input value. + /// The componentwise natural logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 log(float2 x) { return new float2(log(x.x), log(x.y)); } + + /// Returns the componentwise natural logarithm of a float3 vector. + /// Input value. + /// The componentwise natural logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 log(float3 x) { return new float3(log(x.x), log(x.y), log(x.z)); } + + /// Returns the componentwise natural logarithm of a float4 vector. + /// Input value. + /// The componentwise natural logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 log(float4 x) { return new float4(log(x.x), log(x.y), log(x.z), log(x.w)); } + + + /// Returns the natural logarithm of a double value. + /// Input value. + /// The natural logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double log(double x) { return System.Math.Log(x); } + + /// Returns the componentwise natural logarithm of a double2 vector. + /// Input value. + /// The componentwise natural logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 log(double2 x) { return new double2(log(x.x), log(x.y)); } + + /// Returns the componentwise natural logarithm of a double3 vector. + /// Input value. + /// The componentwise natural logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 log(double3 x) { return new double3(log(x.x), log(x.y), log(x.z)); } + + /// Returns the componentwise natural logarithm of a double4 vector. + /// Input value. + /// The componentwise natural logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 log(double4 x) { return new double4(log(x.x), log(x.y), log(x.z), log(x.w)); } + + + /// Returns the base-2 logarithm of a float value. + /// Input value. + /// The base-2 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float log2(float x) { return (float)System.Math.Log((float)x, 2.0f); } + + /// Returns the componentwise base-2 logarithm of a float2 vector. + /// Input value. + /// The componentwise base-2 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 log2(float2 x) { return new float2(log2(x.x), log2(x.y)); } + + /// Returns the componentwise base-2 logarithm of a float3 vector. + /// Input value. + /// The componentwise base-2 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 log2(float3 x) { return new float3(log2(x.x), log2(x.y), log2(x.z)); } + + /// Returns the componentwise base-2 logarithm of a float4 vector. + /// Input value. + /// The componentwise base-2 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 log2(float4 x) { return new float4(log2(x.x), log2(x.y), log2(x.z), log2(x.w)); } + + + /// Returns the base-2 logarithm of a double value. + /// Input value. + /// The base-2 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double log2(double x) { return System.Math.Log(x, 2.0); } + + /// Returns the componentwise base-2 logarithm of a double2 vector. + /// Input value. + /// The componentwise base-2 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 log2(double2 x) { return new double2(log2(x.x), log2(x.y)); } + + /// Returns the componentwise base-2 logarithm of a double3 vector. + /// Input value. + /// The componentwise base-2 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 log2(double3 x) { return new double3(log2(x.x), log2(x.y), log2(x.z)); } + + /// Returns the componentwise base-2 logarithm of a double4 vector. + /// Input value. + /// The componentwise base-2 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 log2(double4 x) { return new double4(log2(x.x), log2(x.y), log2(x.z), log2(x.w)); } + + /// Returns the base-10 logarithm of a float value. + /// Input value. + /// The base-10 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float log10(float x) { return (float)System.Math.Log10((float)x); } + + /// Returns the componentwise base-10 logarithm of a float2 vector. + /// Input value. + /// The componentwise base-10 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 log10(float2 x) { return new float2(log10(x.x), log10(x.y)); } + + /// Returns the componentwise base-10 logarithm of a float3 vector. + /// Input value. + /// The componentwise base-10 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 log10(float3 x) { return new float3(log10(x.x), log10(x.y), log10(x.z)); } + + /// Returns the componentwise base-10 logarithm of a float4 vector. + /// Input value. + /// The componentwise base-10 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 log10(float4 x) { return new float4(log10(x.x), log10(x.y), log10(x.z), log10(x.w)); } + + + /// Returns the base-10 logarithm of a double value. + /// Input value. + /// The base-10 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double log10(double x) { return System.Math.Log10(x); } + + /// Returns the componentwise base-10 logarithm of a double2 vector. + /// Input value. + /// The componentwise base-10 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 log10(double2 x) { return new double2(log10(x.x), log10(x.y)); } + + /// Returns the componentwise base-10 logarithm of a double3 vector. + /// Input value. + /// The componentwise base-10 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 log10(double3 x) { return new double3(log10(x.x), log10(x.y), log10(x.z)); } + + /// Returns the componentwise base-10 logarithm of a double4 vector. + /// Input value. + /// The componentwise base-10 logarithm of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 log10(double4 x) { return new double4(log10(x.x), log10(x.y), log10(x.z), log10(x.w)); } + + + /// Returns the floating point remainder of x/y. + /// The dividend in x/y. + /// The divisor in x/y. + /// The remainder of x/y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float fmod(float x, float y) { return x % y; } + + /// Returns the componentwise floating point remainder of x/y. + /// The dividend in x/y. + /// The divisor in x/y. + /// The componentwise remainder of x/y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 fmod(float2 x, float2 y) { return new float2(x.x % y.x, x.y % y.y); } + + /// Returns the componentwise floating point remainder of x/y. + /// The dividend in x/y. + /// The divisor in x/y. + /// The componentwise remainder of x/y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 fmod(float3 x, float3 y) { return new float3(x.x % y.x, x.y % y.y, x.z % y.z); } + + /// Returns the componentwise floating point remainder of x/y. + /// The dividend in x/y. + /// The divisor in x/y. + /// The componentwise remainder of x/y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 fmod(float4 x, float4 y) { return new float4(x.x % y.x, x.y % y.y, x.z % y.z, x.w % y.w); } + + + /// Returns the double precision floating point remainder of x/y. + /// The dividend in x/y. + /// The divisor in x/y. + /// The remainder of x/y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double fmod(double x, double y) { return x % y; } + + /// Returns the componentwise double precision floating point remainder of x/y. + /// The dividend in x/y. + /// The divisor in x/y. + /// The componentwise remainder of x/y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 fmod(double2 x, double2 y) { return new double2(x.x % y.x, x.y % y.y); } + + /// Returns the componentwise double precision floating point remainder of x/y. + /// The dividend in x/y. + /// The divisor in x/y. + /// The componentwise remainder of x/y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 fmod(double3 x, double3 y) { return new double3(x.x % y.x, x.y % y.y, x.z % y.z); } + + /// Returns the componentwise double precision floating point remainder of x/y. + /// The dividend in x/y. + /// The divisor in x/y. + /// The componentwise remainder of x/y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 fmod(double4 x, double4 y) { return new double4(x.x % y.x, x.y % y.y, x.z % y.z, x.w % y.w); } + + + /// Splits a float value into an integral part i and a fractional part that gets returned. Both parts take the sign of the input. + /// Value to split into integral and fractional part. + /// Output value containing integral part of x. + /// The fractional part of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float modf(float x, out float i) { i = trunc(x); return x - i; } + + /// + /// Performs a componentwise split of a float2 vector into an integral part i and a fractional part that gets returned. + /// Both parts take the sign of the corresponding input component. + /// + /// Value to split into integral and fractional part. + /// Output value containing integral part of x. + /// The componentwise fractional part of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 modf(float2 x, out float2 i) { i = trunc(x); return x - i; } + + /// + /// Performs a componentwise split of a float3 vector into an integral part i and a fractional part that gets returned. + /// Both parts take the sign of the corresponding input component. + /// + /// Value to split into integral and fractional part. + /// Output value containing integral part of x. + /// The componentwise fractional part of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 modf(float3 x, out float3 i) { i = trunc(x); return x - i; } + + /// + /// Performs a componentwise split of a float4 vector into an integral part i and a fractional part that gets returned. + /// Both parts take the sign of the corresponding input component. + /// + /// Value to split into integral and fractional part. + /// Output value containing integral part of x. + /// The componentwise fractional part of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 modf(float4 x, out float4 i) { i = trunc(x); return x - i; } + + + /// Splits a double value into an integral part i and a fractional part that gets returned. Both parts take the sign of the input. + /// Value to split into integral and fractional part. + /// Output value containing integral part of x. + /// The fractional part of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double modf(double x, out double i) { i = trunc(x); return x - i; } + + /// + /// Performs a componentwise split of a double2 vector into an integral part i and a fractional part that gets returned. + /// Both parts take the sign of the corresponding input component. + /// + /// Value to split into integral and fractional part. + /// Output value containing integral part of x. + /// The componentwise fractional part of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 modf(double2 x, out double2 i) { i = trunc(x); return x - i; } + + /// + /// Performs a componentwise split of a double3 vector into an integral part i and a fractional part that gets returned. + /// Both parts take the sign of the corresponding input component. + /// + /// Value to split into integral and fractional part. + /// Output value containing integral part of x. + /// The componentwise fractional part of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 modf(double3 x, out double3 i) { i = trunc(x); return x - i; } + + /// + /// Performs a componentwise split of a double4 vector into an integral part i and a fractional part that gets returned. + /// Both parts take the sign of the corresponding input component. + /// + /// Value to split into integral and fractional part. + /// Output value containing integral part of x. + /// The componentwise fractional part of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 modf(double4 x, out double4 i) { i = trunc(x); return x - i; } + + + /// Returns the square root of a float value. + /// Value to use when computing square root. + /// The square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float sqrt(float x) { return (float)System.Math.Sqrt((float)x); } + + /// Returns the componentwise square root of a float2 vector. + /// Value to use when computing square root. + /// The componentwise square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 sqrt(float2 x) { return new float2(sqrt(x.x), sqrt(x.y)); } + + /// Returns the componentwise square root of a float3 vector. + /// Value to use when computing square root. + /// The componentwise square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 sqrt(float3 x) { return new float3(sqrt(x.x), sqrt(x.y), sqrt(x.z)); } + + /// Returns the componentwise square root of a float4 vector. + /// Value to use when computing square root. + /// The componentwise square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 sqrt(float4 x) { return new float4(sqrt(x.x), sqrt(x.y), sqrt(x.z), sqrt(x.w)); } + + + /// Returns the square root of a double value. + /// Value to use when computing square root. + /// The square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double sqrt(double x) { return System.Math.Sqrt(x); } + + /// Returns the componentwise square root of a double2 vector. + /// Value to use when computing square root. + /// The componentwise square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 sqrt(double2 x) { return new double2(sqrt(x.x), sqrt(x.y)); } + + /// Returns the componentwise square root of a double3 vector. + /// Value to use when computing square root. + /// The componentwise square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 sqrt(double3 x) { return new double3(sqrt(x.x), sqrt(x.y), sqrt(x.z)); } + + /// Returns the componentwise square root of a double4 vector. + /// Value to use when computing square root. + /// The componentwise square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 sqrt(double4 x) { return new double4(sqrt(x.x), sqrt(x.y), sqrt(x.z), sqrt(x.w)); } + + + /// Returns the reciprocal square root of a float value. + /// Value to use when computing reciprocal square root. + /// The reciprocal square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float rsqrt(float x) { return 1.0f / sqrt(x); } + + /// Returns the componentwise reciprocal square root of a float2 vector. + /// Value to use when computing reciprocal square root. + /// The componentwise reciprocal square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 rsqrt(float2 x) { return 1.0f / sqrt(x); } + + /// Returns the componentwise reciprocal square root of a float3 vector. + /// Value to use when computing reciprocal square root. + /// The componentwise reciprocal square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 rsqrt(float3 x) { return 1.0f / sqrt(x); } + + /// Returns the componentwise reciprocal square root of a float4 vector + /// Value to use when computing reciprocal square root. + /// The componentwise reciprocal square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 rsqrt(float4 x) { return 1.0f / sqrt(x); } + + + /// Returns the reciprocal square root of a double value. + /// Value to use when computing reciprocal square root. + /// The reciprocal square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double rsqrt(double x) { return 1.0 / sqrt(x); } + + /// Returns the componentwise reciprocal square root of a double2 vector. + /// Value to use when computing reciprocal square root. + /// The componentwise reciprocal square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 rsqrt(double2 x) { return 1.0 / sqrt(x); } + + /// Returns the componentwise reciprocal square root of a double3 vector. + /// Value to use when computing reciprocal square root. + /// The componentwise reciprocal square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 rsqrt(double3 x) { return 1.0 / sqrt(x); } + + /// Returns the componentwise reciprocal square root of a double4 vector. + /// Value to use when computing reciprocal square root. + /// The componentwise reciprocal square root. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 rsqrt(double4 x) { return 1.0 / sqrt(x); } + + + /// Returns a normalized version of the float2 vector x by scaling it by 1 / length(x). + /// Vector to normalize. + /// The normalized vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 normalize(float2 x) { return rsqrt(dot(x, x)) * x; } + + /// Returns a normalized version of the float3 vector x by scaling it by 1 / length(x). + /// Vector to normalize. + /// The normalized vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 normalize(float3 x) { return rsqrt(dot(x, x)) * x; } + + /// Returns a normalized version of the float4 vector x by scaling it by 1 / length(x). + /// Vector to normalize. + /// The normalized vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 normalize(float4 x) { return rsqrt(dot(x, x)) * x; } + + + /// Returns a normalized version of the double2 vector x by scaling it by 1 / length(x). + /// Vector to normalize. + /// The normalized vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 normalize(double2 x) { return rsqrt(dot(x, x)) * x; } + + /// Returns a normalized version of the double3 vector x by scaling it by 1 / length(x). + /// Vector to normalize. + /// The normalized vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 normalize(double3 x) { return rsqrt(dot(x, x)) * x; } + + /// Returns a normalized version of the double4 vector x by scaling it by 1 / length(x). + /// Vector to normalize. + /// The normalized vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 normalize(double4 x) { return rsqrt(dot(x, x)) * x; } + + + /// + /// Returns a safe normalized version of the float2 vector x by scaling it by 1 / length(x). + /// Returns the given default value when 1 / length(x) does not produce a finite number. + /// + /// Vector to normalize. + /// Vector to return if normalized vector is not finite. + /// The normalized vector or the default value if the normalized vector is not finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static public float2 normalizesafe(float2 x, float2 defaultvalue = new float2()) + { + float len = math.dot(x, x); + return math.select(defaultvalue, x * math.rsqrt(len), len > FLT_MIN_NORMAL); + } + + /// + /// Returns a safe normalized version of the float3 vector x by scaling it by 1 / length(x). + /// Returns the given default value when 1 / length(x) does not produce a finite number. + /// + /// Vector to normalize. + /// Vector to return if normalized vector is not finite. + /// The normalized vector or the default value if the normalized vector is not finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static public float3 normalizesafe(float3 x, float3 defaultvalue = new float3()) + { + float len = math.dot(x, x); + return math.select(defaultvalue, x * math.rsqrt(len), len > FLT_MIN_NORMAL); + } + + /// + /// Returns a safe normalized version of the float4 vector x by scaling it by 1 / length(x). + /// Returns the given default value when 1 / length(x) does not produce a finite number. + /// + /// Vector to normalize. + /// Vector to return if normalized vector is not finite. + /// The normalized vector or the default value if the normalized vector is not finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static public float4 normalizesafe(float4 x, float4 defaultvalue = new float4()) + { + float len = math.dot(x, x); + return math.select(defaultvalue, x * math.rsqrt(len), len > FLT_MIN_NORMAL); + } + + + /// + /// Returns a safe normalized version of the double4 vector x by scaling it by 1 / length(x). + /// Returns the given default value when 1 / length(x) does not produce a finite number. + /// + /// Vector to normalize. + /// Vector to return if normalized vector is not finite. + /// The normalized vector or the default value if the normalized vector is not finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static public double2 normalizesafe(double2 x, double2 defaultvalue = new double2()) + { + double len = math.dot(x, x); + return math.select(defaultvalue, x * math.rsqrt(len), len > FLT_MIN_NORMAL); + } + + /// + /// Returns a safe normalized version of the double4 vector x by scaling it by 1 / length(x). + /// Returns the given default value when 1 / length(x) does not produce a finite number. + /// + /// Vector to normalize. + /// Vector to return if normalized vector is not finite. + /// The normalized vector or the default value if the normalized vector is not finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static public double3 normalizesafe(double3 x, double3 defaultvalue = new double3()) + { + double len = math.dot(x, x); + return math.select(defaultvalue, x * math.rsqrt(len), len > FLT_MIN_NORMAL); + } + + /// + /// Returns a safe normalized version of the double4 vector x by scaling it by 1 / length(x). + /// Returns the given default value when 1 / length(x) does not produce a finite number. + /// + /// Vector to normalize. + /// Vector to return if normalized vector is not finite. + /// The normalized vector or the default value if the normalized vector is not finite. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static public double4 normalizesafe(double4 x, double4 defaultvalue = new double4()) + { + double len = math.dot(x, x); + return math.select(defaultvalue, x * math.rsqrt(len), len > FLT_MIN_NORMAL); + } + + + /// Returns the length of a float value. Equivalent to the absolute value. + /// Value to use when computing length. + /// Length of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float length(float x) { return abs(x); } + + /// Returns the length of a float2 vector. + /// Vector to use when computing length. + /// Length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float length(float2 x) { return sqrt(dot(x, x)); } + + /// Returns the length of a float3 vector. + /// Vector to use when computing length. + /// Length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float length(float3 x) { return sqrt(dot(x, x)); } + + /// Returns the length of a float4 vector. + /// Vector to use when computing length. + /// Length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float length(float4 x) { return sqrt(dot(x, x)); } + + + /// Returns the length of a double value. Equivalent to the absolute value. + /// Value to use when computing squared length. + /// Squared length of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double length(double x) { return abs(x); } + + /// Returns the length of a double2 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double length(double2 x) { return sqrt(dot(x, x)); } + + /// Returns the length of a double3 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double length(double3 x) { return sqrt(dot(x, x)); } + + /// Returns the length of a double4 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double length(double4 x) { return sqrt(dot(x, x)); } + + + /// Returns the squared length of a float value. Equivalent to squaring the value. + /// Value to use when computing squared length. + /// Squared length of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float lengthsq(float x) { return x*x; } + + /// Returns the squared length of a float2 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float lengthsq(float2 x) { return dot(x, x); } + + /// Returns the squared length of a float3 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float lengthsq(float3 x) { return dot(x, x); } + + /// Returns the squared length of a float4 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float lengthsq(float4 x) { return dot(x, x); } + + + /// Returns the squared length of a double value. Equivalent to squaring the value. + /// Value to use when computing squared length. + /// Squared length of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double lengthsq(double x) { return x * x; } + + /// Returns the squared length of a double2 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double lengthsq(double2 x) { return dot(x, x); } + + /// Returns the squared length of a double3 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double lengthsq(double3 x) { return dot(x, x); } + + /// Returns the squared length of a double4 vector. + /// Vector to use when computing squared length. + /// Squared length of vector x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double lengthsq(double4 x) { return dot(x, x); } + + + /// Returns the distance between two float values. + /// First value to use in distance computation. + /// Second value to use in distance computation. + /// The distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float distance(float x, float y) { return abs(y - x); } + + /// Returns the distance between two float2 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float distance(float2 x, float2 y) { return length(y - x); } + + /// Returns the distance between two float3 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float distance(float3 x, float3 y) { return length(y - x); } + + /// Returns the distance between two float4 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float distance(float4 x, float4 y) { return length(y - x); } + + + /// Returns the distance between two double values. + /// First value to use in distance computation. + /// Second value to use in distance computation. + /// The distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double distance(double x, double y) { return abs(y - x); } + + /// Returns the distance between two double2 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double distance(double2 x, double2 y) { return length(y - x); } + + /// Returns the distance between two double3 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double distance(double3 x, double3 y) { return length(y - x); } + + /// Returns the distance between two double4 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double distance(double4 x, double4 y) { return length(y - x); } + + + /// Returns the squared distance between two float values. + /// First value to use in distance computation. + /// Second value to use in distance computation. + /// The squared distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float distancesq(float x, float y) { return (y - x) * (y - x); } + + /// Returns the squared distance between two float2 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The squared distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float distancesq(float2 x, float2 y) { return lengthsq(y - x); } + + /// Returns the squared distance between two float3 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The squared distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float distancesq(float3 x, float3 y) { return lengthsq(y - x); } + + /// Returns the squared distance between two float4 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The squared distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float distancesq(float4 x, float4 y) { return lengthsq(y - x); } + + + /// Returns the squared distance between two double values. + /// First value to use in distance computation. + /// Second value to use in distance computation. + /// The squared distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double distancesq(double x, double y) { return (y - x) * (y - x); } + + /// Returns the squared distance between two double2 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The squared distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double distancesq(double2 x, double2 y) { return lengthsq(y - x); } + + /// Returns the squared distance between two double3 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The squared distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double distancesq(double3 x, double3 y) { return lengthsq(y - x); } + + /// Returns the squared distance between two double4 vectors. + /// First vector to use in distance computation. + /// Second vector to use in distance computation. + /// The squared distance between x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double distancesq(double4 x, double4 y) { return lengthsq(y - x); } + + + /// Returns the cross product of two float3 vectors. + /// First vector to use in cross product. + /// Second vector to use in cross product. + /// The cross product of x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 cross(float3 x, float3 y) { return (x * y.yzx - x.yzx * y).yzx; } + + /// Returns the cross product of two double3 vectors. + /// First vector to use in cross product. + /// Second vector to use in cross product. + /// The cross product of x and y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 cross(double3 x, double3 y) { return (x * y.yzx - x.yzx * y).yzx; } + + + /// Returns a smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax]. + /// The minimum range of the x parameter. + /// The maximum range of the x parameter. + /// The value to be interpolated. + /// Returns a value camped to the range [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float smoothstep(float xMin, float xMax, float x) + { + var t = saturate((x - xMin) / (xMax - xMin)); + return t * t * (3.0f - (2.0f * t)); + } + + /// Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax]. + /// The minimum range of the x parameter. + /// The maximum range of the x parameter. + /// The value to be interpolated. + /// Returns component values camped to the range [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 smoothstep(float2 xMin, float2 xMax, float2 x) + { + var t = saturate((x - xMin) / (xMax - xMin)); + return t * t * (3.0f - (2.0f * t)); + } + + /// Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax]. + /// The minimum range of the x parameter. + /// The maximum range of the x parameter. + /// The value to be interpolated. + /// Returns component values camped to the range [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 smoothstep(float3 xMin, float3 xMax, float3 x) + { + var t = saturate((x - xMin) / (xMax - xMin)); + return t * t * (3.0f - (2.0f * t)); + } + + /// Returns a componentwise smooth Hermite interpolation between 0.0f and 1.0f when x is in the interval (inclusive) [xMin, xMax]. + /// The minimum range of the x parameter. + /// The maximum range of the x parameter. + /// The value to be interpolated. + /// Returns component values camped to the range [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 smoothstep(float4 xMin, float4 xMax, float4 x) + { + var t = saturate((x - xMin) / (xMax - xMin)); + return t * t * (3.0f - (2.0f * t)); + } + + + /// Returns a smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) [xMin, xMax]. + /// The minimum range of the x parameter. + /// The maximum range of the x parameter. + /// The value to be interpolated. + /// Returns a value camped to the range [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double smoothstep(double xMin, double xMax, double x) + { + var t = saturate((x - xMin) / (xMax - xMin)); + return t * t * (3.0 - (2.0 * t)); + } + + /// Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) [xMin, xMax]. + /// The minimum range of the x parameter. + /// The maximum range of the x parameter. + /// The value to be interpolated. + /// Returns component values camped to the range [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 smoothstep(double2 xMin, double2 xMax, double2 x) + { + var t = saturate((x - xMin) / (xMax - xMin)); + return t * t * (3.0 - (2.0 * t)); + } + + /// Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) [xMin, xMax]. + /// The minimum range of the x parameter. + /// The maximum range of the x parameter. + /// The value to be interpolated. + /// Returns component values camped to the range [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 smoothstep(double3 xMin, double3 xMax, double3 x) + { + var t = saturate((x - xMin) / (xMax - xMin)); + return t * t * (3.0 - (2.0 * t)); + } + + /// Returns a componentwise smooth Hermite interpolation between 0.0 and 1.0 when x is in the interval (inclusive) [xMin, xMax]. + /// The minimum range of the x parameter. + /// The maximum range of the x parameter. + /// The value to be interpolated. + /// Returns component values camped to the range [0, 1]. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 smoothstep(double4 xMin, double4 xMax, double4 x) + { + var t = saturate((x - xMin) / (xMax - xMin)); + return t * t * (3.0 - (2.0 * t)); + } + + + /// Returns true if any component of the input bool2 vector is true, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are true, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(bool2 x) { return x.x || x.y; } + + /// Returns true if any component of the input bool3 vector is true, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are true, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(bool3 x) { return x.x || x.y || x.z; } + + /// Returns true if any components of the input bool4 vector is true, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are true, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(bool4 x) { return x.x || x.y || x.z || x.w; } + + + /// Returns true if any component of the input int2 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(int2 x) { return x.x != 0 || x.y != 0; } + + /// Returns true if any component of the input int3 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(int3 x) { return x.x != 0 || x.y != 0 || x.z != 0; } + + /// Returns true if any components of the input int4 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(int4 x) { return x.x != 0 || x.y != 0 || x.z != 0 || x.w != 0; } + + + /// Returns true if any component of the input uint2 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(uint2 x) { return x.x != 0 || x.y != 0; } + + /// Returns true if any component of the input uint3 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(uint3 x) { return x.x != 0 || x.y != 0 || x.z != 0; } + + /// Returns true if any components of the input uint4 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(uint4 x) { return x.x != 0 || x.y != 0 || x.z != 0 || x.w != 0; } + + + /// Returns true if any component of the input float2 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(float2 x) { return x.x != 0.0f || x.y != 0.0f; } + + /// Returns true if any component of the input float3 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(float3 x) { return x.x != 0.0f || x.y != 0.0f || x.z != 0.0f; } + + /// Returns true if any component of the input float4 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(float4 x) { return x.x != 0.0f || x.y != 0.0f || x.z != 0.0f || x.w != 0.0f; } + + + /// Returns true if any component of the input double2 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(double2 x) { return x.x != 0.0 || x.y != 0.0; } + + /// Returns true if any component of the input double3 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(double3 x) { return x.x != 0.0 || x.y != 0.0 || x.z != 0.0; } + + /// Returns true if any component of the input double4 vector is non-zero, false otherwise. + /// Vector of values to compare. + /// True if any the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool any(double4 x) { return x.x != 0.0 || x.y != 0.0 || x.z != 0.0 || x.w != 0.0; } + + + /// Returns true if all components of the input bool2 vector are true, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are true, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(bool2 x) { return x.x && x.y; } + + /// Returns true if all components of the input bool3 vector are true, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are true, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(bool3 x) { return x.x && x.y && x.z; } + + /// Returns true if all components of the input bool4 vector are true, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are true, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(bool4 x) { return x.x && x.y && x.z && x.w; } + + + /// Returns true if all components of the input int2 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(int2 x) { return x.x != 0 && x.y != 0; } + + /// Returns true if all components of the input int3 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(int3 x) { return x.x != 0 && x.y != 0 && x.z != 0; } + + /// Returns true if all components of the input int4 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(int4 x) { return x.x != 0 && x.y != 0 && x.z != 0 && x.w != 0; } + + + /// Returns true if all components of the input uint2 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(uint2 x) { return x.x != 0 && x.y != 0; } + + /// Returns true if all components of the input uint3 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(uint3 x) { return x.x != 0 && x.y != 0 && x.z != 0; } + + /// Returns true if all components of the input uint4 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(uint4 x) { return x.x != 0 && x.y != 0 && x.z != 0 && x.w != 0; } + + + /// Returns true if all components of the input float2 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(float2 x) { return x.x != 0.0f && x.y != 0.0f; } + + /// Returns true if all components of the input float3 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(float3 x) { return x.x != 0.0f && x.y != 0.0f && x.z != 0.0f; } + + /// Returns true if all components of the input float4 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(float4 x) { return x.x != 0.0f && x.y != 0.0f && x.z != 0.0f && x.w != 0.0f; } + + + /// Returns true if all components of the input double2 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(double2 x) { return x.x != 0.0 && x.y != 0.0; } + + /// Returns true if all components of the input double3 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(double3 x) { return x.x != 0.0 && x.y != 0.0 && x.z != 0.0; } + + /// Returns true if all components of the input double4 vector are non-zero, false otherwise. + /// Vector of values to compare. + /// True if all the components of x are non-zero, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool all(double4 x) { return x.x != 0.0 && x.y != 0.0 && x.z != 0.0 && x.w != 0.0; } + + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int select(int falseValue, int trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 select(int2 falseValue, int2 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 select(int3 falseValue, int3 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 select(int4 falseValue, int4 trueValue, bool test) { return test ? trueValue : falseValue; } + + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 select(int2 falseValue, int2 trueValue, bool2 test) { return new int2(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y); } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 select(int3 falseValue, int3 trueValue, bool3 test) { return new int3(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y, test.z ? trueValue.z : falseValue.z); } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 select(int4 falseValue, int4 trueValue, bool4 test) { return new int4(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y, test.z ? trueValue.z : falseValue.z, test.w ? trueValue.w : falseValue.w); } + + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint select(uint falseValue, uint trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 select(uint2 falseValue, uint2 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 select(uint3 falseValue, uint3 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 select(uint4 falseValue, uint4 trueValue, bool test) { return test ? trueValue : falseValue; } + + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 select(uint2 falseValue, uint2 trueValue, bool2 test) { return new uint2(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y); } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 select(uint3 falseValue, uint3 trueValue, bool3 test) { return new uint3(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y, test.z ? trueValue.z : falseValue.z); } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 select(uint4 falseValue, uint4 trueValue, bool4 test) { return new uint4(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y, test.z ? trueValue.z : falseValue.z, test.w ? trueValue.w : falseValue.w); } + + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long select(long falseValue, long trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong select(ulong falseValue, ulong trueValue, bool test) { return test ? trueValue : falseValue; } + + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float select(float falseValue, float trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 select(float2 falseValue, float2 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 select(float3 falseValue, float3 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 select(float4 falseValue, float4 trueValue, bool test) { return test ? trueValue : falseValue; } + + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 select(float2 falseValue, float2 trueValue, bool2 test) { return new float2(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y); } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 select(float3 falseValue, float3 trueValue, bool3 test) { return new float3(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y, test.z ? trueValue.z : falseValue.z); } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 select(float4 falseValue, float4 trueValue, bool4 test) { return new float4(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y, test.z ? trueValue.z : falseValue.z, test.w ? trueValue.w : falseValue.w); } + + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double select(double falseValue, double trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 select(double2 falseValue, double2 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 select(double3 falseValue, double3 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// Returns trueValue if test is true, falseValue otherwise. + /// Value to use if test is false. + /// Value to use if test is true. + /// Bool value to choose between falseValue and trueValue. + /// The selection between falseValue and trueValue according to bool test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 select(double4 falseValue, double4 trueValue, bool test) { return test ? trueValue : falseValue; } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 select(double2 falseValue, double2 trueValue, bool2 test) { return new double2(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y); } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 select(double3 falseValue, double3 trueValue, bool3 test) { return new double3(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y, test.z ? trueValue.z : falseValue.z); } + + /// + /// Returns a componentwise selection between two double4 vectors falseValue and trueValue based on a bool4 selection mask test. + /// Per component, the component from trueValue is selected when test is true, otherwise the component from falseValue is selected. + /// + /// Values to use if test is false. + /// Values to use if test is true. + /// Selection mask to choose between falseValue and trueValue. + /// The componentwise selection between falseValue and trueValue according to selection mask test. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 select(double4 falseValue, double4 trueValue, bool4 test) { return new double4(test.x ? trueValue.x : falseValue.x, test.y ? trueValue.y : falseValue.y, test.z ? trueValue.z : falseValue.z, test.w ? trueValue.w : falseValue.w); } + + + /// Returns the result of a step function where the result is 1.0f when x >= threshold and 0.0f otherwise. + /// Value to be used as a threshold for returning 1. + /// Value to compare against threshold. + /// 1 if the comparison x >= threshold is true, otherwise 0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float step(float threshold, float x) { return select(0.0f, 1.0f, x >= threshold); } + + /// Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise. + /// Vector of values to be used as a threshold for returning 1. + /// Vector of values to compare against threshold. + /// 1 if the componentwise comparison x >= threshold is true, otherwise 0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 step(float2 threshold, float2 x) { return select(float2(0.0f), float2(1.0f), x >= threshold); } + + /// Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise. + /// Vector of values to be used as a threshold for returning 1. + /// Vector of values to compare against threshold. + /// 1 if the componentwise comparison x >= threshold is true, otherwise 0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 step(float3 threshold, float3 x) { return select(float3(0.0f), float3(1.0f), x >= threshold); } + + /// Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise. + /// Vector of values to be used as a threshold for returning 1. + /// Vector of values to compare against threshold. + /// 1 if the componentwise comparison x >= threshold is true, otherwise 0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 step(float4 threshold, float4 x) { return select(float4(0.0f), float4(1.0f), x >= threshold); } + + + /// Returns the result of a step function where the result is 1.0f when x >= threshold and 0.0f otherwise. + /// Values to be used as a threshold for returning 1. + /// Value to compare against threshold. + /// 1 if the comparison x >= threshold is true, otherwise 0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double step(double threshold, double x) { return select(0.0, 1.0, x >= threshold); } + + /// Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise. + /// Vector of values to be used as a threshold for returning 1. + /// Vector of values to compare against threshold. + /// 1 if the componentwise comparison x >= threshold is true, otherwise 0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 step(double2 threshold, double2 x) { return select(double2(0.0), double2(1.0), x >= threshold); } + + /// Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise. + /// Vector of values to be used as a threshold for returning 1. + /// Vector of values to compare against threshold. + /// 1 if the componentwise comparison x >= threshold is true, otherwise 0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 step(double3 threshold, double3 x) { return select(double3(0.0), double3(1.0), x >= threshold); } + + /// Returns the result of a componentwise step function where each component is 1.0f when x >= threshold and 0.0f otherwise. + /// Vector of values to be used as a threshold for returning 1. + /// Vector of values to compare against threshold. + /// 1 if the componentwise comparison x >= threshold is true, otherwise 0. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 step(double4 threshold, double4 x) { return select(double4(0.0), double4(1.0), x >= threshold); } + + + /// Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f * dot(i, n) * n. + /// Incident vector. + /// Normal vector. + /// Reflection vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 reflect(float2 i, float2 n) { return i - 2f * n * dot(i, n); } + + /// Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f * dot(i, n) * n. + /// Incident vector. + /// Normal vector. + /// Reflection vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 reflect(float3 i, float3 n) { return i - 2f * n * dot(i, n); } + + /// Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f * dot(i, n) * n. + /// Incident vector. + /// Normal vector. + /// Reflection vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 reflect(float4 i, float4 n) { return i - 2f * n * dot(i, n); } + + + /// Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 * dot(i, n) * n. + /// Incident vector. + /// Normal vector. + /// Reflection vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 reflect(double2 i, double2 n) { return i - 2 * n * dot(i, n); } + + /// Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 * dot(i, n) * n. + /// Incident vector. + /// Normal vector. + /// Reflection vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 reflect(double3 i, double3 n) { return i - 2 * n * dot(i, n); } + + /// Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 * dot(i, n) * n. + /// Incident vector. + /// Normal vector. + /// Reflection vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 reflect(double4 i, double4 n) { return i - 2 * n * dot(i, n); } + + + /// Returns the refraction vector given the incident vector i, the normal vector n and the refraction index. + /// Incident vector. + /// Normal vector. + /// Index of refraction. + /// Refraction vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 refract(float2 i, float2 n, float indexOfRefraction) + { + float ni = dot(n, i); + float k = 1.0f - indexOfRefraction * indexOfRefraction * (1.0f - ni * ni); + return select(0.0f, indexOfRefraction * i - (indexOfRefraction * ni + sqrt(k)) * n, k >= 0); + } + + /// Returns the refraction vector given the incident vector i, the normal vector n and the refraction index. + /// Incident vector. + /// Normal vector. + /// Index of refraction. + /// Refraction vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 refract(float3 i, float3 n, float indexOfRefraction) + { + float ni = dot(n, i); + float k = 1.0f - indexOfRefraction * indexOfRefraction * (1.0f - ni * ni); + return select(0.0f, indexOfRefraction * i - (indexOfRefraction * ni + sqrt(k)) * n, k >= 0); + } + + /// Returns the refraction vector given the incident vector i, the normal vector n and the refraction index. + /// Incident vector. + /// Normal vector. + /// Index of refraction. + /// Refraction vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 refract(float4 i, float4 n, float indexOfRefraction) + { + float ni = dot(n, i); + float k = 1.0f - indexOfRefraction * indexOfRefraction * (1.0f - ni * ni); + return select(0.0f, indexOfRefraction * i - (indexOfRefraction * ni + sqrt(k)) * n, k >= 0); + } + + + /// Returns the refraction vector given the incident vector i, the normal vector n and the refraction index. + /// Incident vector. + /// Normal vector. + /// Index of refraction. + /// Refraction vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 refract(double2 i, double2 n, double indexOfRefraction) + { + double ni = dot(n, i); + double k = 1.0 - indexOfRefraction * indexOfRefraction * (1.0 - ni * ni); + return select(0.0f, indexOfRefraction * i - (indexOfRefraction * ni + sqrt(k)) * n, k >= 0); + } + + /// Returns the refraction vector given the incident vector i, the normal vector n and the refraction index. + /// Incident vector. + /// Normal vector. + /// Index of refraction. + /// Refraction vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 refract(double3 i, double3 n, double indexOfRefraction) + { + double ni = dot(n, i); + double k = 1.0 - indexOfRefraction * indexOfRefraction * (1.0 - ni * ni); + return select(0.0f, indexOfRefraction * i - (indexOfRefraction * ni + sqrt(k)) * n, k >= 0); + } + + /// Returns the refraction vector given the incident vector i, the normal vector n and the refraction index. + /// Incident vector. + /// Normal vector. + /// Index of refraction. + /// Refraction vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 refract(double4 i, double4 n, double indexOfRefraction) + { + double ni = dot(n, i); + double k = 1.0 - indexOfRefraction * indexOfRefraction * (1.0 - ni * ni); + return select(0.0f, indexOfRefraction * i - (indexOfRefraction * ni + sqrt(k)) * n, k >= 0); + } + + /// + /// Compute vector projection of a onto b. + /// + /// + /// Some finite vectors a and b could generate a non-finite result. This is most likely when a's components + /// are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). + /// In these cases, you can call + /// which will use a given default value if the result is not finite. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Vector projection of a onto b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 project(float2 a, float2 ontoB) + { + return (dot(a, ontoB) / dot(ontoB, ontoB)) * ontoB; + } + + /// + /// Compute vector projection of a onto b. + /// + /// + /// Some finite vectors a and b could generate a non-finite result. This is most likely when a's components + /// are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). + /// In these cases, you can call + /// which will use a given default value if the result is not finite. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Vector projection of a onto b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 project(float3 a, float3 ontoB) + { + return (dot(a, ontoB) / dot(ontoB, ontoB)) * ontoB; + } + + /// + /// Compute vector projection of a onto b. + /// + /// + /// Some finite vectors a and b could generate a non-finite result. This is most likely when a's components + /// are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). + /// In these cases, you can call + /// which will use a given default value if the result is not finite. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Vector projection of a onto b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 project(float4 a, float4 ontoB) + { + return (dot(a, ontoB) / dot(ontoB, ontoB)) * ontoB; + } + + /// + /// Compute vector projection of a onto b. If result is not finite, then return the default value instead. + /// + /// + /// This function performs extra checks to see if the result of projecting a onto b is finite. If you know that + /// your inputs will generate a finite result or you don't care if the result is finite, then you can call + /// instead which is faster than this + /// function. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Default value to return if projection is not finite. + /// Vector projection of a onto b or the default value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 projectsafe(float2 a, float2 ontoB, float2 defaultValue = new float2()) + { + var proj = project(a, ontoB); + + return select(defaultValue, proj, all(isfinite(proj))); + } + + /// + /// Compute vector projection of a onto b. If result is not finite, then return the default value instead. + /// + /// + /// This function performs extra checks to see if the result of projecting a onto b is finite. If you know that + /// your inputs will generate a finite result or you don't care if the result is finite, then you can call + /// instead which is faster than this + /// function. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Default value to return if projection is not finite. + /// Vector projection of a onto b or the default value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 projectsafe(float3 a, float3 ontoB, float3 defaultValue = new float3()) + { + var proj = project(a, ontoB); + + return select(defaultValue, proj, all(isfinite(proj))); + } + + /// + /// Compute vector projection of a onto b. If result is not finite, then return the default value instead. + /// + /// + /// This function performs extra checks to see if the result of projecting a onto b is finite. If you know that + /// your inputs will generate a finite result or you don't care if the result is finite, then you can call + /// instead which is faster than this + /// function. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Default value to return if projection is not finite. + /// Vector projection of a onto b or the default value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 projectsafe(float4 a, float4 ontoB, float4 defaultValue = new float4()) + { + var proj = project(a, ontoB); + + return select(defaultValue, proj, all(isfinite(proj))); + } + + /// + /// Compute vector projection of a onto b. + /// + /// + /// Some finite vectors a and b could generate a non-finite result. This is most likely when a's components + /// are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). + /// In these cases, you can call + /// which will use a given default value if the result is not finite. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Vector projection of a onto b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 project(double2 a, double2 ontoB) + { + return (dot(a, ontoB) / dot(ontoB, ontoB)) * ontoB; + } + + /// + /// Compute vector projection of a onto b. + /// + /// + /// Some finite vectors a and b could generate a non-finite result. This is most likely when a's components + /// are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). + /// In these cases, you can call + /// which will use a given default value if the result is not finite. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Vector projection of a onto b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 project(double3 a, double3 ontoB) + { + return (dot(a, ontoB) / dot(ontoB, ontoB)) * ontoB; + } + + /// + /// Compute vector projection of a onto b. + /// + /// + /// Some finite vectors a and b could generate a non-finite result. This is most likely when a's components + /// are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). + /// In these cases, you can call + /// which will use a given default value if the result is not finite. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Vector projection of a onto b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 project(double4 a, double4 ontoB) + { + return (dot(a, ontoB) / dot(ontoB, ontoB)) * ontoB; + } + + /// + /// Compute vector projection of a onto b. If result is not finite, then return the default value instead. + /// + /// + /// This function performs extra checks to see if the result of projecting a onto b is finite. If you know that + /// your inputs will generate a finite result or you don't care if the result is finite, then you can call + /// instead which is faster than this + /// function. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Default value to return if projection is not finite. + /// Vector projection of a onto b or the default value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 projectsafe(double2 a, double2 ontoB, double2 defaultValue = new double2()) + { + var proj = project(a, ontoB); + + return select(defaultValue, proj, all(isfinite(proj))); + } + + /// + /// Compute vector projection of a onto b. If result is not finite, then return the default value instead. + /// + /// + /// This function performs extra checks to see if the result of projecting a onto b is finite. If you know that + /// your inputs will generate a finite result or you don't care if the result is finite, then you can call + /// instead which is faster than this + /// function. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Default value to return if projection is not finite. + /// Vector projection of a onto b or the default value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 projectsafe(double3 a, double3 ontoB, double3 defaultValue = new double3()) + { + var proj = project(a, ontoB); + + return select(defaultValue, proj, all(isfinite(proj))); + } + + /// + /// Compute vector projection of a onto b. If result is not finite, then return the default value instead. + /// + /// + /// This function performs extra checks to see if the result of projecting a onto b is finite. If you know that + /// your inputs will generate a finite result or you don't care if the result is finite, then you can call + /// instead which is faster than this + /// function. + /// + /// Vector to project. + /// Non-zero vector to project onto. + /// Default value to return if projection is not finite. + /// Vector projection of a onto b or the default value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 projectsafe(double4 a, double4 ontoB, double4 defaultValue = new double4()) + { + var proj = project(a, ontoB); + + return select(defaultValue, proj, all(isfinite(proj))); + } + + /// Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise. + /// Vector to conditionally flip. + /// First vector in direction comparison. + /// Second vector in direction comparison. + /// -n if i and ng point in the same direction; otherwise return n unchanged. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 faceforward(float2 n, float2 i, float2 ng) { return select(n, -n, dot(ng, i) >= 0.0f); } + + /// Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise. + /// Vector to conditionally flip. + /// First vector in direction comparison. + /// Second vector in direction comparison. + /// -n if i and ng point in the same direction; otherwise return n unchanged. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 faceforward(float3 n, float3 i, float3 ng) { return select(n, -n, dot(ng, i) >= 0.0f); } + + /// Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise. + /// Vector to conditionally flip. + /// First vector in direction comparison. + /// Second vector in direction comparison. + /// -n if i and ng point in the same direction; otherwise return n unchanged. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 faceforward(float4 n, float4 i, float4 ng) { return select(n, -n, dot(ng, i) >= 0.0f); } + + + /// Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise. + /// Vector to conditionally flip. + /// First vector in direction comparison. + /// Second vector in direction comparison. + /// -n if i and ng point in the same direction; otherwise return n unchanged. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 faceforward(double2 n, double2 i, double2 ng) { return select(n, -n, dot(ng, i) >= 0.0f); } + + /// Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise. + /// Vector to conditionally flip. + /// First vector in direction comparison. + /// Second vector in direction comparison. + /// -n if i and ng point in the same direction; otherwise return n unchanged. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 faceforward(double3 n, double3 i, double3 ng) { return select(n, -n, dot(ng, i) >= 0.0f); } + + /// Conditionally flips a vector n if two vectors i and ng are pointing in the same direction. Returns n if dot(i, ng) < 0, -n otherwise. + /// Vector to conditionally flip. + /// First vector in direction comparison. + /// Second vector in direction comparison. + /// -n if i and ng point in the same direction; otherwise return n unchanged. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 faceforward(double4 n, double4 i, double4 ng) { return select(n, -n, dot(ng, i) >= 0.0f); } + + + /// Returns the sine and cosine of the input float value x through the out parameters s and c. + /// When Burst compiled, his method is faster than calling sin() and cos() separately. + /// Input angle in radians. + /// Output sine of the input. + /// Output cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void sincos(float x, out float s, out float c) { s = sin(x); c = cos(x); } + + /// Returns the componentwise sine and cosine of the input float2 vector x through the out parameters s and c. + /// When Burst compiled, his method is faster than calling sin() and cos() separately. + /// Input vector containing angles in radians. + /// Output vector containing the componentwise sine of the input. + /// Output vector containing the componentwise cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void sincos(float2 x, out float2 s, out float2 c) { s = sin(x); c = cos(x); } + + /// Returns the componentwise sine and cosine of the input float3 vector x through the out parameters s and c. + /// When Burst compiled, his method is faster than calling sin() and cos() separately. + /// Input vector containing angles in radians. + /// Output vector containing the componentwise sine of the input. + /// Output vector containing the componentwise cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void sincos(float3 x, out float3 s, out float3 c) { s = sin(x); c = cos(x); } + + /// Returns the componentwise sine and cosine of the input float4 vector x through the out parameters s and c. + /// When Burst compiled, his method is faster than calling sin() and cos() separately. + /// Input vector containing angles in radians. + /// Output vector containing the componentwise sine of the input. + /// Output vector containing the componentwise cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void sincos(float4 x, out float4 s, out float4 c) { s = sin(x); c = cos(x); } + + + /// Returns the sine and cosine of the input double value x through the out parameters s and c. + /// When Burst compiled, his method is faster than calling sin() and cos() separately. + /// Input angle in radians. + /// Output sine of the input. + /// Output cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void sincos(double x, out double s, out double c) { s = sin(x); c = cos(x); } + + /// Returns the componentwise sine and cosine of the input double2 vector x through the out parameters s and c. + /// When Burst compiled, his method is faster than calling sin() and cos() separately. + /// Input vector containing angles in radians. + /// Output vector containing the componentwise sine of the input. + /// Output vector containing the componentwise cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void sincos(double2 x, out double2 s, out double2 c) { s = sin(x); c = cos(x); } + + /// Returns the componentwise sine and cosine of the input double3 vector x through the out parameters s and c. + /// When Burst compiled, his method is faster than calling sin() and cos() separately. + /// Input vector containing angles in radians. + /// Output vector containing the componentwise sine of the input. + /// Output vector containing the componentwise cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void sincos(double3 x, out double3 s, out double3 c) { s = sin(x); c = cos(x); } + + /// Returns the componentwise sine and cosine of the input double4 vector x through the out parameters s and c. + /// When Burst compiled, his method is faster than calling sin() and cos() separately. + /// Input vector containing angles in radians. + /// Output vector containing the componentwise sine of the input. + /// Output vector containing the componentwise cosine of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void sincos(double4 x, out double4 s, out double4 c) { s = sin(x); c = cos(x); } + + + /// Returns number of 1-bits in the binary representation of an int value. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// int value in which to count bits set to 1. + /// Number of bits set to 1 within x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int countbits(int x) { return countbits((uint)x); } + + /// Returns component-wise number of 1-bits in the binary representation of an int2 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// int2 value in which to count bits for each component. + /// int2 containing number of bits set to 1 within each component of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 countbits(int2 x) { return countbits((uint2)x); } + + /// Returns component-wise number of 1-bits in the binary representation of an int3 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// Number in which to count bits. + /// int3 containing number of bits set to 1 within each component of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 countbits(int3 x) { return countbits((uint3)x); } + + /// Returns component-wise number of 1-bits in the binary representation of an int4 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// Number in which to count bits. + /// int4 containing number of bits set to 1 within each component of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 countbits(int4 x) { return countbits((uint4)x); } + + + /// Returns number of 1-bits in the binary representation of a uint value. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// Number in which to count bits. + /// Number of bits set to 1 within x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int countbits(uint x) + { + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + return (int)((((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24); + } + + /// Returns component-wise number of 1-bits in the binary representation of a uint2 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// Number in which to count bits. + /// int2 containing number of bits set to 1 within each component of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 countbits(uint2 x) + { + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + return int2((((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24); + } + + /// Returns component-wise number of 1-bits in the binary representation of a uint3 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// Number in which to count bits. + /// int3 containing number of bits set to 1 within each component of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 countbits(uint3 x) + { + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + return int3((((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24); + } + + /// Returns component-wise number of 1-bits in the binary representation of a uint4 vector. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// Number in which to count bits. + /// int4 containing number of bits set to 1 within each component of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 countbits(uint4 x) + { + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + return int4((((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24); + } + + /// Returns number of 1-bits in the binary representation of a ulong value. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// Number in which to count bits. + /// Number of bits set to 1 within x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int countbits(ulong x) + { + x = x - ((x >> 1) & 0x5555555555555555); + x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333); + return (int)((((x + (x >> 4)) & 0x0F0F0F0F0F0F0F0F) * 0x0101010101010101) >> 56); + } + + /// Returns number of 1-bits in the binary representation of a long value. Also known as the Hamming weight, popcnt on x86, and vcnt on ARM. + /// Number in which to count bits. + /// Number of bits set to 1 within x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int countbits(long x) { return countbits((ulong)x); } + + + /// Returns the componentwise number of leading zeros in the binary representations of an int vector. + /// Input value. + /// The number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int lzcnt(int x) { return lzcnt((uint)x); } + + /// Returns the componentwise number of leading zeros in the binary representations of an int2 vector. + /// Input value. + /// The componentwise number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 lzcnt(int2 x) { return int2(lzcnt(x.x), lzcnt(x.y)); } + + /// Returns the componentwise number of leading zeros in the binary representations of an int3 vector. + /// Input value. + /// The componentwise number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 lzcnt(int3 x) { return int3(lzcnt(x.x), lzcnt(x.y), lzcnt(x.z)); } + + /// Returns the componentwise number of leading zeros in the binary representations of an int4 vector. + /// Input value. + /// The componentwise number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 lzcnt(int4 x) { return int4(lzcnt(x.x), lzcnt(x.y), lzcnt(x.z), lzcnt(x.w)); } + + + /// Returns number of leading zeros in the binary representations of a uint value. + /// Input value. + /// The number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int lzcnt(uint x) + { + if (x == 0) + return 32; + LongDoubleUnion u; + u.doubleValue = 0.0; + u.longValue = 0x4330000000000000L + x; + u.doubleValue -= 4503599627370496.0; + return 0x41E - (int)(u.longValue >> 52); + } + + /// Returns the componentwise number of leading zeros in the binary representations of a uint2 vector. + /// Input value. + /// The componentwise number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 lzcnt(uint2 x) { return int2(lzcnt(x.x), lzcnt(x.y)); } + + /// Returns the componentwise number of leading zeros in the binary representations of a uint3 vector. + /// Input value. + /// The componentwise number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 lzcnt(uint3 x) { return int3(lzcnt(x.x), lzcnt(x.y), lzcnt(x.z)); } + + /// Returns the componentwise number of leading zeros in the binary representations of a uint4 vector. + /// Input value. + /// The componentwise number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 lzcnt(uint4 x) { return int4(lzcnt(x.x), lzcnt(x.y), lzcnt(x.z), lzcnt(x.w)); } + + + /// Returns number of leading zeros in the binary representations of a long value. + /// Input value. + /// The number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int lzcnt(long x) { return lzcnt((ulong)x); } + + + /// Returns number of leading zeros in the binary representations of a ulong value. + /// Input value. + /// The number of leading zeros of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int lzcnt(ulong x) + { + if (x == 0) + return 64; + + uint xh = (uint)(x >> 32); + uint bits = xh != 0 ? xh : (uint)x; + int offset = xh != 0 ? 0x41E : 0x43E; + + LongDoubleUnion u; + u.doubleValue = 0.0; + u.longValue = 0x4330000000000000L + bits; + u.doubleValue -= 4503599627370496.0; + return offset - (int)(u.longValue >> 52); + } + + /// + /// Computes the trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int tzcnt(int x) { return tzcnt((uint)x); } + + /// + /// Computes the component-wise trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the component-wise trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 tzcnt(int2 x) { return int2(tzcnt(x.x), tzcnt(x.y)); } + + /// + /// Computes the component-wise trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the component-wise trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 tzcnt(int3 x) { return int3(tzcnt(x.x), tzcnt(x.y), tzcnt(x.z)); } + + /// + /// Computes the component-wise trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the component-wise trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 tzcnt(int4 x) { return int4(tzcnt(x.x), tzcnt(x.y), tzcnt(x.z), tzcnt(x.w)); } + + + /// + /// Computes the trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int tzcnt(uint x) + { + if (x == 0) + return 32; + + x &= (uint)-x; + LongDoubleUnion u; + u.doubleValue = 0.0; + u.longValue = 0x4330000000000000L + x; + u.doubleValue -= 4503599627370496.0; + return (int)(u.longValue >> 52) - 0x3FF; + } + + /// + /// Computes the component-wise trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the component-wise trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 tzcnt(uint2 x) { return int2(tzcnt(x.x), tzcnt(x.y)); } + + /// + /// Computes the component-wise trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the component-wise trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 tzcnt(uint3 x) { return int3(tzcnt(x.x), tzcnt(x.y), tzcnt(x.z)); } + + /// + /// Computes the component-wise trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the component-wise trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 tzcnt(uint4 x) { return int4(tzcnt(x.x), tzcnt(x.y), tzcnt(x.z), tzcnt(x.w)); } + + /// + /// Computes the trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int tzcnt(long x) { return tzcnt((ulong)x); } + + /// + /// Computes the trailing zero count in the binary representation of the input value. + /// + /// + /// Assuming that the least significant bit is on the right, the integer value 4 has a binary representation + /// 0100 and the trailing zero count is two. The integer value 1 has a binary representation 0001 and the + /// trailing zero count is zero. + /// + /// Input to use when computing the trailing zero count. + /// Returns the trailing zero count of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int tzcnt(ulong x) + { + if (x == 0) + return 64; + + x = x & (ulong)-(long)x; + uint xl = (uint)x; + + uint bits = xl != 0 ? xl : (uint)(x >> 32); + int offset = xl != 0 ? 0x3FF : 0x3DF; + + LongDoubleUnion u; + u.doubleValue = 0.0; + u.longValue = 0x4330000000000000L + bits; + u.doubleValue -= 4503599627370496.0; + return (int)(u.longValue >> 52) - offset; + } + + + + /// Returns the result of performing a reversal of the bit pattern of an int value. + /// Value to reverse. + /// Value with reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int reversebits(int x) { return (int)reversebits((uint)x); } + + /// Returns the result of performing a componentwise reversal of the bit pattern of an int2 vector. + /// Value to reverse. + /// Value with componentwise reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 reversebits(int2 x) { return (int2)reversebits((uint2)x); } + + /// Returns the result of performing a componentwise reversal of the bit pattern of an int3 vector. + /// Value to reverse. + /// Value with componentwise reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 reversebits(int3 x) { return (int3)reversebits((uint3)x); } + + /// Returns the result of performing a componentwise reversal of the bit pattern of an int4 vector. + /// Value to reverse. + /// Value with componentwise reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 reversebits(int4 x) { return (int4)reversebits((uint4)x); } + + + /// Returns the result of performing a reversal of the bit pattern of a uint value. + /// Value to reverse. + /// Value with reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint reversebits(uint x) { + x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); + x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); + x = ((x >> 4) & 0x0F0F0F0F) | ((x & 0x0F0F0F0F) << 4); + x = ((x >> 8) & 0x00FF00FF) | ((x & 0x00FF00FF) << 8); + return (x >> 16) | (x << 16); + } + + /// Returns the result of performing a componentwise reversal of the bit pattern of an uint2 vector. + /// Value to reverse. + /// Value with componentwise reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 reversebits(uint2 x) + { + x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); + x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); + x = ((x >> 4) & 0x0F0F0F0F) | ((x & 0x0F0F0F0F) << 4); + x = ((x >> 8) & 0x00FF00FF) | ((x & 0x00FF00FF) << 8); + return (x >> 16) | (x << 16); + } + + /// Returns the result of performing a componentwise reversal of the bit pattern of an uint3 vector. + /// Value to reverse. + /// Value with componentwise reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 reversebits(uint3 x) + { + x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); + x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); + x = ((x >> 4) & 0x0F0F0F0F) | ((x & 0x0F0F0F0F) << 4); + x = ((x >> 8) & 0x00FF00FF) | ((x & 0x00FF00FF) << 8); + return (x >> 16) | (x << 16); + } + + /// Returns the result of performing a componentwise reversal of the bit pattern of an uint4 vector. + /// Value to reverse. + /// Value with componentwise reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 reversebits(uint4 x) + { + x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); + x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); + x = ((x >> 4) & 0x0F0F0F0F) | ((x & 0x0F0F0F0F) << 4); + x = ((x >> 8) & 0x00FF00FF) | ((x & 0x00FF00FF) << 8); + return (x >> 16) | (x << 16); + } + + + /// Returns the result of performing a reversal of the bit pattern of a long value. + /// Value to reverse. + /// Value with reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long reversebits(long x) { return (long)reversebits((ulong)x); } + + + /// Returns the result of performing a reversal of the bit pattern of a ulong value. + /// Value to reverse. + /// Value with reversed bits. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong reversebits(ulong x) + { + x = ((x >> 1) & 0x5555555555555555ul) | ((x & 0x5555555555555555ul) << 1); + x = ((x >> 2) & 0x3333333333333333ul) | ((x & 0x3333333333333333ul) << 2); + x = ((x >> 4) & 0x0F0F0F0F0F0F0F0Ful) | ((x & 0x0F0F0F0F0F0F0F0Ful) << 4); + x = ((x >> 8) & 0x00FF00FF00FF00FFul) | ((x & 0x00FF00FF00FF00FFul) << 8); + x = ((x >> 16) & 0x0000FFFF0000FFFFul) | ((x & 0x0000FFFF0000FFFFul) << 16); + return (x >> 32) | (x << 32); + } + + + /// Returns the result of rotating the bits of an int left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int rol(int x, int n) { return (int)rol((uint)x, n); } + + /// Returns the componentwise result of rotating the bits of an int2 left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 rol(int2 x, int n) { return (int2)rol((uint2)x, n); } + + /// Returns the componentwise result of rotating the bits of an int3 left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 rol(int3 x, int n) { return (int3)rol((uint3)x, n); } + + /// Returns the componentwise result of rotating the bits of an int4 left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 rol(int4 x, int n) { return (int4)rol((uint4)x, n); } + + + /// Returns the result of rotating the bits of a uint left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint rol(uint x, int n) { return (x << n) | (x >> (32 - n)); } + + /// Returns the componentwise result of rotating the bits of a uint2 left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 rol(uint2 x, int n) { return (x << n) | (x >> (32 - n)); } + + /// Returns the componentwise result of rotating the bits of a uint3 left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 rol(uint3 x, int n) { return (x << n) | (x >> (32 - n)); } + + /// Returns the componentwise result of rotating the bits of a uint4 left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 rol(uint4 x, int n) { return (x << n) | (x >> (32 - n)); } + + + /// Returns the result of rotating the bits of a long left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long rol(long x, int n) { return (long)rol((ulong)x, n); } + + + /// Returns the result of rotating the bits of a ulong left by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong rol(ulong x, int n) { return (x << n) | (x >> (64 - n)); } + + + /// Returns the result of rotating the bits of an int right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int ror(int x, int n) { return (int)ror((uint)x, n); } + + /// Returns the componentwise result of rotating the bits of an int2 right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 ror(int2 x, int n) { return (int2)ror((uint2)x, n); } + + /// Returns the componentwise result of rotating the bits of an int3 right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 ror(int3 x, int n) { return (int3)ror((uint3)x, n); } + + /// Returns the componentwise result of rotating the bits of an int4 right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 ror(int4 x, int n) { return (int4)ror((uint4)x, n); } + + + /// Returns the result of rotating the bits of a uint right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint ror(uint x, int n) { return (x >> n) | (x << (32 - n)); } + + /// Returns the componentwise result of rotating the bits of a uint2 right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 ror(uint2 x, int n) { return (x >> n) | (x << (32 - n)); } + + /// Returns the componentwise result of rotating the bits of a uint3 right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 ror(uint3 x, int n) { return (x >> n) | (x << (32 - n)); } + + /// Returns the componentwise result of rotating the bits of a uint4 right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The componentwise rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 ror(uint4 x, int n) { return (x >> n) | (x << (32 - n)); } + + + /// Returns the result of rotating the bits of a long right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long ror(long x, int n) { return (long)ror((ulong)x, n); } + + + /// Returns the result of rotating the bits of a ulong right by bits n. + /// Value to rotate. + /// Number of bits to rotate. + /// The rotated value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong ror(ulong x, int n) { return (x >> n) | (x << (64 - n)); } + + + /// Returns the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int ceilpow2(int x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; + } + + /// Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The componentwise smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 ceilpow2(int2 x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; + } + + /// Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The componentwise smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 ceilpow2(int3 x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; + } + + /// Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The componentwise smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 ceilpow2(int4 x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; + } + + + /// Returns the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint ceilpow2(uint x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; + } + + /// Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The componentwise smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 ceilpow2(uint2 x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; + } + + /// Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The componentwise smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 ceilpow2(uint3 x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; + } + + /// Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The componentwise smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 ceilpow2(uint4 x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + return x + 1; + } + + + /// Returns the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long ceilpow2(long x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + x |= x >> 32; + return x + 1; + } + + + /// Returns the smallest power of two greater than or equal to the input. + /// Also known as nextpow2. + /// Input value. + /// The smallest power of two greater than or equal to the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong ceilpow2(ulong x) + { + x -= 1; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + x |= x >> 32; + return x + 1; + } + + /// + /// Computes the ceiling of the base-2 logarithm of x. + /// + /// + /// x must be greater than 0, otherwise the result is undefined. + /// + /// Integer to be used as input. + /// Ceiling of the base-2 logarithm of x, as an integer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int ceillog2(int x) + { + return 32 - lzcnt((uint)x - 1); + } + + /// + /// Computes the componentwise ceiling of the base-2 logarithm of x. + /// + /// + /// Components of x must be greater than 0, otherwise the result for that component is undefined. + /// + /// int2 to be used as input. + /// Componentwise ceiling of the base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 ceillog2(int2 x) + { + return new int2(ceillog2(x.x), ceillog2(x.y)); + } + + /// + /// Computes the componentwise ceiling of the base-2 logarithm of x. + /// + /// + /// Components of x must be greater than 0, otherwise the result for that component is undefined. + /// + /// int3 to be used as input. + /// Componentwise ceiling of the base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 ceillog2(int3 x) + { + return new int3(ceillog2(x.x), ceillog2(x.y), ceillog2(x.z)); + } + + /// + /// Computes the componentwise ceiling of the base-2 logarithm of x. + /// + /// + /// Components of x must be greater than 0, otherwise the result for that component is undefined. + /// + /// int4 to be used as input. + /// Componentwise ceiling of the base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 ceillog2(int4 x) + { + return new int4(ceillog2(x.x), ceillog2(x.y), ceillog2(x.z), ceillog2(x.w)); + } + + /// + /// Computes the ceiling of the base-2 logarithm of x. + /// + /// + /// x must be greater than 0, otherwise the result is undefined. + /// + /// Unsigned integer to be used as input. + /// Ceiling of the base-2 logarithm of x, as an integer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int ceillog2(uint x) + { + return 32 - lzcnt(x - 1); + } + + /// + /// Computes the componentwise ceiling of the base-2 logarithm of x. + /// + /// + /// Components of x must be greater than 0, otherwise the result for that component is undefined. + /// + /// uint2 to be used as input. + /// Componentwise ceiling of the base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 ceillog2(uint2 x) + { + return new int2(ceillog2(x.x), ceillog2(x.y)); + } + + /// + /// Computes the componentwise ceiling of the base-2 logarithm of x. + /// + /// + /// Components of x must be greater than 0, otherwise the result for that component is undefined. + /// + /// uint3 to be used as input. + /// Componentwise ceiling of the base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 ceillog2(uint3 x) + { + return new int3(ceillog2(x.x), ceillog2(x.y), ceillog2(x.z)); + } + + /// + /// Computes the componentwise ceiling of the base-2 logarithm of x. + /// + /// + /// Components of x must be greater than 0, otherwise the result for that component is undefined. + /// + /// uint4 to be used as input. + /// Componentwise ceiling of the base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 ceillog2(uint4 x) + { + return new int4(ceillog2(x.x), ceillog2(x.y), ceillog2(x.z), ceillog2(x.w)); + } + + /// + /// Computes the floor of the base-2 logarithm of x. + /// + /// x must be greater than zero, otherwise the result is undefined. + /// Integer to be used as input. + /// Floor of base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int floorlog2(int x) + { + return 31 - lzcnt((uint)x); + } + + /// + /// Computes the componentwise floor of the base-2 logarithm of x. + /// + /// Components of x must be greater than zero, otherwise the result of the component is undefined. + /// int2 to be used as input. + /// Componentwise floor of base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 floorlog2(int2 x) + { + return new int2(floorlog2(x.x), floorlog2(x.y)); + } + + /// + /// Computes the componentwise floor of the base-2 logarithm of x. + /// + /// Components of x must be greater than zero, otherwise the result of the component is undefined. + /// int3 to be used as input. + /// Componentwise floor of base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 floorlog2(int3 x) + { + return new int3(floorlog2(x.x), floorlog2(x.y), floorlog2(x.z)); + } + + /// + /// Computes the componentwise floor of the base-2 logarithm of x. + /// + /// Components of x must be greater than zero, otherwise the result of the component is undefined. + /// int4 to be used as input. + /// Componentwise floor of base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 floorlog2(int4 x) + { + return new int4(floorlog2(x.x), floorlog2(x.y), floorlog2(x.z), floorlog2(x.w)); + } + + /// + /// Computes the floor of the base-2 logarithm of x. + /// + /// x must be greater than zero, otherwise the result is undefined. + /// Unsigned integer to be used as input. + /// Floor of base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int floorlog2(uint x) + { + return 31 - lzcnt(x); + } + + /// + /// Computes the componentwise floor of the base-2 logarithm of x. + /// + /// Components of x must be greater than zero, otherwise the result of the component is undefined. + /// uint2 to be used as input. + /// Componentwise floor of base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 floorlog2(uint2 x) + { + return new int2(floorlog2(x.x), floorlog2(x.y)); + } + + /// + /// Computes the componentwise floor of the base-2 logarithm of x. + /// + /// Components of x must be greater than zero, otherwise the result of the component is undefined. + /// uint3 to be used as input. + /// Componentwise floor of base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 floorlog2(uint3 x) + { + return new int3(floorlog2(x.x), floorlog2(x.y), floorlog2(x.z)); + } + + /// + /// Computes the componentwise floor of the base-2 logarithm of x. + /// + /// Components of x must be greater than zero, otherwise the result of the component is undefined. + /// uint4 to be used as input. + /// Componentwise floor of base-2 logarithm of x. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 floorlog2(uint4 x) + { + return new int4(floorlog2(x.x), floorlog2(x.y), floorlog2(x.z), floorlog2(x.w)); + } + + /// Returns the result of converting a float value from degrees to radians. + /// Angle in degrees. + /// Angle converted to radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float radians(float x) { return x * TORADIANS; } + + /// Returns the result of a componentwise conversion of a float2 vector from degrees to radians. + /// Vector containing angles in degrees. + /// Vector containing angles converted to radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 radians(float2 x) { return x * TORADIANS; } + + /// Returns the result of a componentwise conversion of a float3 vector from degrees to radians. + /// Vector containing angles in degrees. + /// Vector containing angles converted to radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 radians(float3 x) { return x * TORADIANS; } + + /// Returns the result of a componentwise conversion of a float4 vector from degrees to radians. + /// Vector containing angles in degrees. + /// Vector containing angles converted to radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 radians(float4 x) { return x * TORADIANS; } + + + /// Returns the result of converting a float value from degrees to radians. + /// Angle in degrees. + /// Angle converted to radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double radians(double x) { return x * TORADIANS_DBL; } + + /// Returns the result of a componentwise conversion of a float2 vector from degrees to radians. + /// Vector containing angles in degrees. + /// Vector containing angles converted to radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 radians(double2 x) { return x * TORADIANS_DBL; } + + /// Returns the result of a componentwise conversion of a float3 vector from degrees to radians. + /// Vector containing angles in degrees. + /// Vector containing angles converted to radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 radians(double3 x) { return x * TORADIANS_DBL; } + + /// Returns the result of a componentwise conversion of a float4 vector from degrees to radians. + /// Vector containing angles in degrees. + /// Vector containing angles converted to radians. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 radians(double4 x) { return x * TORADIANS_DBL; } + + + /// Returns the result of converting a double value from radians to degrees. + /// Angle in radians. + /// Angle converted to degrees. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float degrees(float x) { return x * TODEGREES; } + + /// Returns the result of a componentwise conversion of a double2 vector from radians to degrees. + /// Vector containing angles in radians. + /// Vector containing angles converted to degrees. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 degrees(float2 x) { return x * TODEGREES; } + + /// Returns the result of a componentwise conversion of a double3 vector from radians to degrees. + /// Vector containing angles in radians. + /// Vector containing angles converted to degrees. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 degrees(float3 x) { return x * TODEGREES; } + + /// Returns the result of a componentwise conversion of a double4 vector from radians to degrees. + /// Vector containing angles in radians. + /// Vector containing angles converted to degrees. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 degrees(float4 x) { return x * TODEGREES; } + + + /// Returns the result of converting a double value from radians to degrees. + /// Angle in radians. + /// Angle converted to degrees. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double degrees(double x) { return x * TODEGREES_DBL; } + + /// Returns the result of a componentwise conversion of a double2 vector from radians to degrees. + /// Vector containing angles in radians. + /// Vector containing angles converted to degrees. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 degrees(double2 x) { return x * TODEGREES_DBL; } + + /// Returns the result of a componentwise conversion of a double3 vector from radians to degrees. + /// Vector containing angles in radians. + /// Vector containing values converted to degrees. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 degrees(double3 x) { return x * TODEGREES_DBL; } + + /// Returns the result of a componentwise conversion of a double4 vector from radians to degrees. + /// Vector containing angles in radians. + /// Vector containing angles converted to degrees. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 degrees(double4 x) { return x * TODEGREES_DBL; } + + + /// Returns the minimum component of an int2 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int cmin(int2 x) { return min(x.x, x.y); } + + /// Returns the minimum component of an int3 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int cmin(int3 x) { return min(min(x.x, x.y), x.z); } + + /// Returns the minimum component of an int4 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int cmin(int4 x) { return min(min(x.x, x.y), min(x.z, x.w)); } + + + /// Returns the minimum component of a uint2 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint cmin(uint2 x) { return min(x.x, x.y); } + + /// Returns the minimum component of a uint3 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint cmin(uint3 x) { return min(min(x.x, x.y), x.z); } + + /// Returns the minimum component of a uint4 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint cmin(uint4 x) { return min(min(x.x, x.y), min(x.z, x.w)); } + + + /// Returns the minimum component of a float2 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float cmin(float2 x) { return min(x.x, x.y); } + + /// Returns the minimum component of a float3 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float cmin(float3 x) { return min(min(x.x, x.y), x.z); } + + /// Returns the minimum component of a float4 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float cmin(float4 x) { return min(min(x.x, x.y), min(x.z, x.w)); } + + + /// Returns the minimum component of a double2 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double cmin(double2 x) { return min(x.x, x.y); } + + /// Returns the minimum component of a double3 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double cmin(double3 x) { return min(min(x.x, x.y), x.z); } + + /// Returns the minimum component of a double4 vector. + /// The vector to use when computing the minimum component. + /// The value of the minimum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double cmin(double4 x) { return min(min(x.x, x.y), min(x.z, x.w)); } + + + /// Returns the maximum component of an int2 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int cmax(int2 x) { return max(x.x, x.y); } + + /// Returns the maximum component of an int3 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int cmax(int3 x) { return max(max(x.x, x.y), x.z); } + + /// Returns the maximum component of an int4 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int cmax(int4 x) { return max(max(x.x, x.y), max(x.z, x.w)); } + + + /// Returns the maximum component of a uint2 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint cmax(uint2 x) { return max(x.x, x.y); } + + /// Returns the maximum component of a uint3 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint cmax(uint3 x) { return max(max(x.x, x.y), x.z); } + + /// Returns the maximum component of a uint4 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint cmax(uint4 x) { return max(max(x.x, x.y), max(x.z, x.w)); } + + + /// Returns the maximum component of a float2 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float cmax(float2 x) { return max(x.x, x.y); } + + /// Returns the maximum component of a float3 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float cmax(float3 x) { return max(max(x.x, x.y), x.z); } + + /// Returns the maximum component of a float4 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float cmax(float4 x) { return max(max(x.x, x.y), max(x.z, x.w)); } + + + /// Returns the maximum component of a double2 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double cmax(double2 x) { return max(x.x, x.y); } + + /// Returns the maximum component of a double3 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double cmax(double3 x) { return max(max(x.x, x.y), x.z); } + + /// Returns the maximum component of a double4 vector. + /// The vector to use when computing the maximum component. + /// The value of the maximum component of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double cmax(double4 x) { return max(max(x.x, x.y), max(x.z, x.w)); } + + + /// Returns the horizontal sum of components of an int2 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int csum(int2 x) { return x.x + x.y; } + + /// Returns the horizontal sum of components of an int3 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int csum(int3 x) { return x.x + x.y + x.z; } + + /// Returns the horizontal sum of components of an int4 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int csum(int4 x) { return x.x + x.y + x.z + x.w; } + + + /// Returns the horizontal sum of components of a uint2 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint csum(uint2 x) { return x.x + x.y; } + + /// Returns the horizontal sum of components of a uint3 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint csum(uint3 x) { return x.x + x.y + x.z; } + + /// Returns the horizontal sum of components of a uint4 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint csum(uint4 x) { return x.x + x.y + x.z + x.w; } + + + /// Returns the horizontal sum of components of a float2 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float csum(float2 x) { return x.x + x.y; } + + /// Returns the horizontal sum of components of a float3 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float csum(float3 x) { return x.x + x.y + x.z; } + + /// Returns the horizontal sum of components of a float4 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float csum(float4 x) { return (x.x + x.y) + (x.z + x.w); } + + + /// Returns the horizontal sum of components of a double2 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double csum(double2 x) { return x.x + x.y; } + + /// Returns the horizontal sum of components of a double3 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double csum(double3 x) { return x.x + x.y + x.z; } + + /// Returns the horizontal sum of components of a double4 vector. + /// The vector to use when computing the horizontal sum. + /// The horizontal sum of of components of the vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double csum(double4 x) { return (x.x + x.y) + (x.z + x.w); } + + /// + /// Computes the square (x * x) of the input argument x. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float square(float x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 square(float2 x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 square(float3 x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 square(float4 x) + { + return x * x; + } + + /// + /// Computes the square (x * x) of the input argument x. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double square(double x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 square(double2 x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 square(double3 x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 square(double4 x) + { + return x * x; + } + + /// + /// Computes the square (x * x) of the input argument x. + /// + /// + /// Due to integer overflow, it's not always guaranteed that square(x) is positive. For example, square(46341) + /// will return -2147479015. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int square(int x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// + /// Due to integer overflow, it's not always guaranteed that square(x) is positive. For example, square(new int2(46341)) + /// will return new int2(-2147479015). + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 square(int2 x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// + /// Due to integer overflow, it's not always guaranteed that square(x) is positive. For example, square(new int3(46341)) + /// will return new int3(-2147479015). + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 square(int3 x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// + /// Due to integer overflow, it's not always guaranteed that square(x) is positive. For example, square(new int4(46341)) + /// will return new int4(-2147479015). + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 square(int4 x) + { + return x * x; + } + + /// + /// Computes the square (x * x) of the input argument x. + /// + /// + /// Due to integer overflow, it's not always guaranteed that square(x) >= x. For example, square(4294967295u) + /// will return 1u. + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint square(uint x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// + /// Due to integer overflow, it's not always guaranteed that square(x) >= x. For example, square(new uint2(4294967295u)) + /// will return new uint2(1u). + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 square(uint2 x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// + /// Due to integer overflow, it's not always guaranteed that square(x) >= x. For example, square(new uint3(4294967295u)) + /// will return new uint3(1u). + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 square(uint3 x) + { + return x * x; + } + + /// + /// Computes the component-wise square (x * x) of the input argument x. + /// + /// + /// Due to integer overflow, it's not always guaranteed that square(x) >= x. For example, square(new uint4(4294967295u)) + /// will return new uint4(1u). + /// + /// Value to square. + /// Returns the square of the input. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 square(uint4 x) + { + return x * x; + } + + /// + /// Packs components with an enabled mask to the left. + /// + /// + /// This function is also known as left packing. The effect of this function is to filter out components that + /// are not enabled and leave an output buffer tightly packed with only the enabled components. A common use + /// case is if you perform intersection tests on arrays of data in structure of arrays (SoA) form and need to + /// produce an output array of the things that intersected. + /// + /// Pointer to packed output array where enabled components should be stored to. + /// Index into output array where first enabled component should be stored to. + /// The value to to compress. + /// Mask indicating which components are enabled. + /// Index to element after the last one stored. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int compress(int* output, int index, int4 val, bool4 mask) + { + if (mask.x) + output[index++] = val.x; + if (mask.y) + output[index++] = val.y; + if (mask.z) + output[index++] = val.z; + if (mask.w) + output[index++] = val.w; + + return index; + } + + /// + /// Packs components with an enabled mask to the left. + /// + /// + /// This function is also known as left packing. The effect of this function is to filter out components that + /// are not enabled and leave an output buffer tightly packed with only the enabled components. A common use + /// case is if you perform intersection tests on arrays of data in structure of arrays (SoA) form and need to + /// produce an output array of the things that intersected. + /// + /// Pointer to packed output array where enabled components should be stored to. + /// Index into output array where first enabled component should be stored to. + /// The value to to compress. + /// Mask indicating which components are enabled. + /// Index to element after the last one stored. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int compress(uint* output, int index, uint4 val, bool4 mask) + { + return compress((int*)output, index, *(int4*)&val, mask); + } + + /// + /// Packs components with an enabled mask to the left. + /// + /// + /// This function is also known as left packing. The effect of this function is to filter out components that + /// are not enabled and leave an output buffer tightly packed with only the enabled components. A common use + /// case is if you perform intersection tests on arrays of data in structure of arrays (SoA) form and need to + /// produce an output array of the things that intersected. + /// + /// Pointer to packed output array where enabled components should be stored to. + /// Index into output array where first enabled component should be stored to. + /// The value to to compress. + /// Mask indicating which components are enabled. + /// Index to element after the last one stored. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static unsafe int compress(float* output, int index, float4 val, bool4 mask) + { + return compress((int*)output, index, *(int4*)&val, mask); + } + + /// Returns the floating point representation of a half-precision floating point value. + /// The half precision float. + /// The single precision float representation of the half precision float. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float f16tof32(uint x) + { + const uint shifted_exp = (0x7c00 << 13); + uint uf = (x & 0x7fff) << 13; + uint e = uf & shifted_exp; + uf += (127 - 15) << 23; + uf += select(0, (128u - 16u) << 23, e == shifted_exp); + uf = select(uf, asuint(asfloat(uf + (1 << 23)) - 6.10351563e-05f), e == 0); + uf |= (x & 0x8000) << 16; + return asfloat(uf); + } + + /// Returns the floating point representation of a half-precision floating point vector. + /// The half precision float vector. + /// The single precision float vector representation of the half precision float vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 f16tof32(uint2 x) + { + const uint shifted_exp = (0x7c00 << 13); + uint2 uf = (x & 0x7fff) << 13; + uint2 e = uf & shifted_exp; + uf += (127 - 15) << 23; + uf += select(0, (128u - 16u) << 23, e == shifted_exp); + uf = select(uf, asuint(asfloat(uf + (1 << 23)) - 6.10351563e-05f), e == 0); + uf |= (x & 0x8000) << 16; + return asfloat(uf); + } + + /// Returns the floating point representation of a half-precision floating point vector. + /// The half precision float vector. + /// The single precision float vector representation of the half precision float vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 f16tof32(uint3 x) + { + const uint shifted_exp = (0x7c00 << 13); + uint3 uf = (x & 0x7fff) << 13; + uint3 e = uf & shifted_exp; + uf += (127 - 15) << 23; + uf += select(0, (128u - 16u) << 23, e == shifted_exp); + uf = select(uf, asuint(asfloat(uf + (1 << 23)) - 6.10351563e-05f), e == 0); + uf |= (x & 0x8000) << 16; + return asfloat(uf); + } + + /// Returns the floating point representation of a half-precision floating point vector. + /// The half precision float vector. + /// The single precision float vector representation of the half precision float vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 f16tof32(uint4 x) + { + const uint shifted_exp = (0x7c00 << 13); + uint4 uf = (x & 0x7fff) << 13; + uint4 e = uf & shifted_exp; + uf += (127 - 15) << 23; + uf += select(0, (128u - 16u) << 23, e == shifted_exp); + uf = select(uf, asuint(asfloat(uf + (1 << 23)) - 6.10351563e-05f), e == 0); + uf |= (x & 0x8000) << 16; + return asfloat(uf); + } + + /// Returns the result converting a float value to its nearest half-precision floating point representation. + /// The single precision float. + /// The half precision float representation of the single precision float. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint f32tof16(float x) + { + const int infinity_32 = 255 << 23; + const uint msk = 0x7FFFF000u; + + uint ux = asuint(x); + uint uux = ux & msk; + uint h = (uint)(asuint(min(asfloat(uux) * 1.92592994e-34f, 260042752.0f)) + 0x1000) >> 13; // Clamp to signed infinity if overflowed + h = select(h, select(0x7c00u, 0x7e00u, (int)uux > infinity_32), (int)uux >= infinity_32); // NaN->qNaN and Inf->Inf + return h | (ux & ~msk) >> 16; + } + + /// Returns the result of a componentwise conversion of a float2 vector to its nearest half-precision floating point representation. + /// The single precision float vector. + /// The half precision float vector representation of the single precision float vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 f32tof16(float2 x) + { + const int infinity_32 = 255 << 23; + const uint msk = 0x7FFFF000u; + + uint2 ux = asuint(x); + uint2 uux = ux & msk; + uint2 h = (uint2)(asint(min(asfloat(uux) * 1.92592994e-34f, 260042752.0f)) + 0x1000) >> 13; // Clamp to signed infinity if overflowed + h = select(h, select(0x7c00u, 0x7e00u, (int2)uux > infinity_32), (int2)uux >= infinity_32); // NaN->qNaN and Inf->Inf + return h | (ux & ~msk) >> 16; + } + + /// Returns the result of a componentwise conversion of a float3 vector to its nearest half-precision floating point representation. + /// The single precision float vector. + /// The half precision float vector representation of the single precision float vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 f32tof16(float3 x) + { + const int infinity_32 = 255 << 23; + const uint msk = 0x7FFFF000u; + + uint3 ux = asuint(x); + uint3 uux = ux & msk; + uint3 h = (uint3)(asint(min(asfloat(uux) * 1.92592994e-34f, 260042752.0f)) + 0x1000) >> 13; // Clamp to signed infinity if overflowed + h = select(h, select(0x7c00u, 0x7e00u, (int3)uux > infinity_32), (int3)uux >= infinity_32); // NaN->qNaN and Inf->Inf + return h | (ux & ~msk) >> 16; + } + + /// Returns the result of a componentwise conversion of a float4 vector to its nearest half-precision floating point representation. + /// The single precision float vector. + /// The half precision float vector representation of the single precision float vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 f32tof16(float4 x) + { + const int infinity_32 = 255 << 23; + const uint msk = 0x7FFFF000u; + + uint4 ux = asuint(x); + uint4 uux = ux & msk; + uint4 h = (uint4)(asint(min(asfloat(uux) * 1.92592994e-34f, 260042752.0f)) + 0x1000) >> 13; // Clamp to signed infinity if overflowed + h = select(h, select(0x7c00u, 0x7e00u, (int4)uux > infinity_32), (int4)uux >= infinity_32); // NaN->qNaN and Inf->Inf + return h | (ux & ~msk) >> 16; + } + + /// + /// Generate an orthonormal basis given a single unit length normal vector. + /// + /// + /// This implementation is from "Building an Orthonormal Basis, Revisited" + /// https://graphics.pixar.com/library/OrthonormalB/paper.pdf + /// + /// Unit length normal vector. + /// Output unit length vector, orthogonal to normal vector. + /// Output unit length vector, orthogonal to normal vector and basis1. + public static void orthonormal_basis(float3 normal, out float3 basis1, out float3 basis2) + { + var sign = normal.z >= 0.0f ? 1.0f : -1.0f; + var a = -1.0f / (sign + normal.z); + var b = normal.x * normal.y * a; + basis1.x = 1.0f + sign * normal.x * normal.x * a; + basis1.y = sign * b; + basis1.z = -sign * normal.x; + basis2.x = b; + basis2.y = sign + normal.y * normal.y * a; + basis2.z = -normal.y; + } + + /// + /// Generate an orthonormal basis given a single unit length normal vector. + /// + /// + /// This implementation is from "Building an Orthonormal Basis, Revisited" + /// https://graphics.pixar.com/library/OrthonormalB/paper.pdf + /// + /// Unit length normal vector. + /// Output unit length vector, orthogonal to normal vector. + /// Output unit length vector, orthogonal to normal vector and basis1. + public static void orthonormal_basis(double3 normal, out double3 basis1, out double3 basis2) + { + var sign = normal.z >= 0.0 ? 1.0 : -1.0; + var a = -1.0 / (sign + normal.z); + var b = normal.x * normal.y * a; + basis1.x = 1.0 + sign * normal.x * normal.x * a; + basis1.y = sign * b; + basis1.z = -sign * normal.x; + basis2.x = b; + basis2.y = sign + normal.y * normal.y * a; + basis2.z = -normal.y; + } + + /// Change the sign of x based on the most significant bit of y [msb(y) ? -x : x]. + /// The single precision float to change the sign. + /// The single precision float used to test the most significant bit. + /// Returns x with changed sign based on y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float chgsign(float x, float y) + { + return asfloat(asuint(x) ^ (asuint(y) & 0x80000000)); + } + + /// Change the sign of components of x based on the most significant bit of components of y [msb(y) ? -x : x]. + /// The single precision float vector to change the sign. + /// The single precision float vector used to test the most significant bit. + /// Returns vector x with changed sign based on vector y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 chgsign(float2 x, float2 y) + { + return asfloat(asuint(x) ^ (asuint(y) & 0x80000000)); + } + + /// Change the sign of components of x based on the most significant bit of components of y [msb(y) ? -x : x]. + /// The single precision float vector to change the sign. + /// The single precision float vector used to test the most significant bit. + /// Returns vector x with changed sign based on vector y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 chgsign(float3 x, float3 y) + { + return asfloat(asuint(x) ^ (asuint(y) & 0x80000000)); + } + + /// Change the sign of components of x based on the most significant bit of components of y [msb(y) ? -x : x]. + /// The single precision float vector to change the sign. + /// The single precision float vector used to test the most significant bit. + /// Returns vector x with changed sign based on vector y. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 chgsign(float4 x, float4 y) + { + return asfloat(asuint(x) ^ (asuint(y) & 0x80000000)); + } + + /// + /// Read 32 bits of data in little endian format. + /// + /// Memory address to read from. + /// 32 bits in little endian format. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static unsafe uint read32_little_endian(void* pBuffer) + { + byte* ptr = (byte*)pBuffer; + return (uint)ptr[0] | ((uint)ptr[1] << 8) | ((uint)ptr[2] << 16) | ((uint)ptr[3] << 24); + } + + private static unsafe uint hash_with_unaligned_loads(void* pBuffer, int numBytes, uint seed) + { + unchecked + { + const uint Prime1 = 2654435761; + const uint Prime2 = 2246822519; + const uint Prime3 = 3266489917; + const uint Prime4 = 668265263; + const uint Prime5 = 374761393; + + uint4* p = (uint4*)pBuffer; + uint hash = seed + Prime5; + if (numBytes >= 16) + { + uint4 state = new uint4(Prime1 + Prime2, Prime2, 0, (uint)-Prime1) + seed; + + int count = numBytes >> 4; + for (int i = 0; i < count; ++i) + { + state += *p++ * Prime2; + state = (state << 13) | (state >> 19); + state *= Prime1; + } + + hash = rol(state.x, 1) + rol(state.y, 7) + rol(state.z, 12) + rol(state.w, 18); + } + + hash += (uint)numBytes; + + uint* puint = (uint*)p; + for (int i = 0; i < ((numBytes >> 2) & 3); ++i) + { + hash += *puint++ * Prime3; + hash = rol(hash, 17) * Prime4; + } + + byte* pbyte = (byte*)puint; + for (int i = 0; i < ((numBytes) & 3); ++i) + { + hash += (*pbyte++) * Prime5; + hash = rol(hash, 11) * Prime1; + } + + hash ^= hash >> 15; + hash *= Prime2; + hash ^= hash >> 13; + hash *= Prime3; + hash ^= hash >> 16; + + return hash; + } + } + + private static unsafe uint hash_without_unaligned_loads(void* pBuffer, int numBytes, uint seed) + { + unchecked + { + const uint Prime1 = 2654435761; + const uint Prime2 = 2246822519; + const uint Prime3 = 3266489917; + const uint Prime4 = 668265263; + const uint Prime5 = 374761393; + + byte* p = (byte*)pBuffer; + uint hash = seed + Prime5; + if (numBytes >= 16) + { + uint4 state = new uint4(Prime1 + Prime2, Prime2, 0, (uint)-Prime1) + seed; + + int count = numBytes >> 4; + for (int i = 0; i < count; ++i) + { + var data = new uint4(read32_little_endian(p), read32_little_endian(p + 4), read32_little_endian(p + 8), read32_little_endian(p + 12)); + state += data * Prime2; + state = rol(state, 13); + state *= Prime1; + p += 16; + } + + hash = rol(state.x, 1) + rol(state.y, 7) + rol(state.z, 12) + rol(state.w, 18); + } + + hash += (uint)numBytes; + + for (int i = 0; i < ((numBytes >> 2) & 3); ++i) + { + hash += read32_little_endian(p) * Prime3; + hash = rol(hash, 17) * Prime4; + p += 4; + } + + for (int i = 0; i < ((numBytes) & 3); ++i) + { + hash += (*p++) * Prime5; + hash = rol(hash, 11) * Prime1; + } + + hash ^= hash >> 15; + hash *= Prime2; + hash ^= hash >> 13; + hash *= Prime3; + hash ^= hash >> 16; + + return hash; + } + } + + /// Returns a uint hash from a block of memory using the xxhash32 algorithm. Can only be used in an unsafe context. + /// A pointer to the beginning of the data. + /// Number of bytes to hash. + /// Starting seed value. + /// The 32 bit hash of the input data buffer. + public static unsafe uint hash(void* pBuffer, int numBytes, uint seed = 0) + { +#if !UNITY_64 && UNITY_ANDROID + return hash_without_unaligned_loads(pBuffer, numBytes, seed); +#else + return hash_with_unaligned_loads(pBuffer, numBytes, seed); +#endif + } + + /// + /// Unity's up axis (0, 1, 0). + /// + /// Matches [https://docs.unity3d.com/ScriptReference/Vector3-up.html](https://docs.unity3d.com/ScriptReference/Vector3-up.html) + /// The up axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 up() { return new float3(0.0f, 1.0f, 0.0f); } // for compatibility + + /// + /// Unity's down axis (0, -1, 0). + /// + /// Matches [https://docs.unity3d.com/ScriptReference/Vector3-down.html](https://docs.unity3d.com/ScriptReference/Vector3-down.html) + /// The down axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 down() { return new float3(0.0f, -1.0f, 0.0f); } + + /// + /// Unity's forward axis (0, 0, 1). + /// + /// Matches [https://docs.unity3d.com/ScriptReference/Vector3-forward.html](https://docs.unity3d.com/ScriptReference/Vector3-forward.html) + /// The forward axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 forward() { return new float3(0.0f, 0.0f, 1.0f); } + + /// + /// Unity's back axis (0, 0, -1). + /// + /// Matches [https://docs.unity3d.com/ScriptReference/Vector3-back.html](https://docs.unity3d.com/ScriptReference/Vector3-back.html) + /// The back axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 back() { return new float3(0.0f, 0.0f, -1.0f); } + + /// + /// Unity's left axis (-1, 0, 0). + /// + /// Matches [https://docs.unity3d.com/ScriptReference/Vector3-left.html](https://docs.unity3d.com/ScriptReference/Vector3-left.html) + /// The left axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 left() { return new float3(-1.0f, 0.0f, 0.0f); } + + /// + /// Unity's right axis (1, 0, 0). + /// + /// Matches [https://docs.unity3d.com/ScriptReference/Vector3-right.html](https://docs.unity3d.com/ScriptReference/Vector3-right.html) + /// The right axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 right() { return new float3(1.0f, 0.0f, 0.0f); } + + /// + /// Returns the Euler angle representation of the quaternion following the XYZ rotation order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The quaternion to convert to Euler angles. + /// The Euler angle representation of the quaternion in XYZ order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 EulerXYZ(quaternion q) + { + const float epsilon = 1e-6f; + const float cutoff = (1f - 2f * epsilon) * (1f - 2f * epsilon); + + // prepare the data + var qv = q.value; + var d1 = qv * qv.wwww * float4(2f); //xw, yw, zw, ww + var d2 = qv * qv.yzxw * float4(2f); //xy, yz, zx, ww + var d3 = qv * qv; + var euler = Unity.Mathematics.float3.zero; + + var y1 = d2.z - d1.y; + if (y1 * y1 < cutoff) + { + var x1 = d2.y + d1.x; + var x2 = d3.z + d3.w - d3.y - d3.x; + var z1 = d2.x + d1.z; + var z2 = d3.x + d3.w - d3.y - d3.z; + euler = float3(atan2(x1, x2), -asin(y1), atan2(z1, z2)); + } + else //xzx + { + y1 = clamp(y1, -1f, 1f); + var abcd = float4(d2.z, d1.y, d2.x, d1.z); + var x1 = 2f * (abcd.x * abcd.w + abcd.y * abcd.z); //2(ad+bc) + var x2 = csum(abcd * abcd * float4(-1f, 1f, -1f, 1f)); + euler = float3(atan2(x1, x2), -asin(y1), 0f); + } + + return euler; + } + + /// + /// Returns the Euler angle representation of the quaternion following the XZY rotation order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The quaternion to convert to Euler angles. + /// The Euler angle representation of the quaternion in XZY order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 EulerXZY(quaternion q) + { + const float epsilon = 1e-6f; + const float cutoff = (1f - 2f * epsilon) * (1f - 2f * epsilon); + + // prepare the data + var qv = q.value; + var d1 = qv * qv.wwww * float4(2f); //xw, yw, zw, ww + var d2 = qv * qv.yzxw * float4(2f); //xy, yz, zx, ww + var d3 = qv * qv; + var euler = Unity.Mathematics.float3.zero; + + var y1 = d2.x + d1.z; + if (y1 * y1 < cutoff) + { + var x1 = -d2.y + d1.x; + var x2 = d3.y + d3.w - d3.z - d3.x; + var z1 = -d2.z + d1.y; + var z2 = d3.x + d3.w - d3.y - d3.z; + euler = float3(atan2(x1, x2), asin(y1), atan2(z1, z2)); + } + else //xyx + { + y1 = clamp(y1, -1f, 1f); + var abcd = float4(d2.x, d1.z, d2.z, d1.y); + var x1 = 2f * (abcd.x * abcd.w + abcd.y * abcd.z); //2(ad+bc) + var x2 = csum(abcd * abcd * float4(-1f, 1f, -1f, 1f)); + euler = float3(atan2(x1, x2), asin(y1), 0f); + } + + return euler.xzy; + } + + /// + /// Returns the Euler angle representation of the quaternion following the YXZ rotation order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The quaternion to convert to Euler angles. + /// The Euler angle representation of the quaternion in YXZ order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 EulerYXZ(quaternion q) + { + const float epsilon = 1e-6f; + const float cutoff = (1f - 2f * epsilon) * (1f - 2f * epsilon); + + // prepare the data + var qv = q.value; + var d1 = qv * qv.wwww * float4(2f); //xw, yw, zw, ww + var d2 = qv * qv.yzxw * float4(2f); //xy, yz, zx, ww + var d3 = qv * qv; + var euler = Unity.Mathematics.float3.zero; + + var y1 = d2.y + d1.x; + if (y1 * y1 < cutoff) + { + var x1 = -d2.z + d1.y; + var x2 = d3.z + d3.w - d3.x - d3.y; + var z1 = -d2.x + d1.z; + var z2 = d3.y + d3.w - d3.z - d3.x; + euler = float3(atan2(x1, x2), asin(y1), atan2(z1, z2)); + } + else //yzy + { + y1 = clamp(y1, -1f, 1f); + var abcd = float4(d2.x, d1.z, d2.y, d1.x); + var x1 = 2f * (abcd.x * abcd.w + abcd.y * abcd.z); //2(ad+bc) + var x2 = csum(abcd * abcd * float4(-1f, 1f, -1f, 1f)); + euler = float3(atan2(x1, x2), asin(y1), 0f); + } + + return euler.yxz; + } + + /// + /// Returns the Euler angle representation of the quaternion following the YZX rotation order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The quaternion to convert to Euler angles. + /// The Euler angle representation of the quaternion in YZX order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 EulerYZX(quaternion q) + { + const float epsilon = 1e-6f; + const float cutoff = (1f - 2f * epsilon) * (1f - 2f * epsilon); + + // prepare the data + var qv = q.value; + var d1 = qv * qv.wwww * float4(2f); //xw, yw, zw, ww + var d2 = qv * qv.yzxw * float4(2f); //xy, yz, zx, ww + var d3 = qv * qv; + var euler = Unity.Mathematics.float3.zero; + + var y1 = d2.x - d1.z; + if (y1 * y1 < cutoff) + { + var x1 = d2.z + d1.y; + var x2 = d3.x + d3.w - d3.z - d3.y; + var z1 = d2.y + d1.x; + var z2 = d3.y + d3.w - d3.x - d3.z; + euler = float3(atan2(x1, x2), -asin(y1), atan2(z1, z2)); + } + else //yxy + { + y1 = clamp(y1, -1f, 1f); + var abcd = float4(d2.x, d1.z, d2.y, d1.x); + var x1 = 2f * (abcd.x * abcd.w + abcd.y * abcd.z); //2(ad+bc) + var x2 = csum(abcd * abcd * float4(-1f, 1f, -1f, 1f)); + euler = float3(atan2(x1, x2), -asin(y1), 0f); + } + + return euler.zxy; + } + + /// + /// Returns the Euler angle representation of the quaternion following the ZXY rotation order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The quaternion to convert to Euler angles. + /// The Euler angle representation of the quaternion in ZXY order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 EulerZXY(quaternion q) + { + const float epsilon = 1e-6f; + const float cutoff = (1f - 2f * epsilon) * (1f - 2f * epsilon); + + // prepare the data + var qv = q.value; + var d1 = qv * qv.wwww * float4(2f); //xw, yw, zw, ww + var d2 = qv * qv.yzxw * float4(2f); //xy, yz, zx, ww + var d3 = qv * qv; + var euler = Unity.Mathematics.float3.zero; + + var y1 = d2.y - d1.x; + if (y1 * y1 < cutoff) + { + var x1 = d2.x + d1.z; + var x2 = d3.y + d3.w - d3.x - d3.z; + var z1 = d2.z + d1.y; + var z2 = d3.z + d3.w - d3.x - d3.y; + euler = float3(atan2(x1, x2), -asin(y1), atan2(z1, z2)); + } + else //zxz + { + y1 = clamp(y1, -1f, 1f); + var abcd = float4(d2.z, d1.y, d2.y, d1.x); + var x1 = 2f * (abcd.x * abcd.w + abcd.y * abcd.z); //2(ad+bc) + var x2 = csum(abcd * abcd * float4(-1f, 1f, -1f, 1f)); + euler = float3(atan2(x1, x2), -asin(y1), 0f); + } + + return euler.yzx; + } + + /// + /// Returns the Euler angle representation of the quaternion following the ZYX rotation order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The quaternion to convert to Euler angles. + /// The Euler angle representation of the quaternion in ZYX order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 EulerZYX(quaternion q) + { + const float epsilon = 1e-6f; + const float cutoff = (1f - 2f * epsilon) * (1f - 2f * epsilon); + + var qv = q.value; + var d1 = qv * qv.wwww * float4(2f); //xw, yw, zw, ww + var d2 = qv * qv.yzxw * float4(2f); //xy, yz, zx, ww + var d3 = qv * qv; + var euler = Unity.Mathematics.float3.zero; + + var y1 = d2.z + d1.y; + if (y1 * y1 < cutoff) + { + var x1 = -d2.x + d1.z; + var x2 = d3.x + d3.w - d3.y - d3.z; + var z1 = -d2.y + d1.x; + var z2 = d3.z + d3.w - d3.y - d3.x; + euler = float3(atan2(x1, x2), asin(y1), atan2(z1, z2)); + } + else //zxz + { + y1 = clamp(y1, -1f, 1f); + var abcd = float4(d2.z, d1.y, d2.y, d1.x); + var x1 = 2f * (abcd.x * abcd.w + abcd.y * abcd.z); //2(ad+bc) + var x2 = csum(abcd * abcd * float4(-1f, 1f, -1f, 1f)); + euler = float3(atan2(x1, x2), asin(y1), 0f); + } + + return euler.zyx; + } + + /// + /// Returns the Euler angle representation of the quaternion. The returned angles depend on the specified order to apply the + /// three rotations around the principal axes. All rotation angles are in radians and clockwise when looking along the + /// rotation axis towards the origin. + /// When the rotation order is known at compile time, to get the best performance you should use the specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// The quaternion to convert to Euler angles. + /// The order in which the rotations are applied. + /// The Euler angle representation of the quaternion in the specified order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 Euler(quaternion q, math.RotationOrder order = math.RotationOrder.Default) + { + switch (order) + { + case math.RotationOrder.XYZ: + return EulerXYZ(q); + case math.RotationOrder.XZY: + return EulerXZY(q); + case math.RotationOrder.YXZ: + return EulerYXZ(q); + case math.RotationOrder.YZX: + return EulerYZX(q); + case math.RotationOrder.ZXY: + return EulerZXY(q); + case math.RotationOrder.ZYX: + return EulerZYX(q); + default: + return Unity.Mathematics.float3.zero; + } + } + + /// + /// Matrix columns multiplied by scale components + /// m.c0.x * s.x | m.c1.x * s.y | m.c2.x * s.z + /// m.c0.y * s.x | m.c1.y * s.y | m.c2.y * s.z + /// m.c0.z * s.x | m.c1.z * s.y | m.c2.z * s.z + /// + /// Matrix to scale. + /// Scaling coefficients for each column. + /// The scaled matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 mulScale(float3x3 m, float3 s) => new float3x3(m.c0 * s.x, m.c1 * s.y, m.c2 * s.z); + + /// + /// Matrix rows multiplied by scale components + /// m.c0.x * s.x | m.c1.x * s.x | m.c2.x * s.x + /// m.c0.y * s.y | m.c1.y * s.y | m.c2.y * s.y + /// m.c0.z * s.z | m.c1.z * s.z | m.c2.z * s.z + /// + /// Scaling coefficients for each row. + /// Matrix to scale. + /// The scaled matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 scaleMul(float3 s, float3x3 m) => new float3x3(m.c0 * s, m.c1 * s, m.c2 * s); + + // Internal + + // SSE shuffles + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float4 unpacklo(float4 a, float4 b) + { + return shuffle(a, b, ShuffleComponent.LeftX, ShuffleComponent.RightX, ShuffleComponent.LeftY, ShuffleComponent.RightY); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double4 unpacklo(double4 a, double4 b) + { + return shuffle(a, b, ShuffleComponent.LeftX, ShuffleComponent.RightX, ShuffleComponent.LeftY, ShuffleComponent.RightY); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float4 unpackhi(float4 a, float4 b) + { + return shuffle(a, b, ShuffleComponent.LeftZ, ShuffleComponent.RightZ, ShuffleComponent.LeftW, ShuffleComponent.RightW); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double4 unpackhi(double4 a, double4 b) + { + return shuffle(a, b, ShuffleComponent.LeftZ, ShuffleComponent.RightZ, ShuffleComponent.LeftW, ShuffleComponent.RightW); + } + + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float4 movelh(float4 a, float4 b) + { + return shuffle(a, b, ShuffleComponent.LeftX, ShuffleComponent.LeftY, ShuffleComponent.RightX, ShuffleComponent.RightY); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double4 movelh(double4 a, double4 b) + { + return shuffle(a, b, ShuffleComponent.LeftX, ShuffleComponent.LeftY, ShuffleComponent.RightX, ShuffleComponent.RightY); + } + + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static float4 movehl(float4 a, float4 b) + { + return shuffle(b, a, ShuffleComponent.LeftZ, ShuffleComponent.LeftW, ShuffleComponent.RightZ, ShuffleComponent.RightW); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static double4 movehl(double4 a, double4 b) + { + return shuffle(b, a, ShuffleComponent.LeftZ, ShuffleComponent.LeftW, ShuffleComponent.RightZ, ShuffleComponent.RightW); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint fold_to_uint(double x) // utility for double hashing + { + LongDoubleUnion u; + u.longValue = 0; + u.doubleValue = x; + return (uint)(u.longValue >> 32) ^ (uint)u.longValue; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint2 fold_to_uint(double2 x) { return uint2(fold_to_uint(x.x), fold_to_uint(x.y)); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint3 fold_to_uint(double3 x) { return uint3(fold_to_uint(x.x), fold_to_uint(x.y), fold_to_uint(x.z)); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint4 fold_to_uint(double4 x) { return uint4(fold_to_uint(x.x), fold_to_uint(x.y), fold_to_uint(x.z), fold_to_uint(x.w)); } + + [StructLayout(LayoutKind.Explicit)] + internal struct LongDoubleUnion + { + [FieldOffset(0)] + public long longValue; + [FieldOffset(0)] + public double doubleValue; + } + } +} diff --git a/ThirdParty/Unity.Mathematics/matrix.cs b/ThirdParty/Unity.Mathematics/matrix.cs new file mode 100644 index 0000000..449c7e3 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/matrix.cs @@ -0,0 +1,1115 @@ +using System.Runtime.CompilerServices; +using static Unity.Mathematics.math; + +namespace Unity.Mathematics +{ + public partial struct float2x2 + { + /// + /// Computes a float2x2 matrix representing a counter-clockwise rotation by an angle in radians. + /// + /// + /// A positive rotation angle will produce a counter-clockwise rotation and a negative rotation angle will + /// produce a clockwise rotation. + /// + /// Rotation angle in radians. + /// Returns the 2x2 rotation matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 Rotate(float angle) + { + float s, c; + sincos(angle, out s, out c); + return float2x2(c, -s, + s, c); + } + + /// Returns a float2x2 matrix representing a uniform scaling of both axes by s. + /// The scaling factor. + /// The float2x2 matrix representing uniform scale by s. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 Scale(float s) + { + return float2x2(s, 0.0f, + 0.0f, s); + } + + /// Returns a float2x2 matrix representing a non-uniform axis scaling by x and y. + /// The x-axis scaling factor. + /// The y-axis scaling factor. + /// The float2x2 matrix representing a non-uniform scale. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 Scale(float x, float y) + { + return float2x2(x, 0.0f, + 0.0f, y); + } + + /// Returns a float2x2 matrix representing a non-uniform axis scaling by the components of the float2 vector v. + /// The float2 containing the x and y axis scaling factors. + /// The float2x2 matrix representing a non-uniform scale. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 Scale(float2 v) + { + return Scale(v.x, v.y); + } + } + + public partial struct float3x3 + { + /// + /// Constructs a float3x3 from the upper left 3x3 of a float4x4. + /// + /// to extract a float3x3 from. + public float3x3(float4x4 f4x4) + { + c0 = f4x4.c0.xyz; + c1 = f4x4.c1.xyz; + c2 = f4x4.c2.xyz; + } + + /// Constructs a float3x3 matrix from a unit quaternion. + /// The quaternion rotation. + public float3x3(quaternion q) + { + float4 v = q.value; + float4 v2 = v + v; + + uint3 npn = uint3(0x80000000, 0x00000000, 0x80000000); + uint3 nnp = uint3(0x80000000, 0x80000000, 0x00000000); + uint3 pnn = uint3(0x00000000, 0x80000000, 0x80000000); + c0 = v2.y * asfloat(asuint(v.yxw) ^ npn) - v2.z * asfloat(asuint(v.zwx) ^ pnn) + float3(1, 0, 0); + c1 = v2.z * asfloat(asuint(v.wzy) ^ nnp) - v2.x * asfloat(asuint(v.yxw) ^ npn) + float3(0, 1, 0); + c2 = v2.x * asfloat(asuint(v.zwx) ^ pnn) - v2.y * asfloat(asuint(v.wzy) ^ nnp) + float3(0, 0, 1); + } + + /// + /// Returns a float3x3 matrix representing a rotation around a unit axis by an angle in radians. + /// The rotation direction is clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation axis. + /// The angle of rotation in radians. + /// The float3x3 matrix representing the rotation around an axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 AxisAngle(float3 axis, float angle) + { + float sina, cosa; + math.sincos(angle, out sina, out cosa); + + float3 u = axis; + float3 u_yzx = u.yzx; + float3 u_zxy = u.zxy; + float3 u_inv_cosa = u - u * cosa; // u * (1.0f - cosa); + float4 t = float4(u * sina, cosa); + + uint3 ppn = uint3(0x00000000, 0x00000000, 0x80000000); + uint3 npp = uint3(0x80000000, 0x00000000, 0x00000000); + uint3 pnp = uint3(0x00000000, 0x80000000, 0x00000000); + + return float3x3( + u.x * u_inv_cosa + asfloat(asuint(t.wzy) ^ ppn), + u.y * u_inv_cosa + asfloat(asuint(t.zwx) ^ npp), + u.z * u_inv_cosa + asfloat(asuint(t.yxw) ^ pnp) + ); + /* + return float3x3( + cosa + u.x * u.x * (1.0f - cosa), u.y * u.x * (1.0f - cosa) - u.z * sina, u.z * u.x * (1.0f - cosa) + u.y * sina, + u.x * u.y * (1.0f - cosa) + u.z * sina, cosa + u.y * u.y * (1.0f - cosa), u.y * u.z * (1.0f - cosa) - u.x * sina, + u.x * u.z * (1.0f - cosa) - u.y * sina, u.y * u.z * (1.0f - cosa) + u.x * sina, cosa + u.z * u.z * (1.0f - cosa) + ); + */ + } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in x-y-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerXYZ(float3 xyz) + { + // return mul(rotateZ(xyz.z), mul(rotateY(xyz.y), rotateX(xyz.x))); + float3 s, c; + sincos(xyz, out s, out c); + return float3x3( + c.y * c.z, c.z * s.x * s.y - c.x * s.z, c.x * c.z * s.y + s.x * s.z, + c.y * s.z, c.x * c.z + s.x * s.y * s.z, c.x * s.y * s.z - c.z * s.x, + -s.y, c.y * s.x, c.x * c.y + ); + } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in x-z-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerXZY(float3 xyz) + { + // return mul(rotateY(xyz.y), mul(rotateZ(xyz.z), rotateX(xyz.x))); } + float3 s, c; + sincos(xyz, out s, out c); + return float3x3( + c.y * c.z, s.x * s.y - c.x * c.y * s.z, c.x * s.y + c.y * s.x * s.z, + s.z, c.x * c.z, -c.z * s.x, + -c.z * s.y, c.y * s.x + c.x * s.y * s.z, c.x * c.y - s.x * s.y * s.z + ); + } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in y-x-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerYXZ(float3 xyz) + { + // return mul(rotateZ(xyz.z), mul(rotateX(xyz.x), rotateY(xyz.y))); + float3 s, c; + sincos(xyz, out s, out c); + return float3x3( + c.y * c.z - s.x * s.y * s.z, -c.x * s.z, c.z * s.y + c.y * s.x * s.z, + c.z * s.x * s.y + c.y * s.z, c.x * c.z, s.y * s.z - c.y * c.z * s.x, + -c.x * s.y, s.x, c.x * c.y + ); + } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in y-z-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerYZX(float3 xyz) + { + // return mul(rotateX(xyz.x), mul(rotateZ(xyz.z), rotateY(xyz.y))); + float3 s, c; + sincos(xyz, out s, out c); + return float3x3( + c.y * c.z, -s.z, c.z * s.y, + s.x * s.y + c.x * c.y * s.z, c.x * c.z, c.x * s.y * s.z - c.y * s.x, + c.y * s.x * s.z - c.x * s.y, c.z * s.x, c.x * c.y + s.x * s.y * s.z + ); + } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// This is the default order rotation order in Unity. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in z-x-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerZXY(float3 xyz) + { + // return mul(rotateY(xyz.y), mul(rotateX(xyz.x), rotateZ(xyz.z))); + float3 s, c; + sincos(xyz, out s, out c); + return float3x3( + c.y * c.z + s.x * s.y * s.z, c.z * s.x * s.y - c.y * s.z, c.x * s.y, + c.x * s.z, c.x * c.z, -s.x, + c.y * s.x * s.z - c.z * s.y, c.y * c.z * s.x + s.y * s.z, c.x * c.y + ); + } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in z-y-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerZYX(float3 xyz) + { + // return mul(rotateX(xyz.x), mul(rotateY(xyz.y), rotateZ(xyz.z))); + float3 s, c; + sincos(xyz, out s, out c); + return float3x3( + c.y * c.z, -c.y * s.z, s.y, + c.z * s.x * s.y + c.x * s.z, c.x * c.z - s.x * s.y * s.z, -c.y * s.x, + s.x * s.z - c.x * c.z * s.y, c.z * s.x + c.x * s.y * s.z, c.x * c.y + ); + } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in x-y-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerXYZ(float x, float y, float z) { return EulerXYZ(float3(x, y, z)); } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in x-z-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerXZY(float x, float y, float z) { return EulerXZY(float3(x, y, z)); } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in y-x-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerYXZ(float x, float y, float z) { return EulerYXZ(float3(x, y, z)); } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in y-z-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerYZX(float x, float y, float z) { return EulerYZX(float3(x, y, z)); } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// This is the default order rotation order in Unity. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in z-x-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerZXY(float x, float y, float z) { return EulerZXY(float3(x, y, z)); } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float3x3 rotation matrix representing the rotation by Euler angles in z-y-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 EulerZYX(float x, float y, float z) { return EulerZYX(float3(x, y, z)); } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing 3 rotations around the principal axes in a given order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// When the rotation order is known at compile time, it is recommended for performance reasons to use specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The order in which the rotations are applied. + /// The float3x3 rotation matrix representing the rotation by Euler angles in the given order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 Euler(float3 xyz, RotationOrder order = RotationOrder.Default) + { + switch (order) + { + case RotationOrder.XYZ: + return EulerXYZ(xyz); + case RotationOrder.XZY: + return EulerXZY(xyz); + case RotationOrder.YXZ: + return EulerYXZ(xyz); + case RotationOrder.YZX: + return EulerYZX(xyz); + case RotationOrder.ZXY: + return EulerZXY(xyz); + case RotationOrder.ZYX: + return EulerZYX(xyz); + default: + return float3x3.identity; + } + } + + /// + /// Returns a float3x3 rotation matrix constructed by first performing 3 rotations around the principal axes in a given order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// When the rotation order is known at compile time, it is recommended for performance reasons to use specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The order in which the rotations are applied. + /// The float3x3 rotation matrix representing the rotation by Euler angles in the given order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 Euler(float x, float y, float z, RotationOrder order = RotationOrder.Default) + { + return Euler(float3(x, y, z), order); + } + + /// Returns a float3x3 matrix that rotates around the x-axis by a given number of radians. + /// The clockwise rotation angle when looking along the x-axis towards the origin in radians. + /// The float3x3 rotation matrix representing a rotation around the x-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 RotateX(float angle) + { + // {{1, 0, 0}, {0, c_0, -s_0}, {0, s_0, c_0}} + float s, c; + sincos(angle, out s, out c); + return float3x3(1.0f, 0.0f, 0.0f, + 0.0f, c, -s, + 0.0f, s, c); + } + + /// Returns a float3x3 matrix that rotates around the y-axis by a given number of radians. + /// The clockwise rotation angle when looking along the y-axis towards the origin in radians. + /// The float3x3 rotation matrix representing a rotation around the y-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 RotateY(float angle) + { + // {{c_1, 0, s_1}, {0, 1, 0}, {-s_1, 0, c_1}} + float s, c; + sincos(angle, out s, out c); + return float3x3(c, 0.0f, s, + 0.0f, 1.0f, 0.0f, + -s, 0.0f, c); + } + + /// Returns a float3x3 matrix that rotates around the z-axis by a given number of radians. + /// The clockwise rotation angle when looking along the z-axis towards the origin in radians. + /// The float3x3 rotation matrix representing a rotation around the z-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 RotateZ(float angle) + { + // {{c_2, -s_2, 0}, {s_2, c_2, 0}, {0, 0, 1}} + float s, c; + sincos(angle, out s, out c); + return float3x3(c, -s, 0.0f, + s, c, 0.0f, + 0.0f, 0.0f, 1.0f); + } + + /// Returns a float3x3 matrix representing a uniform scaling of all axes by s. + /// The uniform scaling factor. + /// The float3x3 matrix representing a uniform scale. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 Scale(float s) + { + return float3x3(s, 0.0f, 0.0f, + 0.0f, s, 0.0f, + 0.0f, 0.0f, s); + } + + /// Returns a float3x3 matrix representing a non-uniform axis scaling by x, y and z. + /// The x-axis scaling factor. + /// The y-axis scaling factor. + /// The z-axis scaling factor. + /// The float3x3 rotation matrix representing a non-uniform scale. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 Scale(float x, float y, float z) + { + return float3x3(x, 0.0f, 0.0f, + 0.0f, y, 0.0f, + 0.0f, 0.0f, z); + } + + /// Returns a float3x3 matrix representing a non-uniform axis scaling by the components of the float3 vector v. + /// The vector containing non-uniform scaling factors. + /// The float3x3 rotation matrix representing a non-uniform scale. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 Scale(float3 v) + { + return Scale(v.x, v.y, v.z); + } + + /// + /// Returns a float3x3 view rotation matrix given a unit length forward vector and a unit length up vector. + /// The two input vectors are assumed to be unit length and not collinear. + /// If these assumptions are not met use float3x3.LookRotationSafe instead. + /// + /// The forward vector to align the center of view with. + /// The up vector to point top of view toward. + /// The float3x3 view rotation matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 LookRotation(float3 forward, float3 up) + { + float3 t = normalize(cross(up, forward)); + return float3x3(t, cross(forward, t), forward); + } + + /// + /// Returns a float3x3 view rotation matrix given a forward vector and an up vector. + /// The two input vectors are not assumed to be unit length. + /// If the magnitude of either of the vectors is so extreme that the calculation cannot be carried out reliably or the vectors are collinear, + /// the identity will be returned instead. + /// + /// The forward vector to align the center of view with. + /// The up vector to point top of view toward. + /// The float3x3 view rotation matrix or the identity matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 LookRotationSafe(float3 forward, float3 up) + { + float forwardLengthSq = dot(forward, forward); + float upLengthSq = dot(up, up); + + forward *= rsqrt(forwardLengthSq); + up *= rsqrt(upLengthSq); + + float3 t = cross(up, forward); + float tLengthSq = dot(t, t); + t *= rsqrt(tLengthSq); + + float mn = min(min(forwardLengthSq, upLengthSq), tLengthSq); + float mx = max(max(forwardLengthSq, upLengthSq), tLengthSq); + + bool accept = mn > 1e-35f && mx < 1e35f && isfinite(forwardLengthSq) && isfinite(upLengthSq) && isfinite(tLengthSq); + return float3x3( + select(float3(1,0,0), t, accept), + select(float3(0,1,0), cross(forward, t), accept), + select(float3(0,0,1), forward, accept)); + } + + /// + /// Converts a float4x4 to a float3x3. + /// + /// The float4x4 to convert to a float3x3. + /// The float3x3 constructed from the upper left 3x3 of the input float4x4 matrix. + public static explicit operator float3x3(float4x4 f4x4) => new float3x3(f4x4); + } + + public partial struct float4x4 + { + /// Constructs a float4x4 from a float3x3 rotation matrix and a float3 translation vector. + /// The float3x3 rotation matrix. + /// The translation vector. + public float4x4(float3x3 rotation, float3 translation) + { + c0 = float4(rotation.c0, 0.0f); + c1 = float4(rotation.c1, 0.0f); + c2 = float4(rotation.c2, 0.0f); + c3 = float4(translation, 1.0f); + } + + /// Constructs a float4x4 from a quaternion and a float3 translation vector. + /// The quaternion rotation. + /// The translation vector. + public float4x4(quaternion rotation, float3 translation) + { + float3x3 rot = float3x3(rotation); + c0 = float4(rot.c0, 0.0f); + c1 = float4(rot.c1, 0.0f); + c2 = float4(rot.c2, 0.0f); + c3 = float4(translation, 1.0f); + } + + /// Constructs a float4x4 from a RigidTransform. + /// The RigidTransform. + public float4x4(RigidTransform transform) + { + float3x3 rot = float3x3(transform.rot); + c0 = float4(rot.c0, 0.0f); + c1 = float4(rot.c1, 0.0f); + c2 = float4(rot.c2, 0.0f); + c3 = float4(transform.pos, 1.0f); + } + + /// + /// Returns a float4x4 matrix representing a rotation around a unit axis by an angle in radians. + /// The rotation direction is clockwise when looking along the rotation axis towards the origin. + /// + /// The axis of rotation. + /// The angle of rotation in radians. + /// The float4x4 matrix representing the rotation about an axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 AxisAngle(float3 axis, float angle) + { + float sina, cosa; + math.sincos(angle, out sina, out cosa); + + float4 u = float4(axis, 0.0f); + float4 u_yzx = u.yzxx; + float4 u_zxy = u.zxyx; + float4 u_inv_cosa = u - u * cosa; // u * (1.0f - cosa); + float4 t = float4(u.xyz * sina, cosa); + + uint4 ppnp = uint4(0x00000000, 0x00000000, 0x80000000, 0x00000000); + uint4 nppp = uint4(0x80000000, 0x00000000, 0x00000000, 0x00000000); + uint4 pnpp = uint4(0x00000000, 0x80000000, 0x00000000, 0x00000000); + uint4 mask = uint4(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000); + + return float4x4( + u.x * u_inv_cosa + asfloat((asuint(t.wzyx) ^ ppnp) & mask), + u.y * u_inv_cosa + asfloat((asuint(t.zwxx) ^ nppp) & mask), + u.z * u_inv_cosa + asfloat((asuint(t.yxwx) ^ pnpp) & mask), + float4(0.0f, 0.0f, 0.0f, 1.0f) + ); + + } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in x-y-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerXYZ(float3 xyz) + { + // return mul(rotateZ(xyz.z), mul(rotateY(xyz.y), rotateX(xyz.x))); + float3 s, c; + sincos(xyz, out s, out c); + return float4x4( + c.y * c.z, c.z * s.x * s.y - c.x * s.z, c.x * c.z * s.y + s.x * s.z, 0.0f, + c.y * s.z, c.x * c.z + s.x * s.y * s.z, c.x * s.y * s.z - c.z * s.x, 0.0f, + -s.y, c.y * s.x, c.x * c.y, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in x-z-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerXZY(float3 xyz) + { + // return mul(rotateY(xyz.y), mul(rotateZ(xyz.z), rotateX(xyz.x))); } + float3 s, c; + sincos(xyz, out s, out c); + return float4x4( + c.y * c.z, s.x * s.y - c.x * c.y * s.z, c.x * s.y + c.y * s.x * s.z, 0.0f, + s.z, c.x * c.z, -c.z * s.x, 0.0f, + -c.z * s.y, c.y * s.x + c.x * s.y * s.z, c.x * c.y - s.x * s.y * s.z, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in y-x-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerYXZ(float3 xyz) + { + // return mul(rotateZ(xyz.z), mul(rotateX(xyz.x), rotateY(xyz.y))); + float3 s, c; + sincos(xyz, out s, out c); + return float4x4( + c.y * c.z - s.x * s.y * s.z, -c.x * s.z, c.z * s.y + c.y * s.x * s.z, 0.0f, + c.z * s.x * s.y + c.y * s.z, c.x * c.z, s.y * s.z - c.y * c.z * s.x, 0.0f, + -c.x * s.y, s.x, c.x * c.y, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in y-z-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerYZX(float3 xyz) + { + // return mul(rotateX(xyz.x), mul(rotateZ(xyz.z), rotateY(xyz.y))); + float3 s, c; + sincos(xyz, out s, out c); + return float4x4( + c.y * c.z, -s.z, c.z * s.y, 0.0f, + s.x * s.y + c.x * c.y * s.z, c.x * c.z, c.x * s.y * s.z - c.y * s.x, 0.0f, + c.y * s.x * s.z - c.x * s.y, c.z * s.x, c.x * c.y + s.x * s.y * s.z, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// This is the default order rotation order in Unity. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in z-x-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerZXY(float3 xyz) + { + // return mul(rotateY(xyz.y), mul(rotateX(xyz.x), rotateZ(xyz.z))); + float3 s, c; + sincos(xyz, out s, out c); + return float4x4( + c.y * c.z + s.x * s.y * s.z, c.z * s.x * s.y - c.y * s.z, c.x * s.y, 0.0f, + c.x * s.z, c.x * c.z, -s.x, 0.0f, + c.y * s.x * s.z - c.z * s.y, c.y * c.z * s.x + s.y * s.z, c.x * c.y, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in z-y-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerZYX(float3 xyz) + { + // return mul(rotateX(xyz.x), mul(rotateY(xyz.y), rotateZ(xyz.z))); + float3 s, c; + sincos(xyz, out s, out c); + return float4x4( + c.y * c.z, -c.y * s.z, s.y, 0.0f, + c.z * s.x * s.y + c.x * s.z, c.x * c.z - s.x * s.y * s.z, -c.y * s.x, 0.0f, + s.x * s.z - c.x * c.z * s.y, c.z * s.x + c.x * s.y * s.z, c.x * c.y, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in x-y-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerXYZ(float x, float y, float z) { return EulerXYZ(float3(x, y, z)); } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in x-z-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerXZY(float x, float y, float z) { return EulerXZY(float3(x, y, z)); } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in y-x-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerYXZ(float x, float y, float z) { return EulerYXZ(float3(x, y, z)); } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in y-z-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerYZX(float x, float y, float z) { return EulerYZX(float3(x, y, z)); } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// This is the default order rotation order in Unity. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in z-x-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerZXY(float x, float y, float z) { return EulerZXY(float3(x, y, z)); } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The float4x4 rotation matrix of the Euler angle rotation in z-y-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 EulerZYX(float x, float y, float z) { return EulerZYX(float3(x, y, z)); } + + /// + /// Returns a float4x4 constructed by first performing 3 rotations around the principal axes in a given order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// When the rotation order is known at compile time, it is recommended for performance reasons to use specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The order in which the rotations are applied. + /// The float4x4 rotation matrix of the Euler angle rotation in given order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Euler(float3 xyz, RotationOrder order = RotationOrder.Default) + { + switch (order) + { + case RotationOrder.XYZ: + return EulerXYZ(xyz); + case RotationOrder.XZY: + return EulerXZY(xyz); + case RotationOrder.YXZ: + return EulerYXZ(xyz); + case RotationOrder.YZX: + return EulerYZX(xyz); + case RotationOrder.ZXY: + return EulerZXY(xyz); + case RotationOrder.ZYX: + return EulerZYX(xyz); + default: + return float4x4.identity; + } + } + + /// + /// Returns a float4x4 rotation matrix constructed by first performing 3 rotations around the principal axes in a given order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// When the rotation order is known at compile time, it is recommended for performance reasons to use specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The order in which the rotations are applied. + /// The float4x4 rotation matrix of the Euler angle rotation in given order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Euler(float x, float y, float z, RotationOrder order = RotationOrder.Default) + { + return Euler(float3(x, y, z), order); + } + + /// Returns a float4x4 matrix that rotates around the x-axis by a given number of radians. + /// The clockwise rotation angle when looking along the x-axis towards the origin in radians. + /// The float4x4 rotation matrix that rotates around the x-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 RotateX(float angle) + { + // {{1, 0, 0}, {0, c_0, -s_0}, {0, s_0, c_0}} + float s, c; + sincos(angle, out s, out c); + return float4x4(1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, c, -s, 0.0f, + 0.0f, s, c, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + + } + + /// Returns a float4x4 matrix that rotates around the y-axis by a given number of radians. + /// The clockwise rotation angle when looking along the y-axis towards the origin in radians. + /// The float4x4 rotation matrix that rotates around the y-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 RotateY(float angle) + { + // {{c_1, 0, s_1}, {0, 1, 0}, {-s_1, 0, c_1}} + float s, c; + sincos(angle, out s, out c); + return float4x4(c, 0.0f, s, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + -s, 0.0f, c, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + + } + + /// Returns a float4x4 matrix that rotates around the z-axis by a given number of radians. + /// The clockwise rotation angle when looking along the z-axis towards the origin in radians. + /// The float4x4 rotation matrix that rotates around the z-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 RotateZ(float angle) + { + // {{c_2, -s_2, 0}, {s_2, c_2, 0}, {0, 0, 1}} + float s, c; + sincos(angle, out s, out c); + return float4x4(c, -s, 0.0f, 0.0f, + s, c, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + + } + + /// Returns a float4x4 scale matrix given 3 axis scales. + /// The uniform scaling factor. + /// The float4x4 matrix that represents a uniform scale. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Scale(float s) + { + return float4x4(s, 0.0f, 0.0f, 0.0f, + 0.0f, s, 0.0f, 0.0f, + 0.0f, 0.0f, s, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + } + + /// Returns a float4x4 scale matrix given a float3 vector containing the 3 axis scales. + /// The x-axis scaling factor. + /// The y-axis scaling factor. + /// The z-axis scaling factor. + /// The float4x4 matrix that represents a non-uniform scale. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Scale(float x, float y, float z) + { + return float4x4(x, 0.0f, 0.0f, 0.0f, + 0.0f, y, 0.0f, 0.0f, + 0.0f, 0.0f, z, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + } + + /// Returns a float4x4 scale matrix given a float3 vector containing the 3 axis scales. + /// The vector containing scale factors for each axis. + /// The float4x4 matrix that represents a non-uniform scale. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Scale(float3 scales) + { + return Scale(scales.x, scales.y, scales.z); + } + + /// Returns a float4x4 translation matrix given a float3 translation vector. + /// The translation vector. + /// The float4x4 translation matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Translate(float3 vector) + { + return float4x4(float4(1.0f, 0.0f, 0.0f, 0.0f), + float4(0.0f, 1.0f, 0.0f, 0.0f), + float4(0.0f, 0.0f, 1.0f, 0.0f), + float4(vector.x, vector.y, vector.z, 1.0f)); + } + + /// + /// Returns a float4x4 view matrix given an eye position, a target point and a unit length up vector. + /// The up vector is assumed to be unit length, the eye and target points are assumed to be distinct and + /// the vector between them is assumes to be collinear with the up vector. + /// If these assumptions are not met use float4x4.LookRotationSafe instead. + /// + /// The eye position. + /// The view target position. + /// The eye up direction. + /// The float4x4 view matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 LookAt(float3 eye, float3 target, float3 up) + { + float3x3 rot = float3x3.LookRotation(normalize(target - eye), up); + + float4x4 matrix; + matrix.c0 = float4(rot.c0, 0.0F); + matrix.c1 = float4(rot.c1, 0.0F); + matrix.c2 = float4(rot.c2, 0.0F); + matrix.c3 = float4(eye, 1.0F); + return matrix; + } + + /// + /// Returns a float4x4 centered orthographic projection matrix. + /// + /// The width of the view volume. + /// The height of the view volume. + /// The distance to the near plane. + /// The distance to the far plane. + /// The float4x4 centered orthographic projection matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 Ortho(float width, float height, float near, float far) + { + float rcpdx = 1.0f / width; + float rcpdy = 1.0f / height; + float rcpdz = 1.0f / (far - near); + + return float4x4( + 2.0f * rcpdx, 0.0f, 0.0f, 0.0f, + 0.0f, 2.0f * rcpdy, 0.0f, 0.0f, + 0.0f, 0.0f, -2.0f * rcpdz, -(far + near) * rcpdz, + 0.0f, 0.0f, 0.0f, 1.0f + ); + } + + /// + /// Returns a float4x4 off-center orthographic projection matrix. + /// + /// The minimum x-coordinate of the view volume. + /// The maximum x-coordinate of the view volume. + /// The minimum y-coordinate of the view volume. + /// The minimum y-coordinate of the view volume. + /// The distance to the near plane. + /// The distance to the far plane. + /// The float4x4 off-center orthographic projection matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 OrthoOffCenter(float left, float right, float bottom, float top, float near, float far) + { + float rcpdx = 1.0f / (right - left); + float rcpdy = 1.0f / (top - bottom); + float rcpdz = 1.0f / (far - near); + + return float4x4( + 2.0f * rcpdx, 0.0f, 0.0f, -(right + left) * rcpdx, + 0.0f, 2.0f * rcpdy, 0.0f, -(top + bottom) * rcpdy, + 0.0f, 0.0f, -2.0f * rcpdz, -(far + near) * rcpdz, + 0.0f, 0.0f, 0.0f, 1.0f + ); + } + + /// + /// Returns a float4x4 perspective projection matrix based on field of view. + /// + /// Vertical Field of view in radians. + /// X:Y aspect ratio. + /// Distance to near plane. Must be greater than zero. + /// Distance to far plane. Must be greater than zero. + /// The float4x4 perspective projection matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 PerspectiveFov(float verticalFov, float aspect, float near, float far) + { + float cotangent = 1.0f / tan(verticalFov * 0.5f); + float rcpdz = 1.0f / (near - far); + + return float4x4( + cotangent / aspect, 0.0f, 0.0f, 0.0f, + 0.0f, cotangent, 0.0f, 0.0f, + 0.0f, 0.0f, (far + near) * rcpdz, 2.0f * near * far * rcpdz, + 0.0f, 0.0f, -1.0f, 0.0f + ); + } + + /// + /// Returns a float4x4 off-center perspective projection matrix. + /// + /// The x-coordinate of the left side of the clipping frustum at the near plane. + /// The x-coordinate of the right side of the clipping frustum at the near plane. + /// The y-coordinate of the bottom side of the clipping frustum at the near plane. + /// The y-coordinate of the top side of the clipping frustum at the near plane. + /// Distance to the near plane. Must be greater than zero. + /// Distance to the far plane. Must be greater than zero. + /// The float4x4 off-center perspective projection matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 PerspectiveOffCenter(float left, float right, float bottom, float top, float near, float far) + { + float rcpdz = 1.0f / (near - far); + float rcpWidth = 1.0f / (right - left); + float rcpHeight = 1.0f / (top - bottom); + + return float4x4( + 2.0f * near * rcpWidth, 0.0f, (left + right) * rcpWidth, 0.0f, + 0.0f, 2.0f * near * rcpHeight, (bottom + top) * rcpHeight, 0.0f, + 0.0f, 0.0f, (far + near) * rcpdz, 2.0f * near * far * rcpdz, + 0.0f, 0.0f, -1.0f, 0.0f + ); + } + + /// + /// Returns a float4x4 matrix representing a combined scale-, rotation- and translation transform. + /// Equivalent to mul(translationTransform, mul(rotationTransform, scaleTransform)). + /// + /// The translation vector. + /// The quaternion rotation. + /// The scaling factors of each axis. + /// The float4x4 matrix representing the translation, rotation, and scale by the inputs. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 TRS(float3 translation, quaternion rotation, float3 scale) + { + float3x3 r = float3x3(rotation); + return float4x4( float4(r.c0 * scale.x, 0.0f), + float4(r.c1 * scale.y, 0.0f), + float4(r.c2 * scale.z, 0.0f), + float4(translation, 1.0f)); + } + } + + partial class math + { + /// + /// Extracts a float3x3 from the upper left 3x3 of a float4x4. + /// + /// to extract a float3x3 from. + /// Upper left 3x3 matrix as float3x3. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(float4x4 f4x4) + { + return new float3x3(f4x4); + } + + /// Returns a float3x3 matrix constructed from a quaternion. + /// The quaternion representing a rotation. + /// The float3x3 constructed from a quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 float3x3(quaternion rotation) + { + return new float3x3(rotation); + } + + /// Returns a float4x4 constructed from a float3x3 rotation matrix and a float3 translation vector. + /// The float3x3 rotation matrix. + /// The translation vector. + /// The float4x4 constructed from a rotation and translation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(float3x3 rotation, float3 translation) + { + return new float4x4(rotation, translation); + } + + /// Returns a float4x4 constructed from a quaternion and a float3 translation vector. + /// The quaternion rotation. + /// The translation vector. + /// The float4x4 constructed from a rotation and translation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(quaternion rotation, float3 translation) + { + return new float4x4(rotation, translation); + } + + /// Returns a float4x4 constructed from a RigidTransform. + /// The rigid transformation. + /// The float4x4 constructed from a RigidTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 float4x4(RigidTransform transform) + { + return new float4x4(transform); + } + + /// Returns an orthonormalized version of a float3x3 matrix. + /// The float3x3 to be orthonormalized. + /// The orthonormalized float3x3 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 orthonormalize(float3x3 i) + { + float3x3 o; + + float3 u = i.c0; + float3 v = i.c1 - i.c0 * math.dot(i.c1, i.c0); + + float lenU = math.length(u); + float lenV = math.length(v); + + bool c = lenU > 1e-30f && lenV > 1e-30f; + + o.c0 = math.select(float3(1, 0, 0), u / lenU, c); + o.c1 = math.select(float3(0, 1, 0), v / lenV, c); + o.c2 = math.cross(o.c0, o.c1); + + return o; + } + + /// + /// Computes the pseudoinverse of a matrix. + /// + /// Matrix to invert. + /// The pseudoinverse of m. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 pseudoinverse(float3x3 m) + { + float scaleSq = 0.333333f * (math.lengthsq(m.c0) + math.lengthsq(m.c1) + math.lengthsq(m.c2)); + if (scaleSq < svd.k_EpsilonNormal) + return Mathematics.float3x3.zero; + + float3 scaleInv = math.rsqrt(scaleSq); + float3x3 ms = mulScale(m, scaleInv); + if (!adjInverse(ms, out float3x3 i, svd.k_EpsilonDeterminant)) + { + i = svd.svdInverse(ms); + } + + return mulScale(i, scaleInv); + } + } +} diff --git a/ThirdParty/Unity.Mathematics/matrix.gen.cs b/ThirdParty/Unity.Mathematics/matrix.gen.cs new file mode 100644 index 0000000..2dce88f --- /dev/null +++ b/ThirdParty/Unity.Mathematics/matrix.gen.cs @@ -0,0 +1,2409 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; + +namespace Unity.Mathematics +{ + partial class math + { + /// Returns the float value result of a matrix multiplication between a float value and a float value. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float mul(float a, float b) + { + return a * b; + } + + /// Returns the float value result of a matrix multiplication between a float2 row vector and a float2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float mul(float2 a, float2 b) + { + return a.x * b.x + a.y * b.y; + } + + /// Returns the float2 row vector result of a matrix multiplication between a float2 row vector and a float2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 mul(float2 a, float2x2 b) + { + return float2( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y); + } + + /// Returns the float3 row vector result of a matrix multiplication between a float2 row vector and a float2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 mul(float2 a, float2x3 b) + { + return float3( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y, + a.x * b.c2.x + a.y * b.c2.y); + } + + /// Returns the float4 row vector result of a matrix multiplication between a float2 row vector and a float2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mul(float2 a, float2x4 b) + { + return float4( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y, + a.x * b.c2.x + a.y * b.c2.y, + a.x * b.c3.x + a.y * b.c3.y); + } + + /// Returns the float value result of a matrix multiplication between a float3 row vector and a float3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float mul(float3 a, float3 b) + { + return a.x * b.x + a.y * b.y + a.z * b.z; + } + + /// Returns the float2 row vector result of a matrix multiplication between a float3 row vector and a float3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 mul(float3 a, float3x2 b) + { + return float2( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z); + } + + /// Returns the float3 row vector result of a matrix multiplication between a float3 row vector and a float3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 mul(float3 a, float3x3 b) + { + return float3( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z); + } + + /// Returns the float4 row vector result of a matrix multiplication between a float3 row vector and a float3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mul(float3 a, float3x4 b) + { + return float4( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z, + a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z); + } + + /// Returns the float value result of a matrix multiplication between a float4 row vector and a float4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float mul(float4 a, float4 b) + { + return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; + } + + /// Returns the float2 row vector result of a matrix multiplication between a float4 row vector and a float4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 mul(float4 a, float4x2 b) + { + return float2( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w); + } + + /// Returns the float3 row vector result of a matrix multiplication between a float4 row vector and a float4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 mul(float4 a, float4x3 b) + { + return float3( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w); + } + + /// Returns the float4 row vector result of a matrix multiplication between a float4 row vector and a float4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mul(float4 a, float4x4 b) + { + return float4( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w, + a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w); + } + + /// Returns the float2 column vector result of a matrix multiplication between a float2x2 matrix and a float2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 mul(float2x2 a, float2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the float2x2 matrix result of a matrix multiplication between a float2x2 matrix and a float2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 mul(float2x2 a, float2x2 b) + { + return float2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the float2x3 matrix result of a matrix multiplication between a float2x2 matrix and a float2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 mul(float2x2 a, float2x3 b) + { + return float2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the float2x4 matrix result of a matrix multiplication between a float2x2 matrix and a float2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 mul(float2x2 a, float2x4 b) + { + return float2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the float2 column vector result of a matrix multiplication between a float2x3 matrix and a float3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 mul(float2x3 a, float3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the float2x2 matrix result of a matrix multiplication between a float2x3 matrix and a float3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 mul(float2x3 a, float3x2 b) + { + return float2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the float2x3 matrix result of a matrix multiplication between a float2x3 matrix and a float3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 mul(float2x3 a, float3x3 b) + { + return float2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the float2x4 matrix result of a matrix multiplication between a float2x3 matrix and a float3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 mul(float2x3 a, float3x4 b) + { + return float2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the float2 column vector result of a matrix multiplication between a float2x4 matrix and a float4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2 mul(float2x4 a, float4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the float2x2 matrix result of a matrix multiplication between a float2x4 matrix and a float4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x2 mul(float2x4 a, float4x2 b) + { + return float2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the float2x3 matrix result of a matrix multiplication between a float2x4 matrix and a float4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x3 mul(float2x4 a, float4x3 b) + { + return float2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the float2x4 matrix result of a matrix multiplication between a float2x4 matrix and a float4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float2x4 mul(float2x4 a, float4x4 b) + { + return float2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the float3 column vector result of a matrix multiplication between a float3x2 matrix and a float2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 mul(float3x2 a, float2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the float3x2 matrix result of a matrix multiplication between a float3x2 matrix and a float2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 mul(float3x2 a, float2x2 b) + { + return float3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the float3x3 matrix result of a matrix multiplication between a float3x2 matrix and a float2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 mul(float3x2 a, float2x3 b) + { + return float3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the float3x4 matrix result of a matrix multiplication between a float3x2 matrix and a float2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 mul(float3x2 a, float2x4 b) + { + return float3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the float3 column vector result of a matrix multiplication between a float3x3 matrix and a float3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 mul(float3x3 a, float3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the float3x2 matrix result of a matrix multiplication between a float3x3 matrix and a float3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 mul(float3x3 a, float3x2 b) + { + return float3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the float3x3 matrix result of a matrix multiplication between a float3x3 matrix and a float3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 mul(float3x3 a, float3x3 b) + { + return float3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the float3x4 matrix result of a matrix multiplication between a float3x3 matrix and a float3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 mul(float3x3 a, float3x4 b) + { + return float3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the float3 column vector result of a matrix multiplication between a float3x4 matrix and a float4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 mul(float3x4 a, float4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the float3x2 matrix result of a matrix multiplication between a float3x4 matrix and a float4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x2 mul(float3x4 a, float4x2 b) + { + return float3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the float3x3 matrix result of a matrix multiplication between a float3x4 matrix and a float4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 mul(float3x4 a, float4x3 b) + { + return float3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the float3x4 matrix result of a matrix multiplication between a float3x4 matrix and a float4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x4 mul(float3x4 a, float4x4 b) + { + return float3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the float4 column vector result of a matrix multiplication between a float4x2 matrix and a float2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mul(float4x2 a, float2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the float4x2 matrix result of a matrix multiplication between a float4x2 matrix and a float2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 mul(float4x2 a, float2x2 b) + { + return float4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the float4x3 matrix result of a matrix multiplication between a float4x2 matrix and a float2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 mul(float4x2 a, float2x3 b) + { + return float4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the float4x4 matrix result of a matrix multiplication between a float4x2 matrix and a float2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 mul(float4x2 a, float2x4 b) + { + return float4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the float4 column vector result of a matrix multiplication between a float4x3 matrix and a float3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mul(float4x3 a, float3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the float4x2 matrix result of a matrix multiplication between a float4x3 matrix and a float3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 mul(float4x3 a, float3x2 b) + { + return float4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the float4x3 matrix result of a matrix multiplication between a float4x3 matrix and a float3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 mul(float4x3 a, float3x3 b) + { + return float4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the float4x4 matrix result of a matrix multiplication between a float4x3 matrix and a float3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 mul(float4x3 a, float3x4 b) + { + return float4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the float4 column vector result of a matrix multiplication between a float4x4 matrix and a float4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mul(float4x4 a, float4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the float4x2 matrix result of a matrix multiplication between a float4x4 matrix and a float4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x2 mul(float4x4 a, float4x2 b) + { + return float4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the float4x3 matrix result of a matrix multiplication between a float4x4 matrix and a float4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x3 mul(float4x4 a, float4x3 b) + { + return float4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the float4x4 matrix result of a matrix multiplication between a float4x4 matrix and a float4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4x4 mul(float4x4 a, float4x4 b) + { + return float4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the double value result of a matrix multiplication between a double value and a double value. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double mul(double a, double b) + { + return a * b; + } + + /// Returns the double value result of a matrix multiplication between a double2 row vector and a double2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double mul(double2 a, double2 b) + { + return a.x * b.x + a.y * b.y; + } + + /// Returns the double2 row vector result of a matrix multiplication between a double2 row vector and a double2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 mul(double2 a, double2x2 b) + { + return double2( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y); + } + + /// Returns the double3 row vector result of a matrix multiplication between a double2 row vector and a double2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 mul(double2 a, double2x3 b) + { + return double3( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y, + a.x * b.c2.x + a.y * b.c2.y); + } + + /// Returns the double4 row vector result of a matrix multiplication between a double2 row vector and a double2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 mul(double2 a, double2x4 b) + { + return double4( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y, + a.x * b.c2.x + a.y * b.c2.y, + a.x * b.c3.x + a.y * b.c3.y); + } + + /// Returns the double value result of a matrix multiplication between a double3 row vector and a double3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double mul(double3 a, double3 b) + { + return a.x * b.x + a.y * b.y + a.z * b.z; + } + + /// Returns the double2 row vector result of a matrix multiplication between a double3 row vector and a double3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 mul(double3 a, double3x2 b) + { + return double2( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z); + } + + /// Returns the double3 row vector result of a matrix multiplication between a double3 row vector and a double3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 mul(double3 a, double3x3 b) + { + return double3( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z); + } + + /// Returns the double4 row vector result of a matrix multiplication between a double3 row vector and a double3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 mul(double3 a, double3x4 b) + { + return double4( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z, + a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z); + } + + /// Returns the double value result of a matrix multiplication between a double4 row vector and a double4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double mul(double4 a, double4 b) + { + return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; + } + + /// Returns the double2 row vector result of a matrix multiplication between a double4 row vector and a double4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 mul(double4 a, double4x2 b) + { + return double2( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w); + } + + /// Returns the double3 row vector result of a matrix multiplication between a double4 row vector and a double4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 mul(double4 a, double4x3 b) + { + return double3( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w); + } + + /// Returns the double4 row vector result of a matrix multiplication between a double4 row vector and a double4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 mul(double4 a, double4x4 b) + { + return double4( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w, + a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w); + } + + /// Returns the double2 column vector result of a matrix multiplication between a double2x2 matrix and a double2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 mul(double2x2 a, double2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the double2x2 matrix result of a matrix multiplication between a double2x2 matrix and a double2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 mul(double2x2 a, double2x2 b) + { + return double2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the double2x3 matrix result of a matrix multiplication between a double2x2 matrix and a double2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 mul(double2x2 a, double2x3 b) + { + return double2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the double2x4 matrix result of a matrix multiplication between a double2x2 matrix and a double2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 mul(double2x2 a, double2x4 b) + { + return double2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the double2 column vector result of a matrix multiplication between a double2x3 matrix and a double3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 mul(double2x3 a, double3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the double2x2 matrix result of a matrix multiplication between a double2x3 matrix and a double3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 mul(double2x3 a, double3x2 b) + { + return double2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the double2x3 matrix result of a matrix multiplication between a double2x3 matrix and a double3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 mul(double2x3 a, double3x3 b) + { + return double2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the double2x4 matrix result of a matrix multiplication between a double2x3 matrix and a double3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 mul(double2x3 a, double3x4 b) + { + return double2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the double2 column vector result of a matrix multiplication between a double2x4 matrix and a double4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2 mul(double2x4 a, double4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the double2x2 matrix result of a matrix multiplication between a double2x4 matrix and a double4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x2 mul(double2x4 a, double4x2 b) + { + return double2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the double2x3 matrix result of a matrix multiplication between a double2x4 matrix and a double4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x3 mul(double2x4 a, double4x3 b) + { + return double2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the double2x4 matrix result of a matrix multiplication between a double2x4 matrix and a double4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double2x4 mul(double2x4 a, double4x4 b) + { + return double2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the double3 column vector result of a matrix multiplication between a double3x2 matrix and a double2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 mul(double3x2 a, double2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the double3x2 matrix result of a matrix multiplication between a double3x2 matrix and a double2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 mul(double3x2 a, double2x2 b) + { + return double3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the double3x3 matrix result of a matrix multiplication between a double3x2 matrix and a double2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 mul(double3x2 a, double2x3 b) + { + return double3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the double3x4 matrix result of a matrix multiplication between a double3x2 matrix and a double2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 mul(double3x2 a, double2x4 b) + { + return double3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the double3 column vector result of a matrix multiplication between a double3x3 matrix and a double3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 mul(double3x3 a, double3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the double3x2 matrix result of a matrix multiplication between a double3x3 matrix and a double3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 mul(double3x3 a, double3x2 b) + { + return double3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the double3x3 matrix result of a matrix multiplication between a double3x3 matrix and a double3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 mul(double3x3 a, double3x3 b) + { + return double3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the double3x4 matrix result of a matrix multiplication between a double3x3 matrix and a double3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 mul(double3x3 a, double3x4 b) + { + return double3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the double3 column vector result of a matrix multiplication between a double3x4 matrix and a double4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3 mul(double3x4 a, double4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the double3x2 matrix result of a matrix multiplication between a double3x4 matrix and a double4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x2 mul(double3x4 a, double4x2 b) + { + return double3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the double3x3 matrix result of a matrix multiplication between a double3x4 matrix and a double4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x3 mul(double3x4 a, double4x3 b) + { + return double3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the double3x4 matrix result of a matrix multiplication between a double3x4 matrix and a double4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double3x4 mul(double3x4 a, double4x4 b) + { + return double3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the double4 column vector result of a matrix multiplication between a double4x2 matrix and a double2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 mul(double4x2 a, double2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the double4x2 matrix result of a matrix multiplication between a double4x2 matrix and a double2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 mul(double4x2 a, double2x2 b) + { + return double4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the double4x3 matrix result of a matrix multiplication between a double4x2 matrix and a double2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 mul(double4x2 a, double2x3 b) + { + return double4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the double4x4 matrix result of a matrix multiplication between a double4x2 matrix and a double2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 mul(double4x2 a, double2x4 b) + { + return double4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the double4 column vector result of a matrix multiplication between a double4x3 matrix and a double3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 mul(double4x3 a, double3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the double4x2 matrix result of a matrix multiplication between a double4x3 matrix and a double3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 mul(double4x3 a, double3x2 b) + { + return double4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the double4x3 matrix result of a matrix multiplication between a double4x3 matrix and a double3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 mul(double4x3 a, double3x3 b) + { + return double4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the double4x4 matrix result of a matrix multiplication between a double4x3 matrix and a double3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 mul(double4x3 a, double3x4 b) + { + return double4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the double4 column vector result of a matrix multiplication between a double4x4 matrix and a double4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4 mul(double4x4 a, double4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the double4x2 matrix result of a matrix multiplication between a double4x4 matrix and a double4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x2 mul(double4x4 a, double4x2 b) + { + return double4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the double4x3 matrix result of a matrix multiplication between a double4x4 matrix and a double4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x3 mul(double4x4 a, double4x3 b) + { + return double4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the double4x4 matrix result of a matrix multiplication between a double4x4 matrix and a double4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static double4x4 mul(double4x4 a, double4x4 b) + { + return double4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the int value result of a matrix multiplication between an int value and an int value. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int mul(int a, int b) + { + return a * b; + } + + /// Returns the int value result of a matrix multiplication between an int2 row vector and an int2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int mul(int2 a, int2 b) + { + return a.x * b.x + a.y * b.y; + } + + /// Returns the int2 row vector result of a matrix multiplication between an int2 row vector and an int2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 mul(int2 a, int2x2 b) + { + return int2( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y); + } + + /// Returns the int3 row vector result of a matrix multiplication between an int2 row vector and an int2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 mul(int2 a, int2x3 b) + { + return int3( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y, + a.x * b.c2.x + a.y * b.c2.y); + } + + /// Returns the int4 row vector result of a matrix multiplication between an int2 row vector and an int2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 mul(int2 a, int2x4 b) + { + return int4( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y, + a.x * b.c2.x + a.y * b.c2.y, + a.x * b.c3.x + a.y * b.c3.y); + } + + /// Returns the int value result of a matrix multiplication between an int3 row vector and an int3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int mul(int3 a, int3 b) + { + return a.x * b.x + a.y * b.y + a.z * b.z; + } + + /// Returns the int2 row vector result of a matrix multiplication between an int3 row vector and an int3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 mul(int3 a, int3x2 b) + { + return int2( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z); + } + + /// Returns the int3 row vector result of a matrix multiplication between an int3 row vector and an int3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 mul(int3 a, int3x3 b) + { + return int3( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z); + } + + /// Returns the int4 row vector result of a matrix multiplication between an int3 row vector and an int3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 mul(int3 a, int3x4 b) + { + return int4( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z, + a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z); + } + + /// Returns the int value result of a matrix multiplication between an int4 row vector and an int4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int mul(int4 a, int4 b) + { + return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; + } + + /// Returns the int2 row vector result of a matrix multiplication between an int4 row vector and an int4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 mul(int4 a, int4x2 b) + { + return int2( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w); + } + + /// Returns the int3 row vector result of a matrix multiplication between an int4 row vector and an int4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 mul(int4 a, int4x3 b) + { + return int3( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w); + } + + /// Returns the int4 row vector result of a matrix multiplication between an int4 row vector and an int4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 mul(int4 a, int4x4 b) + { + return int4( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w, + a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w); + } + + /// Returns the int2 column vector result of a matrix multiplication between an int2x2 matrix and an int2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 mul(int2x2 a, int2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the int2x2 matrix result of a matrix multiplication between an int2x2 matrix and an int2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 mul(int2x2 a, int2x2 b) + { + return int2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the int2x3 matrix result of a matrix multiplication between an int2x2 matrix and an int2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 mul(int2x2 a, int2x3 b) + { + return int2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the int2x4 matrix result of a matrix multiplication between an int2x2 matrix and an int2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 mul(int2x2 a, int2x4 b) + { + return int2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the int2 column vector result of a matrix multiplication between an int2x3 matrix and an int3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 mul(int2x3 a, int3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the int2x2 matrix result of a matrix multiplication between an int2x3 matrix and an int3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 mul(int2x3 a, int3x2 b) + { + return int2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the int2x3 matrix result of a matrix multiplication between an int2x3 matrix and an int3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 mul(int2x3 a, int3x3 b) + { + return int2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the int2x4 matrix result of a matrix multiplication between an int2x3 matrix and an int3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 mul(int2x3 a, int3x4 b) + { + return int2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the int2 column vector result of a matrix multiplication between an int2x4 matrix and an int4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2 mul(int2x4 a, int4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the int2x2 matrix result of a matrix multiplication between an int2x4 matrix and an int4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x2 mul(int2x4 a, int4x2 b) + { + return int2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the int2x3 matrix result of a matrix multiplication between an int2x4 matrix and an int4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x3 mul(int2x4 a, int4x3 b) + { + return int2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the int2x4 matrix result of a matrix multiplication between an int2x4 matrix and an int4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int2x4 mul(int2x4 a, int4x4 b) + { + return int2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the int3 column vector result of a matrix multiplication between an int3x2 matrix and an int2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 mul(int3x2 a, int2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the int3x2 matrix result of a matrix multiplication between an int3x2 matrix and an int2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 mul(int3x2 a, int2x2 b) + { + return int3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the int3x3 matrix result of a matrix multiplication between an int3x2 matrix and an int2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 mul(int3x2 a, int2x3 b) + { + return int3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the int3x4 matrix result of a matrix multiplication between an int3x2 matrix and an int2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 mul(int3x2 a, int2x4 b) + { + return int3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the int3 column vector result of a matrix multiplication between an int3x3 matrix and an int3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 mul(int3x3 a, int3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the int3x2 matrix result of a matrix multiplication between an int3x3 matrix and an int3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 mul(int3x3 a, int3x2 b) + { + return int3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the int3x3 matrix result of a matrix multiplication between an int3x3 matrix and an int3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 mul(int3x3 a, int3x3 b) + { + return int3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the int3x4 matrix result of a matrix multiplication between an int3x3 matrix and an int3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 mul(int3x3 a, int3x4 b) + { + return int3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the int3 column vector result of a matrix multiplication between an int3x4 matrix and an int4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3 mul(int3x4 a, int4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the int3x2 matrix result of a matrix multiplication between an int3x4 matrix and an int4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x2 mul(int3x4 a, int4x2 b) + { + return int3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the int3x3 matrix result of a matrix multiplication between an int3x4 matrix and an int4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x3 mul(int3x4 a, int4x3 b) + { + return int3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the int3x4 matrix result of a matrix multiplication between an int3x4 matrix and an int4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int3x4 mul(int3x4 a, int4x4 b) + { + return int3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the int4 column vector result of a matrix multiplication between an int4x2 matrix and an int2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 mul(int4x2 a, int2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the int4x2 matrix result of a matrix multiplication between an int4x2 matrix and an int2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 mul(int4x2 a, int2x2 b) + { + return int4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the int4x3 matrix result of a matrix multiplication between an int4x2 matrix and an int2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 mul(int4x2 a, int2x3 b) + { + return int4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the int4x4 matrix result of a matrix multiplication between an int4x2 matrix and an int2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 mul(int4x2 a, int2x4 b) + { + return int4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the int4 column vector result of a matrix multiplication between an int4x3 matrix and an int3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 mul(int4x3 a, int3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the int4x2 matrix result of a matrix multiplication between an int4x3 matrix and an int3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 mul(int4x3 a, int3x2 b) + { + return int4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the int4x3 matrix result of a matrix multiplication between an int4x3 matrix and an int3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 mul(int4x3 a, int3x3 b) + { + return int4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the int4x4 matrix result of a matrix multiplication between an int4x3 matrix and an int3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 mul(int4x3 a, int3x4 b) + { + return int4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the int4 column vector result of a matrix multiplication between an int4x4 matrix and an int4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4 mul(int4x4 a, int4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the int4x2 matrix result of a matrix multiplication between an int4x4 matrix and an int4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x2 mul(int4x4 a, int4x2 b) + { + return int4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the int4x3 matrix result of a matrix multiplication between an int4x4 matrix and an int4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x3 mul(int4x4 a, int4x3 b) + { + return int4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the int4x4 matrix result of a matrix multiplication between an int4x4 matrix and an int4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int4x4 mul(int4x4 a, int4x4 b) + { + return int4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the uint value result of a matrix multiplication between a uint value and a uint value. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint mul(uint a, uint b) + { + return a * b; + } + + /// Returns the uint value result of a matrix multiplication between a uint2 row vector and a uint2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint mul(uint2 a, uint2 b) + { + return a.x * b.x + a.y * b.y; + } + + /// Returns the uint2 row vector result of a matrix multiplication between a uint2 row vector and a uint2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 mul(uint2 a, uint2x2 b) + { + return uint2( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y); + } + + /// Returns the uint3 row vector result of a matrix multiplication between a uint2 row vector and a uint2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 mul(uint2 a, uint2x3 b) + { + return uint3( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y, + a.x * b.c2.x + a.y * b.c2.y); + } + + /// Returns the uint4 row vector result of a matrix multiplication between a uint2 row vector and a uint2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 mul(uint2 a, uint2x4 b) + { + return uint4( + a.x * b.c0.x + a.y * b.c0.y, + a.x * b.c1.x + a.y * b.c1.y, + a.x * b.c2.x + a.y * b.c2.y, + a.x * b.c3.x + a.y * b.c3.y); + } + + /// Returns the uint value result of a matrix multiplication between a uint3 row vector and a uint3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint mul(uint3 a, uint3 b) + { + return a.x * b.x + a.y * b.y + a.z * b.z; + } + + /// Returns the uint2 row vector result of a matrix multiplication between a uint3 row vector and a uint3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 mul(uint3 a, uint3x2 b) + { + return uint2( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z); + } + + /// Returns the uint3 row vector result of a matrix multiplication between a uint3 row vector and a uint3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 mul(uint3 a, uint3x3 b) + { + return uint3( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z); + } + + /// Returns the uint4 row vector result of a matrix multiplication between a uint3 row vector and a uint3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 mul(uint3 a, uint3x4 b) + { + return uint4( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z, + a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z); + } + + /// Returns the uint value result of a matrix multiplication between a uint4 row vector and a uint4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint mul(uint4 a, uint4 b) + { + return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; + } + + /// Returns the uint2 row vector result of a matrix multiplication between a uint4 row vector and a uint4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 mul(uint4 a, uint4x2 b) + { + return uint2( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w); + } + + /// Returns the uint3 row vector result of a matrix multiplication between a uint4 row vector and a uint4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 mul(uint4 a, uint4x3 b) + { + return uint3( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w); + } + + /// Returns the uint4 row vector result of a matrix multiplication between a uint4 row vector and a uint4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 mul(uint4 a, uint4x4 b) + { + return uint4( + a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w, + a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w, + a.x * b.c2.x + a.y * b.c2.y + a.z * b.c2.z + a.w * b.c2.w, + a.x * b.c3.x + a.y * b.c3.y + a.z * b.c3.z + a.w * b.c3.w); + } + + /// Returns the uint2 column vector result of a matrix multiplication between a uint2x2 matrix and a uint2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 mul(uint2x2 a, uint2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the uint2x2 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 mul(uint2x2 a, uint2x2 b) + { + return uint2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the uint2x3 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 mul(uint2x2 a, uint2x3 b) + { + return uint2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the uint2x4 matrix result of a matrix multiplication between a uint2x2 matrix and a uint2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 mul(uint2x2 a, uint2x4 b) + { + return uint2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the uint2 column vector result of a matrix multiplication between a uint2x3 matrix and a uint3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 mul(uint2x3 a, uint3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the uint2x2 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 mul(uint2x3 a, uint3x2 b) + { + return uint2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the uint2x3 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 mul(uint2x3 a, uint3x3 b) + { + return uint2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the uint2x4 matrix result of a matrix multiplication between a uint2x3 matrix and a uint3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 mul(uint2x3 a, uint3x4 b) + { + return uint2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the uint2 column vector result of a matrix multiplication between a uint2x4 matrix and a uint4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 mul(uint2x4 a, uint4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the uint2x2 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 mul(uint2x4 a, uint4x2 b) + { + return uint2x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the uint2x3 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 mul(uint2x4 a, uint4x3 b) + { + return uint2x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the uint2x4 matrix result of a matrix multiplication between a uint2x4 matrix and a uint4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 mul(uint2x4 a, uint4x4 b) + { + return uint2x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the uint3 column vector result of a matrix multiplication between a uint3x2 matrix and a uint2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 mul(uint3x2 a, uint2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the uint3x2 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 mul(uint3x2 a, uint2x2 b) + { + return uint3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the uint3x3 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 mul(uint3x2 a, uint2x3 b) + { + return uint3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the uint3x4 matrix result of a matrix multiplication between a uint3x2 matrix and a uint2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 mul(uint3x2 a, uint2x4 b) + { + return uint3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the uint3 column vector result of a matrix multiplication between a uint3x3 matrix and a uint3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 mul(uint3x3 a, uint3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the uint3x2 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 mul(uint3x3 a, uint3x2 b) + { + return uint3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the uint3x3 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 mul(uint3x3 a, uint3x3 b) + { + return uint3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the uint3x4 matrix result of a matrix multiplication between a uint3x3 matrix and a uint3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 mul(uint3x3 a, uint3x4 b) + { + return uint3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the uint3 column vector result of a matrix multiplication between a uint3x4 matrix and a uint4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 mul(uint3x4 a, uint4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the uint3x2 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 mul(uint3x4 a, uint4x2 b) + { + return uint3x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the uint3x3 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 mul(uint3x4 a, uint4x3 b) + { + return uint3x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the uint3x4 matrix result of a matrix multiplication between a uint3x4 matrix and a uint4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 mul(uint3x4 a, uint4x4 b) + { + return uint3x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + /// Returns the uint4 column vector result of a matrix multiplication between a uint4x2 matrix and a uint2 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 mul(uint4x2 a, uint2 b) + { + return a.c0 * b.x + a.c1 * b.y; + } + + /// Returns the uint4x2 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 mul(uint4x2 a, uint2x2 b) + { + return uint4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y); + } + + /// Returns the uint4x3 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 mul(uint4x2 a, uint2x3 b) + { + return uint4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y); + } + + /// Returns the uint4x4 matrix result of a matrix multiplication between a uint4x2 matrix and a uint2x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 mul(uint4x2 a, uint2x4 b) + { + return uint4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y, + a.c0 * b.c1.x + a.c1 * b.c1.y, + a.c0 * b.c2.x + a.c1 * b.c2.y, + a.c0 * b.c3.x + a.c1 * b.c3.y); + } + + /// Returns the uint4 column vector result of a matrix multiplication between a uint4x3 matrix and a uint3 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 mul(uint4x3 a, uint3 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z; + } + + /// Returns the uint4x2 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 mul(uint4x3 a, uint3x2 b) + { + return uint4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z); + } + + /// Returns the uint4x3 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 mul(uint4x3 a, uint3x3 b) + { + return uint4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z); + } + + /// Returns the uint4x4 matrix result of a matrix multiplication between a uint4x3 matrix and a uint3x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 mul(uint4x3 a, uint3x4 b) + { + return uint4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z); + } + + /// Returns the uint4 column vector result of a matrix multiplication between a uint4x4 matrix and a uint4 column vector. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 mul(uint4x4 a, uint4 b) + { + return a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w; + } + + /// Returns the uint4x2 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x2 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 mul(uint4x4 a, uint4x2 b) + { + return uint4x2( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w); + } + + /// Returns the uint4x3 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x3 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 mul(uint4x4 a, uint4x3 b) + { + return uint4x3( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w); + } + + /// Returns the uint4x4 matrix result of a matrix multiplication between a uint4x4 matrix and a uint4x4 matrix. + /// Left hand side argument of the matrix multiply. + /// Right hand side argument of the matrix multiply. + /// The computed matrix multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 mul(uint4x4 a, uint4x4 b) + { + return uint4x4( + a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w, + a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w, + a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w, + a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w); + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/quaternion.cs b/ThirdParty/Unity.Mathematics/quaternion.cs new file mode 100644 index 0000000..b013fd2 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/quaternion.cs @@ -0,0 +1,788 @@ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; +using static Unity.Mathematics.math; + +namespace Unity.Mathematics +{ + /// + /// A quaternion type for representing rotations. + /// + [Il2CppEagerStaticClassConstruction] + [Serializable] + public partial struct quaternion : System.IEquatable, IFormattable + { + /// + /// The quaternion component values. + /// + public float4 value; + + /// A quaternion representing the identity transform. + public static readonly quaternion identity = new quaternion(0.0f, 0.0f, 0.0f, 1.0f); + + /// Constructs a quaternion from four float values. + /// The quaternion x component. + /// The quaternion y component. + /// The quaternion z component. + /// The quaternion w component. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public quaternion(float x, float y, float z, float w) { value.x = x; value.y = y; value.z = z; value.w = w; } + + /// Constructs a quaternion from float4 vector. + /// The quaternion xyzw component values. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public quaternion(float4 value) { this.value = value; } + + /// Implicitly converts a float4 vector to a quaternion. + /// The quaternion xyzw component values. + /// The quaternion constructed from a float4 vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator quaternion(float4 v) { return new quaternion(v); } + + /// Constructs a unit quaternion from a float3x3 rotation matrix. The matrix must be orthonormal. + /// The float3x3 orthonormal rotation matrix. + public quaternion(float3x3 m) + { + float3 u = m.c0; + float3 v = m.c1; + float3 w = m.c2; + + uint u_sign = (asuint(u.x) & 0x80000000); + float t = v.y + asfloat(asuint(w.z) ^ u_sign); + uint4 u_mask = uint4((int)u_sign >> 31); + uint4 t_mask = uint4(asint(t) >> 31); + + float tr = 1.0f + abs(u.x); + + uint4 sign_flips = uint4(0x00000000, 0x80000000, 0x80000000, 0x80000000) ^ (u_mask & uint4(0x00000000, 0x80000000, 0x00000000, 0x80000000)) ^ (t_mask & uint4(0x80000000, 0x80000000, 0x80000000, 0x00000000)); + + value = float4(tr, u.y, w.x, v.z) + asfloat(asuint(float4(t, v.x, u.z, w.y)) ^ sign_flips); // +---, +++-, ++-+, +-++ + + value = asfloat((asuint(value) & ~u_mask) | (asuint(value.zwxy) & u_mask)); + value = asfloat((asuint(value.wzyx) & ~t_mask) | (asuint(value) & t_mask)); + value = normalize(value); + } + + /// Constructs a unit quaternion from an orthonormal float4x4 matrix. + /// The float4x4 orthonormal rotation matrix. + public quaternion(float4x4 m) + { + float4 u = m.c0; + float4 v = m.c1; + float4 w = m.c2; + + uint u_sign = (asuint(u.x) & 0x80000000); + float t = v.y + asfloat(asuint(w.z) ^ u_sign); + uint4 u_mask = uint4((int)u_sign >> 31); + uint4 t_mask = uint4(asint(t) >> 31); + + float tr = 1.0f + abs(u.x); + + uint4 sign_flips = uint4(0x00000000, 0x80000000, 0x80000000, 0x80000000) ^ (u_mask & uint4(0x00000000, 0x80000000, 0x00000000, 0x80000000)) ^ (t_mask & uint4(0x80000000, 0x80000000, 0x80000000, 0x00000000)); + + value = float4(tr, u.y, w.x, v.z) + asfloat(asuint(float4(t, v.x, u.z, w.y)) ^ sign_flips); // +---, +++-, ++-+, +-++ + + value = asfloat((asuint(value) & ~u_mask) | (asuint(value.zwxy) & u_mask)); + value = asfloat((asuint(value.wzyx) & ~t_mask) | (asuint(value) & t_mask)); + + value = normalize(value); + } + + /// + /// Returns a quaternion representing a rotation around a unit axis by an angle in radians. + /// The rotation direction is clockwise when looking along the rotation axis towards the origin. + /// + /// The axis of rotation. + /// The angle of rotation in radians. + /// The quaternion representing a rotation around an axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion AxisAngle(float3 axis, float angle) + { + float sina, cosa; + math.sincos(0.5f * angle, out sina, out cosa); + return quaternion(float4(axis * sina, cosa)); + } + + /// + /// Returns a quaternion constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The quaternion representing the Euler angle rotation in x-y-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerXYZ(float3 xyz) + { + // return mul(rotateZ(xyz.z), mul(rotateY(xyz.y), rotateX(xyz.x))); + float3 s, c; + sincos(0.5f * xyz, out s, out c); + return quaternion( + // s.x * c.y * c.z - s.y * s.z * c.x, + // s.y * c.x * c.z + s.x * s.z * c.y, + // s.z * c.x * c.y - s.x * s.y * c.z, + // c.x * c.y * c.z + s.y * s.z * s.x + float4(s.xyz, c.x) * c.yxxy * c.zzyz + s.yxxy * s.zzyz * float4(c.xyz, s.x) * float4(-1.0f, 1.0f, -1.0f, 1.0f) + ); + } + + /// + /// Returns a quaternion constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The quaternion representing the Euler angle rotation in x-z-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerXZY(float3 xyz) + { + // return mul(rotateY(xyz.y), mul(rotateZ(xyz.z), rotateX(xyz.x))); + float3 s, c; + sincos(0.5f * xyz, out s, out c); + return quaternion( + // s.x * c.y * c.z + s.y * s.z * c.x, + // s.y * c.x * c.z + s.x * s.z * c.y, + // s.z * c.x * c.y - s.x * s.y * c.z, + // c.x * c.y * c.z - s.y * s.z * s.x + float4(s.xyz, c.x) * c.yxxy * c.zzyz + s.yxxy * s.zzyz * float4(c.xyz, s.x) * float4(1.0f, 1.0f, -1.0f, -1.0f) + ); + } + + /// + /// Returns a quaternion constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The quaternion representing the Euler angle rotation in y-x-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerYXZ(float3 xyz) + { + // return mul(rotateZ(xyz.z), mul(rotateX(xyz.x), rotateY(xyz.y))); + float3 s, c; + sincos(0.5f * xyz, out s, out c); + return quaternion( + // s.x * c.y * c.z - s.y * s.z * c.x, + // s.y * c.x * c.z + s.x * s.z * c.y, + // s.z * c.x * c.y + s.x * s.y * c.z, + // c.x * c.y * c.z - s.y * s.z * s.x + float4(s.xyz, c.x) * c.yxxy * c.zzyz + s.yxxy * s.zzyz * float4(c.xyz, s.x) * float4(-1.0f, 1.0f, 1.0f, -1.0f) + ); + } + + /// + /// Returns a quaternion constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The quaternion representing the Euler angle rotation in y-z-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerYZX(float3 xyz) + { + // return mul(rotateX(xyz.x), mul(rotateZ(xyz.z), rotateY(xyz.y))); + float3 s, c; + sincos(0.5f * xyz, out s, out c); + return quaternion( + // s.x * c.y * c.z - s.y * s.z * c.x, + // s.y * c.x * c.z - s.x * s.z * c.y, + // s.z * c.x * c.y + s.x * s.y * c.z, + // c.x * c.y * c.z + s.y * s.z * s.x + float4(s.xyz, c.x) * c.yxxy * c.zzyz + s.yxxy * s.zzyz * float4(c.xyz, s.x) * float4(-1.0f, -1.0f, 1.0f, 1.0f) + ); + } + + /// + /// Returns a quaternion constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// This is the default order rotation order in Unity. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The quaternion representing the Euler angle rotation in z-x-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerZXY(float3 xyz) + { + // return mul(rotateY(xyz.y), mul(rotateX(xyz.x), rotateZ(xyz.z))); + float3 s, c; + sincos(0.5f * xyz, out s, out c); + return quaternion( + // s.x * c.y * c.z + s.y * s.z * c.x, + // s.y * c.x * c.z - s.x * s.z * c.y, + // s.z * c.x * c.y - s.x * s.y * c.z, + // c.x * c.y * c.z + s.y * s.z * s.x + float4(s.xyz, c.x) * c.yxxy * c.zzyz + s.yxxy * s.zzyz * float4(c.xyz, s.x) * float4(1.0f, -1.0f, -1.0f, 1.0f) + ); + } + + /// + /// Returns a quaternion constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The quaternion representing the Euler angle rotation in z-y-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerZYX(float3 xyz) + { + // return mul(rotateX(xyz.x), mul(rotateY(xyz.y), rotateZ(xyz.z))); + float3 s, c; + sincos(0.5f * xyz, out s, out c); + return quaternion( + // s.x * c.y * c.z + s.y * s.z * c.x, + // s.y * c.x * c.z - s.x * s.z * c.y, + // s.z * c.x * c.y + s.x * s.y * c.z, + // c.x * c.y * c.z - s.y * s.x * s.z + float4(s.xyz, c.x) * c.yxxy * c.zzyz + s.yxxy * s.zzyz * float4(c.xyz, s.x) * float4(1.0f, -1.0f, 1.0f, -1.0f) + ); + } + + /// + /// Returns a quaternion constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The quaternion representing the Euler angle rotation in x-y-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerXYZ(float x, float y, float z) { return EulerXYZ(float3(x, y, z)); } + + /// + /// Returns a quaternion constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The quaternion representing the Euler angle rotation in x-z-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerXZY(float x, float y, float z) { return EulerXZY(float3(x, y, z)); } + + /// + /// Returns a quaternion constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The quaternion representing the Euler angle rotation in y-x-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerYXZ(float x, float y, float z) { return EulerYXZ(float3(x, y, z)); } + + /// + /// Returns a quaternion constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The quaternion representing the Euler angle rotation in y-z-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerYZX(float x, float y, float z) { return EulerYZX(float3(x, y, z)); } + + /// + /// Returns a quaternion constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// This is the default order rotation order in Unity. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The quaternion representing the Euler angle rotation in z-x-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerZXY(float x, float y, float z) { return EulerZXY(float3(x, y, z)); } + + /// + /// Returns a quaternion constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The quaternion representing the Euler angle rotation in z-y-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion EulerZYX(float x, float y, float z) { return EulerZYX(float3(x, y, z)); } + + /// + /// Returns a quaternion constructed by first performing 3 rotations around the principal axes in a given order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// When the rotation order is known at compile time, it is recommended for performance reasons to use specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The order in which the rotations are applied. + /// The quaternion representing the Euler angle rotation in the specified order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion Euler(float3 xyz, RotationOrder order = RotationOrder.ZXY) + { + switch (order) + { + case RotationOrder.XYZ: + return EulerXYZ(xyz); + case RotationOrder.XZY: + return EulerXZY(xyz); + case RotationOrder.YXZ: + return EulerYXZ(xyz); + case RotationOrder.YZX: + return EulerYZX(xyz); + case RotationOrder.ZXY: + return EulerZXY(xyz); + case RotationOrder.ZYX: + return EulerZYX(xyz); + default: + return quaternion.identity; + } + } + + /// + /// Returns a quaternion constructed by first performing 3 rotations around the principal axes in a given order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// When the rotation order is known at compile time, it is recommended for performance reasons to use specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The order in which the rotations are applied. + /// The quaternion representing the Euler angle rotation in the specified order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion Euler(float x, float y, float z, RotationOrder order = RotationOrder.Default) + { + return Euler(float3(x, y, z), order); + } + + /// Returns a quaternion that rotates around the x-axis by a given number of radians. + /// The clockwise rotation angle when looking along the x-axis towards the origin in radians. + /// The quaternion representing a rotation around the x-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion RotateX(float angle) + { + float sina, cosa; + math.sincos(0.5f * angle, out sina, out cosa); + return quaternion(sina, 0.0f, 0.0f, cosa); + } + + /// Returns a quaternion that rotates around the y-axis by a given number of radians. + /// The clockwise rotation angle when looking along the y-axis towards the origin in radians. + /// The quaternion representing a rotation around the y-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion RotateY(float angle) + { + float sina, cosa; + math.sincos(0.5f * angle, out sina, out cosa); + return quaternion(0.0f, sina, 0.0f, cosa); + } + + /// Returns a quaternion that rotates around the z-axis by a given number of radians. + /// The clockwise rotation angle when looking along the z-axis towards the origin in radians. + /// The quaternion representing a rotation around the z-axis. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion RotateZ(float angle) + { + float sina, cosa; + math.sincos(0.5f * angle, out sina, out cosa); + return quaternion(0.0f, 0.0f, sina, cosa); + } + + /// + /// Returns a quaternion view rotation given a unit length forward vector and a unit length up vector. + /// The two input vectors are assumed to be unit length and not collinear. + /// If these assumptions are not met use float3x3.LookRotationSafe instead. + /// + /// The view forward direction. + /// The view up direction. + /// The quaternion view rotation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion LookRotation(float3 forward, float3 up) + { + float3 t = normalize(cross(up, forward)); + return quaternion(float3x3(t, cross(forward, t), forward)); + } + + /// + /// Returns a quaternion view rotation given a forward vector and an up vector. + /// The two input vectors are not assumed to be unit length. + /// If the magnitude of either of the vectors is so extreme that the calculation cannot be carried out reliably or the vectors are collinear, + /// the identity will be returned instead. + /// + /// The view forward direction. + /// The view up direction. + /// The quaternion view rotation or the identity quaternion. + public static quaternion LookRotationSafe(float3 forward, float3 up) + { + float forwardLengthSq = dot(forward, forward); + float upLengthSq = dot(up, up); + + forward *= rsqrt(forwardLengthSq); + up *= rsqrt(upLengthSq); + + float3 t = cross(up, forward); + float tLengthSq = dot(t, t); + t *= rsqrt(tLengthSq); + + float mn = min(min(forwardLengthSq, upLengthSq), tLengthSq); + float mx = max(max(forwardLengthSq, upLengthSq), tLengthSq); + + bool accept = mn > 1e-35f && mx < 1e35f && isfinite(forwardLengthSq) && isfinite(upLengthSq) && isfinite(tLengthSq); + return quaternion(select(float4(0.0f, 0.0f, 0.0f, 1.0f), quaternion(float3x3(t, cross(forward, t),forward)).value, accept)); + } + + /// Returns true if the quaternion is equal to a given quaternion, false otherwise. + /// The quaternion to compare with. + /// True if the quaternion is equal to the input, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(quaternion x) { return value.x == x.value.x && value.y == x.value.y && value.z == x.value.z && value.w == x.value.w; } + + /// Returns whether true if the quaternion is equal to a given quaternion, false otherwise. + /// The object to compare with. + /// True if the quaternion is equal to the input, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool Equals(object x) { return x is quaternion converted && Equals(converted); } + + /// Returns a hash code for the quaternion. + /// The hash code of the quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + /// Returns a string representation of the quaternion. + /// The string representation of the quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("quaternion({0}f, {1}f, {2}f, {3}f)", value.x, value.y, value.z, value.w); + } + + /// Returns a string representation of the quaternion using a specified format and culture-specific format information. + /// The format string. + /// The format provider to use during string formatting. + /// The formatted string representation of the quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("quaternion({0}f, {1}f, {2}f, {3}f)", value.x.ToString(format, formatProvider), value.y.ToString(format, formatProvider), value.z.ToString(format, formatProvider), value.w.ToString(format, formatProvider)); + } + } + + public static partial class math + { + /// Returns a quaternion constructed from four float values. + /// The x component of the quaternion. + /// The y component of the quaternion. + /// The z component of the quaternion. + /// The w component of the quaternion. + /// The quaternion constructed from individual components. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion quaternion(float x, float y, float z, float w) { return new quaternion(x, y, z, w); } + + /// Returns a quaternion constructed from a float4 vector. + /// The float4 containing the components of the quaternion. + /// The quaternion constructed from a float4. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion quaternion(float4 value) { return new quaternion(value); } + + /// Returns a unit quaternion constructed from a float3x3 rotation matrix. The matrix must be orthonormal. + /// The float3x3 rotation matrix. + /// The quaternion constructed from a float3x3 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion quaternion(float3x3 m) { return new quaternion(m); } + + /// Returns a unit quaternion constructed from a float4x4 matrix. The matrix must be orthonormal. + /// The float4x4 matrix (must be orthonormal). + /// The quaternion constructed from a float4x4 matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion quaternion(float4x4 m) { return new quaternion(m); } + + /// Returns the conjugate of a quaternion value. + /// The quaternion to conjugate. + /// The conjugate of the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion conjugate(quaternion q) + { + return quaternion(q.value * float4(-1.0f, -1.0f, -1.0f, 1.0f)); + } + + /// Returns the inverse of a quaternion value. + /// The quaternion to invert. + /// The quaternion inverse of the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion inverse(quaternion q) + { + float4 x = q.value; + return quaternion(rcp(dot(x, x)) * x * float4(-1.0f, -1.0f, -1.0f, 1.0f)); + } + + /// Returns the dot product of two quaternions. + /// The first quaternion. + /// The second quaternion. + /// The dot product of two quaternions. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float dot(quaternion a, quaternion b) + { + return dot(a.value, b.value); + } + + /// Returns the length of a quaternion. + /// The input quaternion. + /// The length of the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float length(quaternion q) + { + return sqrt(dot(q.value, q.value)); + } + + /// Returns the squared length of a quaternion. + /// The input quaternion. + /// The length squared of the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float lengthsq(quaternion q) + { + return dot(q.value, q.value); + } + + /// Returns a normalized version of a quaternion q by scaling it by 1 / length(q). + /// The quaternion to normalize. + /// The normalized quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion normalize(quaternion q) + { + float4 x = q.value; + return quaternion(rsqrt(dot(x, x)) * x); + } + + /// + /// Returns a safe normalized version of the q by scaling it by 1 / length(q). + /// Returns the identity when 1 / length(q) does not produce a finite number. + /// + /// The quaternion to normalize. + /// The normalized quaternion or the identity quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion normalizesafe(quaternion q) + { + float4 x = q.value; + float len = math.dot(x, x); + return quaternion(math.select(Mathematics.quaternion.identity.value, x * math.rsqrt(len), len > FLT_MIN_NORMAL)); + } + + /// + /// Returns a safe normalized version of the q by scaling it by 1 / length(q). + /// Returns the given default value when 1 / length(q) does not produce a finite number. + /// + /// The quaternion to normalize. + /// The default value. + /// The normalized quaternion or the default value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion normalizesafe(quaternion q, quaternion defaultvalue) + { + float4 x = q.value; + float len = math.dot(x, x); + return quaternion(math.select(defaultvalue.value, x * math.rsqrt(len), len > FLT_MIN_NORMAL)); + } + + /// Returns the natural exponent of a quaternion. Assumes w is zero. + /// The quaternion with w component equal to zero. + /// The natural exponent of the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion unitexp(quaternion q) + { + float v_rcp_len = rsqrt(dot(q.value.xyz, q.value.xyz)); + float v_len = rcp(v_rcp_len); + float sin_v_len, cos_v_len; + sincos(v_len, out sin_v_len, out cos_v_len); + return quaternion(float4(q.value.xyz * v_rcp_len * sin_v_len, cos_v_len)); + } + + /// Returns the natural exponent of a quaternion. + /// The quaternion. + /// The natural exponent of the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion exp(quaternion q) + { + float v_rcp_len = rsqrt(dot(q.value.xyz, q.value.xyz)); + float v_len = rcp(v_rcp_len); + float sin_v_len, cos_v_len; + sincos(v_len, out sin_v_len, out cos_v_len); + return quaternion(float4(q.value.xyz * v_rcp_len * sin_v_len, cos_v_len) * exp(q.value.w)); + } + + /// Returns the natural logarithm of a unit length quaternion. + /// The unit length quaternion. + /// The natural logarithm of the unit length quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion unitlog(quaternion q) + { + float w = clamp(q.value.w, -1.0f, 1.0f); + float s = acos(w) * rsqrt(1.0f - w*w); + return quaternion(float4(q.value.xyz * s, 0.0f)); + } + + /// Returns the natural logarithm of a quaternion. + /// The quaternion. + /// The natural logarithm of the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion log(quaternion q) + { + float v_len_sq = dot(q.value.xyz, q.value.xyz); + float q_len_sq = v_len_sq + q.value.w*q.value.w; + + float s = acos(clamp(q.value.w * rsqrt(q_len_sq), -1.0f, 1.0f)) * rsqrt(v_len_sq); + return quaternion(float4(q.value.xyz * s, 0.5f * log(q_len_sq))); + } + + /// Returns the result of transforming the quaternion b by the quaternion a. + /// The quaternion on the left. + /// The quaternion on the right. + /// The result of transforming quaternion b by the quaternion a. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion mul(quaternion a, quaternion b) + { + return quaternion(a.value.wwww * b.value + (a.value.xyzx * b.value.wwwx + a.value.yzxy * b.value.zxyy) * float4(1.0f, 1.0f, 1.0f, -1.0f) - a.value.zxyz * b.value.yzxz); + } + + /// Returns the result of transforming a vector by a quaternion. + /// The quaternion transformation. + /// The vector to transform. + /// The transformation of vector v by quaternion q. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 mul(quaternion q, float3 v) + { + float3 t = 2 * cross(q.value.xyz, v); + return v + q.value.w * t + cross(q.value.xyz, t); + } + + /// Returns the result of rotating a vector by a unit quaternion. + /// The quaternion rotation. + /// The vector to rotate. + /// The rotation of vector v by quaternion q. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 rotate(quaternion q, float3 v) + { + float3 t = 2 * cross(q.value.xyz, v); + return v + q.value.w * t + cross(q.value.xyz, t); + } + + /// Returns the result of a normalized linear interpolation between two quaternions q1 and a2 using an interpolation parameter t. + /// + /// Prefer to use this over slerp() when you know the distance between q1 and q2 is small. This can be much + /// higher performance due to avoiding trigonometric function evaluations that occur in slerp(). + /// + /// The first quaternion. + /// The second quaternion. + /// The interpolation parameter. + /// The normalized linear interpolation of two quaternions. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion nlerp(quaternion q1, quaternion q2, float t) + { + return normalize(q1.value + t * (chgsign(q2.value, dot(q1, q2)) - q1.value)); + } + + /// Returns the result of a spherical interpolation between two quaternions q1 and a2 using an interpolation parameter t. + /// The first quaternion. + /// The second quaternion. + /// The interpolation parameter. + /// The spherical linear interpolation of two quaternions. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion slerp(quaternion q1, quaternion q2, float t) + { + float dt = dot(q1, q2); + if (dt < 0.0f) + { + dt = -dt; + q2.value = -q2.value; + } + + if (dt < 0.9995f) + { + float angle = acos(dt); + float s = rsqrt(1.0f - dt * dt); // 1.0f / sin(angle) + float w1 = sin(angle * (1.0f - t)) * s; + float w2 = sin(angle * t) * s; + return quaternion(q1.value * w1 + q2.value * w2); + } + else + { + // if the angle is small, use linear interpolation + return nlerp(q1, q2, t); + } + } + + /// Returns the angle in radians between two unit quaternions. + /// The first quaternion. + /// The second quaternion. + /// The angle between two unit quaternions. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float angle(quaternion q1, quaternion q2) + { + float diff = asin(length(normalize(mul(conjugate(q1), q2)).value.xyz)); + return diff + diff; + } + + /// + /// Extracts the rotation from a matrix. + /// + /// This method supports any type of rotation matrix: if the matrix has a non uniform scale you should use this method. + /// Matrix to extract rotation from + /// Extracted rotation + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion rotation(float3x3 m) + { + float det = math.determinant(m); + if (math.abs(1f - det) < svd.k_EpsilonDeterminant) + return math.quaternion(m); + + if (math.abs(det) > svd.k_EpsilonDeterminant) + { + float3x3 tmp = mulScale(m, math.rsqrt(math.float3(math.lengthsq(m.c0), math.lengthsq(m.c1), math.lengthsq(m.c2)))); + if (math.abs(1f - math.determinant(tmp)) < svd.k_EpsilonDeterminant) + return math.quaternion(tmp); + } + + return svd.svdRotation(m); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float3x3 adj(float3x3 m, out float det) + { + float3x3 adjT; + adjT.c0 = math.cross(m.c1, m.c2); + adjT.c1 = math.cross(m.c2, m.c0); + adjT.c2 = math.cross(m.c0, m.c1); + det = math.dot(m.c0, adjT.c0); + + return math.transpose(adjT); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool adjInverse(float3x3 m, out float3x3 i, float epsilon = svd.k_EpsilonNormal) + { + i = adj(m, out float det); + bool c = math.abs(det) > epsilon; + float3 detInv = math.select(math.float3(1f), math.rcp(det), c); + i = scaleMul(detInv, i); + return c; + } + + /// Returns a uint hash code of a quaternion. + /// The quaternion to hash. + /// The hash code for the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(quaternion q) + { + return hash(q.value); + } + + /// + /// Returns a uint4 vector hash code of a quaternion. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// The quaternion to hash. + /// The uint4 vector hash code of the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(quaternion q) + { + return hashwide(q.value); + } + + /// + /// Transforms the forward vector by a quaternion. + /// + /// The quaternion transformation. + /// The forward vector transformed by the input quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 forward(quaternion q) { return mul(q, float3(0, 0, 1)); } // for compatibility + } +} diff --git a/ThirdParty/Unity.Mathematics/random.cs b/ThirdParty/Unity.Mathematics/random.cs new file mode 100644 index 0000000..3c94b6e --- /dev/null +++ b/ThirdParty/Unity.Mathematics/random.cs @@ -0,0 +1,733 @@ +using System; +using System.Runtime.CompilerServices; +using static Unity.Mathematics.math; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +namespace Unity.Mathematics +{ + /// + /// Random Number Generator based on xorshift. + /// Designed for minimal state (32bits) to be easily embeddable into components. + /// Core functionality is integer multiplication free to improve vectorization + /// on less capable SIMD instruction sets. + /// + [Il2CppEagerStaticClassConstruction] + [Serializable] + public partial struct Random + { + /// + /// The random number generator state. It should not be zero. + /// + public uint state; + + /// + /// Constructs a Random instance with a given seed value. The seed must be non-zero. + /// + /// The seed to initialize with. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Random(uint seed) + { + state = seed; + CheckInitState(); + NextState(); + } + + /// + /// Constructs a instance with an index that gets hashed. The index must not be uint.MaxValue. + /// + /// + /// Use this function when you expect to create several Random instances in a loop. + /// + /// + /// + /// for (uint i = 0; i < 4096; ++i) + /// { + /// Random rand = Random.CreateFromIndex(i); + /// + /// // Random numbers drawn from loop iteration j will be very different + /// // from every other loop iteration k. + /// rand.NextUInt(); + /// } + /// + /// + /// An index that will be hashed for Random creation. Must not be uint.MaxValue. + /// created from an index. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Random CreateFromIndex(uint index) + { + CheckIndexForHash(index); + + // Wang hash will hash 61 to zero but we want uint.MaxValue to hash to zero. To make this happen + // we must offset by 62. + return new Random(WangHash(index + 62u)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint WangHash(uint n) + { + // https://gist.github.com/badboy/6267743#hash-function-construction-principles + // Wang hash: this has the property that none of the outputs will + // collide with each other, which is important for the purposes of + // seeding a random number generator. This was verified empirically + // by checking all 2^32 uints. + n = (n ^ 61u) ^ (n >> 16); + n *= 9u; + n = n ^ (n >> 4); + n *= 0x27d4eb2du; + n = n ^ (n >> 15); + + return n; + } + + /// + /// Initialized the state of the Random instance with a given seed value. The seed must be non-zero. + /// + /// The seed to initialize with. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void InitState(uint seed = 0x6E624EB7u) + { + state = seed; + NextState(); + } + + /// Returns a uniformly random bool value. + /// A uniformly random boolean value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool NextBool() + { + return (NextState() & 1) == 1; + } + + /// Returns a uniformly random bool2 value. + /// A uniformly random bool2 value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool2 NextBool2() + { + uint v = NextState(); + return (uint2(v) & uint2(1, 2)) == 0; + } + + /// Returns a uniformly random bool3 value. + /// A uniformly random bool3 value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool3 NextBool3() + { + uint v = NextState(); + return (uint3(v) & uint3(1, 2, 4)) == 0; + } + + /// Returns a uniformly random bool4 value. + /// A uniformly random bool4 value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool4 NextBool4() + { + uint v = NextState(); + return (uint4(v) & uint4(1, 2, 4, 8)) == 0; + } + + + /// Returns a uniformly random int value in the interval [-2147483647, 2147483647]. + /// A uniformly random integer value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int NextInt() + { + return (int)NextState() ^ -2147483648; + } + + /// Returns a uniformly random int2 value with all components in the interval [-2147483647, 2147483647]. + /// A uniformly random int2 value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2 NextInt2() + { + return int2((int)NextState(), (int)NextState()) ^ -2147483648; + } + + /// Returns a uniformly random int3 value with all components in the interval [-2147483647, 2147483647]. + /// A uniformly random int3 value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3 NextInt3() + { + return int3((int)NextState(), (int)NextState(), (int)NextState()) ^ -2147483648; + } + + /// Returns a uniformly random int4 value with all components in the interval [-2147483647, 2147483647]. + /// A uniformly random int4 value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4 NextInt4() + { + return int4((int)NextState(), (int)NextState(), (int)NextState(), (int)NextState()) ^ -2147483648; + } + + /// Returns a uniformly random int value in the interval [0, max). + /// The maximum value to generate, exclusive. + /// A uniformly random int value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int NextInt(int max) + { + CheckNextIntMax(max); + return (int)((NextState() * (ulong)max) >> 32); + } + + /// Returns a uniformly random int2 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random int2 value with all components in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2 NextInt2(int2 max) + { + CheckNextIntMax(max.x); + CheckNextIntMax(max.y); + return int2((int)(NextState() * (ulong)max.x >> 32), + (int)(NextState() * (ulong)max.y >> 32)); + } + + /// Returns a uniformly random int3 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random int3 value with all components in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3 NextInt3(int3 max) + { + CheckNextIntMax(max.x); + CheckNextIntMax(max.y); + CheckNextIntMax(max.z); + return int3((int)(NextState() * (ulong)max.x >> 32), + (int)(NextState() * (ulong)max.y >> 32), + (int)(NextState() * (ulong)max.z >> 32)); + } + + /// Returns a uniformly random int4 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random int4 value with all components in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4 NextInt4(int4 max) + { + CheckNextIntMax(max.x); + CheckNextIntMax(max.y); + CheckNextIntMax(max.z); + CheckNextIntMax(max.w); + return int4((int)(NextState() * (ulong)max.x >> 32), + (int)(NextState() * (ulong)max.y >> 32), + (int)(NextState() * (ulong)max.z >> 32), + (int)(NextState() * (ulong)max.w >> 32)); + } + + /// Returns a uniformly random int value in the interval [min, max). + /// The minimum value to generate, inclusive. + /// The maximum value to generate, exclusive. + /// A uniformly random integer between [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int NextInt(int min, int max) + { + CheckNextIntMinMax(min, max); + uint range = (uint)(max - min); + return (int)(NextState() * (ulong)range >> 32) + min; + } + + /// Returns a uniformly random int2 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random int2 between [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int2 NextInt2(int2 min, int2 max) + { + CheckNextIntMinMax(min.x, max.x); + CheckNextIntMinMax(min.y, max.y); + uint2 range = (uint2)(max - min); + return int2((int)(NextState() * (ulong)range.x >> 32), + (int)(NextState() * (ulong)range.y >> 32)) + min; + } + + /// Returns a uniformly random int3 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random int3 between [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int3 NextInt3(int3 min, int3 max) + { + CheckNextIntMinMax(min.x, max.x); + CheckNextIntMinMax(min.y, max.y); + CheckNextIntMinMax(min.z, max.z); + uint3 range = (uint3)(max - min); + return int3((int)(NextState() * (ulong)range.x >> 32), + (int)(NextState() * (ulong)range.y >> 32), + (int)(NextState() * (ulong)range.z >> 32)) + min; + } + + /// Returns a uniformly random int4 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random int4 between [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public int4 NextInt4(int4 min, int4 max) + { + CheckNextIntMinMax(min.x, max.x); + CheckNextIntMinMax(min.y, max.y); + CheckNextIntMinMax(min.z, max.z); + CheckNextIntMinMax(min.w, max.w); + uint4 range = (uint4)(max - min); + return int4((int)(NextState() * (ulong)range.x >> 32), + (int)(NextState() * (ulong)range.y >> 32), + (int)(NextState() * (ulong)range.z >> 32), + (int)(NextState() * (ulong)range.w >> 32)) + min; + } + + /// Returns a uniformly random uint value in the interval [0, 4294967294]. + /// A uniformly random unsigned integer. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint NextUInt() + { + return NextState() - 1u; + } + + /// Returns a uniformly random uint2 value with all components in the interval [0, 4294967294]. + /// A uniformly random uint2. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2 NextUInt2() + { + return uint2(NextState(), NextState()) - 1u; + } + + /// Returns a uniformly random uint3 value with all components in the interval [0, 4294967294]. + /// A uniformly random uint3. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3 NextUInt3() + { + return uint3(NextState(), NextState(), NextState()) - 1u; + } + + /// Returns a uniformly random uint4 value with all components in the interval [0, 4294967294]. + /// A uniformly random uint4. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4 NextUInt4() + { + return uint4(NextState(), NextState(), NextState(), NextState()) - 1u; + } + + + /// Returns a uniformly random uint value in the interval [0, max). + /// The maximum value to generate, exclusive. + /// A uniformly random unsigned integer in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint NextUInt(uint max) + { + return (uint)((NextState() * (ulong)max) >> 32); + } + + /// Returns a uniformly random uint2 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random uint2 in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2 NextUInt2(uint2 max) + { + return uint2( (uint)(NextState() * (ulong)max.x >> 32), + (uint)(NextState() * (ulong)max.y >> 32)); + } + + /// Returns a uniformly random uint3 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random uint3 in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3 NextUInt3(uint3 max) + { + return uint3( (uint)(NextState() * (ulong)max.x >> 32), + (uint)(NextState() * (ulong)max.y >> 32), + (uint)(NextState() * (ulong)max.z >> 32)); + } + + /// Returns a uniformly random uint4 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random uint4 in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4 NextUInt4(uint4 max) + { + return uint4( (uint)(NextState() * (ulong)max.x >> 32), + (uint)(NextState() * (ulong)max.y >> 32), + (uint)(NextState() * (ulong)max.z >> 32), + (uint)(NextState() * (ulong)max.w >> 32)); + } + + /// Returns a uniformly random uint value in the interval [min, max). + /// The minimum value to generate, inclusive. + /// The maximum value to generate, exclusive. + /// A uniformly random unsigned integer in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint NextUInt(uint min, uint max) + { + CheckNextUIntMinMax(min, max); + uint range = max - min; + return (uint)(NextState() * (ulong)range >> 32) + min; + } + + /// Returns a uniformly random uint2 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random uint2 in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2 NextUInt2(uint2 min, uint2 max) + { + CheckNextUIntMinMax(min.x, max.x); + CheckNextUIntMinMax(min.y, max.y); + uint2 range = max - min; + return uint2((uint)(NextState() * (ulong)range.x >> 32), + (uint)(NextState() * (ulong)range.y >> 32)) + min; + } + + /// Returns a uniformly random uint3 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random uint3 in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3 NextUInt3(uint3 min, uint3 max) + { + CheckNextUIntMinMax(min.x, max.x); + CheckNextUIntMinMax(min.y, max.y); + CheckNextUIntMinMax(min.z, max.z); + uint3 range = max - min; + return uint3((uint)(NextState() * (ulong)range.x >> 32), + (uint)(NextState() * (ulong)range.y >> 32), + (uint)(NextState() * (ulong)range.z >> 32)) + min; + } + + /// Returns a uniformly random uint4 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random uint4 in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4 NextUInt4(uint4 min, uint4 max) + { + CheckNextUIntMinMax(min.x, max.x); + CheckNextUIntMinMax(min.y, max.y); + CheckNextUIntMinMax(min.z, max.z); + CheckNextUIntMinMax(min.w, max.w); + uint4 range = (uint4)(max - min); + return uint4((uint)(NextState() * (ulong)range.x >> 32), + (uint)(NextState() * (ulong)range.y >> 32), + (uint)(NextState() * (ulong)range.z >> 32), + (uint)(NextState() * (ulong)range.w >> 32)) + min; + } + + /// Returns a uniformly random float value in the interval [0, 1). + /// A uniformly random float value in the range [0, 1). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float NextFloat() + { + return asfloat(0x3f800000 | (NextState() >> 9)) - 1.0f; + } + + /// Returns a uniformly random float2 value with all components in the interval [0, 1). + /// A uniformly random float2 value in the range [0, 1). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2 NextFloat2() + { + return asfloat(0x3f800000 | (uint2(NextState(), NextState()) >> 9)) - 1.0f; + } + + /// Returns a uniformly random float3 value with all components in the interval [0, 1). + /// A uniformly random float3 value in the range [0, 1). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3 NextFloat3() + { + return asfloat(0x3f800000 | (uint3(NextState(), NextState(), NextState()) >> 9)) - 1.0f; + } + + /// Returns a uniformly random float4 value with all components in the interval [0, 1). + /// A uniformly random float4 value in the range [0, 1). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4 NextFloat4() + { + return asfloat(0x3f800000 | (uint4(NextState(), NextState(), NextState(), NextState()) >> 9)) - 1.0f; + } + + + /// Returns a uniformly random float value in the interval [0, max). + /// The maximum value to generate, exclusive. + /// A uniformly random float value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float NextFloat(float max) { return NextFloat() * max; } + + /// Returns a uniformly random float2 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random float2 value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2 NextFloat2(float2 max) { return NextFloat2() * max; } + + /// Returns a uniformly random float3 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random float3 value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3 NextFloat3(float3 max) { return NextFloat3() * max; } + + /// Returns a uniformly random float4 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random float4 value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4 NextFloat4(float4 max) { return NextFloat4() * max; } + + + /// Returns a uniformly random float value in the interval [min, max). + /// The minimum value to generate, inclusive. + /// The maximum value to generate, exclusive. + /// A uniformly random float value in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float NextFloat(float min, float max) { return NextFloat() * (max - min) + min; } + + /// Returns a uniformly random float2 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random float2 value in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2 NextFloat2(float2 min, float2 max) { return NextFloat2() * (max - min) + min; } + + /// Returns a uniformly random float3 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random float3 value in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3 NextFloat3(float3 min, float3 max) { return NextFloat3() * (max - min) + min; } + + /// Returns a uniformly random float4 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random float4 value in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float4 NextFloat4(float4 min, float4 max) { return NextFloat4() * (max - min) + min; } + + + + /// Returns a uniformly random double value in the interval [0, 1). + /// A uniformly random double value in the range [0, 1). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double NextDouble() + { + ulong sx = ((ulong)NextState() << 20) ^ NextState(); + return asdouble(0x3ff0000000000000 | sx) - 1.0; + } + + /// Returns a uniformly random double2 value with all components in the interval [0, 1). + /// A uniformly random double2 value in the range [0, 1). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2 NextDouble2() + { + ulong sx = ((ulong)NextState() << 20) ^ NextState(); + ulong sy = ((ulong)NextState() << 20) ^ NextState(); + return double2(asdouble(0x3ff0000000000000 | sx), + asdouble(0x3ff0000000000000 | sy)) - 1.0; + } + + /// Returns a uniformly random double3 value with all components in the interval [0, 1). + /// A uniformly random double3 value in the range [0, 1). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3 NextDouble3() + { + ulong sx = ((ulong)NextState() << 20) ^ NextState(); + ulong sy = ((ulong)NextState() << 20) ^ NextState(); + ulong sz = ((ulong)NextState() << 20) ^ NextState(); + return double3(asdouble(0x3ff0000000000000 | sx), + asdouble(0x3ff0000000000000 | sy), + asdouble(0x3ff0000000000000 | sz)) - 1.0; + } + + /// Returns a uniformly random double4 value with all components in the interval [0, 1). + /// A uniformly random double4 value in the range [0, 1). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4 NextDouble4() + { + ulong sx = ((ulong)NextState() << 20) ^ NextState(); + ulong sy = ((ulong)NextState() << 20) ^ NextState(); + ulong sz = ((ulong)NextState() << 20) ^ NextState(); + ulong sw = ((ulong)NextState() << 20) ^ NextState(); + return double4(asdouble(0x3ff0000000000000 | sx), + asdouble(0x3ff0000000000000 | sy), + asdouble(0x3ff0000000000000 | sz), + asdouble(0x3ff0000000000000 | sw)) - 1.0; + } + + + /// Returns a uniformly random double value in the interval [0, max). + /// The maximum value to generate, exclusive. + /// A uniformly random double value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double NextDouble(double max) { return NextDouble() * max; } + + /// Returns a uniformly random double2 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random double2 value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2 NextDouble2(double2 max) { return NextDouble2() * max; } + + /// Returns a uniformly random double3 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random double3 value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3 NextDouble3(double3 max) { return NextDouble3() * max; } + + /// Returns a uniformly random double4 value with all components in the interval [0, max). + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random double4 value in the range [0, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4 NextDouble4(double4 max) { return NextDouble4() * max; } + + + /// Returns a uniformly random double value in the interval [min, max). + /// The minimum value to generate, inclusive. + /// The maximum value to generate, exclusive. + /// A uniformly random double value in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double NextDouble(double min, double max) { return NextDouble() * (max - min) + min; } + + /// Returns a uniformly random double2 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random double2 value in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2 NextDouble2(double2 min, double2 max) { return NextDouble2() * (max - min) + min; } + + /// Returns a uniformly random double3 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random double3 value in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3 NextDouble3(double3 min, double3 max) { return NextDouble3() * (max - min) + min; } + + /// Returns a uniformly random double4 value with all components in the interval [min, max). + /// The componentwise minimum value to generate, inclusive. + /// The componentwise maximum value to generate, exclusive. + /// A uniformly random double4 value in the range [min, max). + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double4 NextDouble4(double4 min, double4 max) { return NextDouble4() * (max - min) + min; } + + /// Returns a unit length float2 vector representing a uniformly random 2D direction. + /// A uniformly random unit length float2 vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float2 NextFloat2Direction() + { + float angle = NextFloat() * PI * 2.0f; + float s, c; + sincos(angle, out s, out c); + return float2(c, s); + } + + /// Returns a unit length double2 vector representing a uniformly random 2D direction. + /// A uniformly random unit length double2 vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double2 NextDouble2Direction() + { + double angle = NextDouble() * PI_DBL * 2.0; + double s, c; + sincos(angle, out s, out c); + return double2(c, s); + } + + /// Returns a unit length float3 vector representing a uniformly random 3D direction. + /// A uniformly random unit length float3 vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public float3 NextFloat3Direction() + { + float2 rnd = NextFloat2(); + float z = rnd.x * 2.0f - 1.0f; + float r = sqrt(max(1.0f - z * z, 0.0f)); + float angle = rnd.y * PI * 2.0f; + float s, c; + sincos(angle, out s, out c); + return float3(c*r, s*r, z); + } + + /// Returns a unit length double3 vector representing a uniformly random 3D direction. + /// A uniformly random unit length double3 vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public double3 NextDouble3Direction() + { + double2 rnd = NextDouble2(); + double z = rnd.x * 2.0 - 1.0; + double r = sqrt(max(1.0 - z * z, 0.0)); + double angle = rnd.y * PI_DBL * 2.0; + double s, c; + sincos(angle, out s, out c); + return double3(c * r, s * r, z); + } + + /// Returns a unit length quaternion representing a uniformly 3D rotation. + /// A uniformly random unit length quaternion. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public quaternion NextQuaternionRotation() + { + float3 rnd = NextFloat3(float3(2.0f * PI, 2.0f * PI, 1.0f)); + float u1 = rnd.z; + float2 theta_rho = rnd.xy; + + float i = sqrt(1.0f - u1); + float j = sqrt(u1); + + float2 sin_theta_rho; + float2 cos_theta_rho; + sincos(theta_rho, out sin_theta_rho, out cos_theta_rho); + + quaternion q = quaternion(i * sin_theta_rho.x, i * cos_theta_rho.x, j * sin_theta_rho.y, j * cos_theta_rho.y); + return quaternion(select(q.value, -q.value, q.value.w < 0.0f)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private uint NextState() + { + CheckState(); + uint t = state; + state ^= state << 13; + state ^= state >> 17; + state ^= state << 5; + return t; + } + + [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] + private void CheckInitState() + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if (state == 0) + throw new System.ArgumentException("Seed must be non-zero"); +#endif + } + + [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] + static void CheckIndexForHash(uint index) + { + if (index == uint.MaxValue) + throw new System.ArgumentException("Index must not be uint.MaxValue"); + } + + [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] + private void CheckState() + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if(state == 0) + throw new System.ArgumentException("Invalid state 0. Random object has not been properly initialized"); +#endif + } + + [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] + private void CheckNextIntMax(int max) + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if (max < 0) + throw new System.ArgumentException("max must be positive"); +#endif + } + + [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] + private void CheckNextIntMinMax(int min, int max) + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if (min > max) + throw new System.ArgumentException("min must be less than or equal to max"); +#endif + } + + [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] + private void CheckNextUIntMinMax(uint min, uint max) + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if (min > max) + throw new System.ArgumentException("min must be less than or equal to max"); +#endif + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/rigid_transform.cs b/ThirdParty/Unity.Mathematics/rigid_transform.cs new file mode 100644 index 0000000..0fbec1e --- /dev/null +++ b/ThirdParty/Unity.Mathematics/rigid_transform.cs @@ -0,0 +1,415 @@ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; +using static Unity.Mathematics.math; + +namespace Unity.Mathematics +{ + /// + /// A rigid transformation type. + /// + [Il2CppEagerStaticClassConstruction] + [Serializable] + public struct RigidTransform + { + /// + /// The rotation part of the rigid transformation. + /// + public quaternion rot; + + /// + /// The translation part of the rigid transformation. + /// + public float3 pos; + + /// A RigidTransform representing the identity transform. + public static readonly RigidTransform identity = new RigidTransform(new quaternion(0.0f, 0.0f, 0.0f, 1.0f), new float3(0.0f, 0.0f, 0.0f)); + + /// Constructs a RigidTransform from a rotation represented by a unit quaternion and a translation represented by a float3 vector. + /// The quaternion rotation. + /// The translation vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public RigidTransform(quaternion rotation, float3 translation) + { + this.rot = rotation; + this.pos = translation; + } + + /// Constructs a RigidTransform from a rotation represented by a float3x3 matrix and a translation represented by a float3 vector. + /// The float3x3 rotation matrix. + /// The translation vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public RigidTransform(float3x3 rotation, float3 translation) + { + this.rot = new quaternion(rotation); + this.pos = translation; + } + + /// Constructs a RigidTransform from a float4x4. Assumes the matrix is orthonormal. + /// The float4x4 transformation matrix, must be orthonormal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public RigidTransform(float4x4 transform) + { + this.rot = new quaternion(transform); + this.pos = transform.c3.xyz; + } + + + /// + /// Returns a RigidTransform representing a rotation around a unit axis by an angle in radians. + /// The rotation direction is clockwise when looking along the rotation axis towards the origin. + /// + /// The axis of rotation. + /// The rotation angle in radians. + /// The RigidTransform from a rotation axis and angle of rotation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform AxisAngle(float3 axis, float angle) { return new RigidTransform(quaternion.AxisAngle(axis, angle), float3.zero); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The RigidTransform of the Euler angle transformation in x-y-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerXYZ(float3 xyz) { return new RigidTransform(quaternion.EulerXYZ(xyz), float3.zero); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The RigidTransform of the Euler angle transformation in x-z-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerXZY(float3 xyz) { return new RigidTransform(quaternion.EulerXZY(xyz), float3.zero); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The RigidTransform of the Euler angle transformation in y-x-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerYXZ(float3 xyz) { return new RigidTransform(quaternion.EulerYXZ(xyz), float3.zero); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The RigidTransform of the Euler angle transformation in y-z-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerYZX(float3 xyz) { return new RigidTransform(quaternion.EulerYZX(xyz), float3.zero); } + + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// This is the default order rotation order in Unity. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The RigidTransform of the Euler angle transformation in z-x-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerZXY(float3 xyz) { return new RigidTransform(quaternion.EulerZXY(xyz), float3.zero); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The RigidTransform of the Euler angle transformation in z-y-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerZYX(float3 xyz) { return new RigidTransform(quaternion.EulerZYX(xyz), float3.zero); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The RigidTransform of the Euler angle transformation in x-y-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerXYZ(float x, float y, float z) { return EulerXYZ(float3(x, y, z)); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The RigidTransform of the Euler angle transformation in x-z-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerXZY(float x, float y, float z) { return EulerXZY(float3(x, y, z)); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The RigidTransform of the Euler angle transformation in y-x-z order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerYXZ(float x, float y, float z) { return EulerYXZ(float3(x, y, z)); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The RigidTransform of the Euler angle transformation in y-z-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerYZX(float x, float y, float z) { return EulerYZX(float3(x, y, z)); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// This is the default order rotation order in Unity. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The RigidTransform of the Euler angle transformation in z-x-y order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerZXY(float x, float y, float z) { return EulerZXY(float3(x, y, z)); } + + /// + /// Returns a RigidTransform constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The RigidTransform of the Euler angle transformation in z-y-x order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform EulerZYX(float x, float y, float z) { return EulerZYX(float3(x, y, z)); } + + /// + /// Returns a RigidTransform constructed by first performing 3 rotations around the principal axes in a given order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// When the rotation order is known at compile time, it is recommended for performance reasons to use specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// A float3 vector containing the rotation angles around the x-, y- and z-axis measures in radians. + /// The order in which the rotations are applied. + /// The RigidTransform of the Euler angle transformation in the given rotation order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform Euler(float3 xyz, RotationOrder order = RotationOrder.ZXY) + { + switch (order) + { + case RotationOrder.XYZ: + return EulerXYZ(xyz); + case RotationOrder.XZY: + return EulerXZY(xyz); + case RotationOrder.YXZ: + return EulerYXZ(xyz); + case RotationOrder.YZX: + return EulerYZX(xyz); + case RotationOrder.ZXY: + return EulerZXY(xyz); + case RotationOrder.ZYX: + return EulerZYX(xyz); + default: + return RigidTransform.identity; + } + } + + /// + /// Returns a RigidTransform constructed by first performing 3 rotations around the principal axes in a given order. + /// All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. + /// When the rotation order is known at compile time, it is recommended for performance reasons to use specific + /// Euler rotation constructors such as EulerZXY(...). + /// + /// The rotation angle around the x-axis in radians. + /// The rotation angle around the y-axis in radians. + /// The rotation angle around the z-axis in radians. + /// The order in which the rotations are applied. + /// The RigidTransform of the Euler angle transformation in the given rotation order. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform Euler(float x, float y, float z, RotationOrder order = RotationOrder.Default) + { + return Euler(float3(x, y, z), order); + } + + /// Returns a RigidTransform that rotates around the x-axis by a given number of radians. + /// The clockwise rotation angle when looking along the x-axis towards the origin in radians. + /// The RigidTransform of rotating around the x-axis by the given angle. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform RotateX(float angle) + { + return new RigidTransform(quaternion.RotateX(angle), float3.zero); + } + + /// Returns a RigidTransform that rotates around the y-axis by a given number of radians. + /// The clockwise rotation angle when looking along the y-axis towards the origin in radians. + /// The RigidTransform of rotating around the y-axis by the given angle. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform RotateY(float angle) + { + return new RigidTransform(quaternion.RotateY(angle), float3.zero); + } + + /// Returns a RigidTransform that rotates around the z-axis by a given number of radians. + /// The clockwise rotation angle when looking along the z-axis towards the origin in radians. + /// The RigidTransform of rotating around the z-axis by the given angle. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform RotateZ(float angle) + { + return new RigidTransform(quaternion.RotateZ(angle), float3.zero); + } + + /// Returns a RigidTransform that translates by an amount specified by a float3 vector. + /// The translation vector. + /// The RigidTransform that translates by the given translation vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform Translate(float3 vector) + { + return new RigidTransform(quaternion.identity, vector); + } + + + /// Returns true if the RigidTransform is equal to a given RigidTransform, false otherwise. + /// The RigidTransform to compare with. + /// True if the RigidTransform is equal to the input, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(RigidTransform x) { return rot.Equals(x.rot) && pos.Equals(x.pos); } + + /// Returns true if the RigidTransform is equal to a given RigidTransform, false otherwise. + /// The object to compare with. + /// True if the RigidTransform is equal to the input, false otherwise. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override bool Equals(object x) { return x is RigidTransform converted && Equals(converted); } + + /// Returns a hash code for the RigidTransform. + /// The hash code of the RigidTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + /// Returns a string representation of the RigidTransform. + /// The string representation of the RigidTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("RigidTransform(({0}f, {1}f, {2}f, {3}f), ({4}f, {5}f, {6}f))", + rot.value.x, rot.value.y, rot.value.z, rot.value.w, pos.x, pos.y, pos.z); + } + + /// Returns a string representation of the RigidTransform using a specified format and culture-specific format information. + /// The format string. + /// The format provider to use during formatting. + /// The formatted string representation of the RigidTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("float4x4(({0}f, {1}f, {2}f, {3}f), ({4}f, {5}f, {6}f))", + rot.value.x.ToString(format, formatProvider), + rot.value.y.ToString(format, formatProvider), + rot.value.z.ToString(format, formatProvider), + rot.value.w.ToString(format, formatProvider), + pos.x.ToString(format, formatProvider), + pos.y.ToString(format, formatProvider), + pos.z.ToString(format, formatProvider)); + } + } + + public static partial class math + { + /// Returns a RigidTransform constructed from a rotation represented by a unit quaternion and a translation represented by a float3 vector. + /// The quaternion rotation. + /// The translation vector. + /// The RigidTransform of the given rotation quaternion and translation vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform RigidTransform(quaternion rot, float3 pos) { return new RigidTransform(rot, pos); } + + /// Returns a RigidTransform constructed from a rotation represented by a float3x3 rotation matrix and a translation represented by a float3 vector. + /// The float3x3 rotation matrix. + /// The translation vector. + /// The RigidTransform of the given rotation matrix and translation vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform RigidTransform(float3x3 rotation, float3 translation) { return new RigidTransform(rotation, translation); } + + /// Returns a RigidTransform constructed from a rotation represented by a float3x3 matrix and a translation represented by a float3 vector. + /// The float4x4 transformation matrix. + /// The RigidTransform of the given float4x4 transformation matrix. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform RigidTransform(float4x4 transform) { return new RigidTransform(transform); } + + /// Returns the inverse of a RigidTransform. + /// The RigidTransform to invert. + /// The inverse RigidTransform. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform inverse(RigidTransform t) + { + quaternion invRotation = inverse(t.rot); + float3 invTranslation = mul(invRotation, -t.pos); + return new RigidTransform(invRotation, invTranslation); + } + + /// Returns the result of transforming the RigidTransform b by the RigidTransform a. + /// The RigidTransform on the left. + /// The RigidTransform on the right. + /// The RigidTransform of a transforming b. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static RigidTransform mul(RigidTransform a, RigidTransform b) + { + return new RigidTransform(mul(a.rot, b.rot), mul(a.rot, b.pos) + a.pos); + } + + /// Returns the result of transforming a float4 homogeneous coordinate by a RigidTransform. + /// The RigidTransform. + /// The position to be transformed. + /// The transformed position. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float4 mul(RigidTransform a, float4 pos) + { + return float4(mul(a.rot, pos.xyz) + a.pos * pos.w, pos.w); + } + + /// Returns the result of rotating a float3 vector by a RigidTransform. + /// The RigidTransform. + /// The direction vector to rotate. + /// The rotated direction vector. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 rotate(RigidTransform a, float3 dir) + { + return mul(a.rot, dir); + } + + /// Returns the result of transforming a float3 point by a RigidTransform. + /// The RigidTransform. + /// The position to transform. + /// The transformed position. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3 transform(RigidTransform a, float3 pos) + { + return mul(a.rot, pos) + a.pos; + } + + /// Returns a uint hash code of a RigidTransform. + /// The RigidTransform to hash. + /// The hash code of the input RigidTransform + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(RigidTransform t) + { + return hash(t.rot) + 0xC5C5394Bu * hash(t.pos); + } + + /// + /// Returns a uint4 vector hash code of a RigidTransform. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// The RigidTransform to hash. + /// The uint4 wide hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(RigidTransform t) + { + return hashwide(t.rot) + 0xC5C5394Bu * hashwide(t.pos).xyzz; + } + } +} diff --git a/ThirdParty/Unity.Mathematics/svd.cs b/ThirdParty/Unity.Mathematics/svd.cs new file mode 100644 index 0000000..d57e748 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/svd.cs @@ -0,0 +1,170 @@ +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +namespace Unity.Mathematics +{ + // SVD algorithm as described in: + // Computing the singular value decomposition of 3x3 matrices with minimal branching and elementary floating point operations, + // A.McAdams, A.Selle, R.Tamstorf, J.Teran and E.Sifakis, University of Wisconsin - Madison technical report TR1690, May 2011 + [Il2CppEagerStaticClassConstruction] + static public class svd + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static void condSwap(bool c, ref float x, ref float y) + { + var tmp = x; + x = math.select(x, y, c); + y = math.select(y, tmp, c); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static void condNegSwap(bool c, ref float3 x, ref float3 y) + { + var tmp = -x; + x = math.select(x, y, c); + y = math.select(y, tmp, c); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static quaternion condNegSwapQuat(bool c, quaternion q, float4 mask) + { + const float halfSqrt2 = 0.707106781186548f; + return math.mul(q, math.select(quaternion.identity.value, mask * halfSqrt2, c)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static void sortSingularValues(ref float3x3 b, ref quaternion v) + { + var l0 = math.lengthsq(b.c0); + var l1 = math.lengthsq(b.c1); + var l2 = math.lengthsq(b.c2); + + var c = l0 < l1; + condNegSwap(c, ref b.c0, ref b.c1); + v = condNegSwapQuat(c, v, math.float4(0f, 0f, 1f, 1f)); + condSwap(c, ref l0, ref l1); + + c = l0 < l2; + condNegSwap(c, ref b.c0, ref b.c2); + v = condNegSwapQuat(c, v, math.float4(0f, -1f, 0f, 1f)); + condSwap(c, ref l0, ref l2); + + c = l1 < l2; + condNegSwap(c, ref b.c1, ref b.c2); + v = condNegSwapQuat(c, v, math.float4(1f, 0f, 0f, 1f)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static quaternion approxGivensQuat(float3 pq, float4 mask) + { + const float c8 = 0.923879532511287f; // cos(pi/8) + const float s8 = 0.38268343236509f; // sin(pi/8) + const float g = 5.82842712474619f; // 3 + 2 * sqrt(2) + + var ch = 2f * (pq.x - pq.y); // approx cos(a/2) + var sh = pq.z; // approx sin(a/2) + var r = math.select(math.float4(s8, s8, s8, c8), math.float4(sh, sh, sh, ch), g * sh * sh < ch * ch) * mask; + return math.normalize(r); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static quaternion qrGivensQuat(float2 pq, float4 mask) + { + var l = math.sqrt(pq.x * pq.x + pq.y * pq.y); + var sh = math.select(0f, pq.y, l > k_EpsilonNormalSqrt); + var ch = math.abs(pq.x) + math.max(l, k_EpsilonNormalSqrt); + condSwap(pq.x < 0f, ref sh, ref ch); + + return math.normalize(math.float4(sh, sh, sh, ch) * mask); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static quaternion givensQRFactorization(float3x3 b, out float3x3 r) + { + var u = qrGivensQuat(math.float2(b.c0.x, b.c0.y), math.float4(0f, 0f, 1f, 1f)); + var qmt = math.float3x3(math.conjugate(u)); + r = math.mul(qmt, b); + + var q = qrGivensQuat(math.float2(r.c0.x, r.c0.z), math.float4(0f, -1f, 0f, 1f)); + u = math.mul(u, q); + qmt = math.float3x3(math.conjugate(q)); + r = math.mul(qmt, r); + + q = qrGivensQuat(math.float2(r.c1.y, r.c1.z), math.float4(1f, 0f, 0f, 1f)); + u = math.mul(u, q); + qmt = math.float3x3(math.conjugate(q)); + r = math.mul(qmt, r); + + return u; + } + + static quaternion jacobiIteration(ref float3x3 s, int iterations = 5) + { + float3x3 qm; + quaternion q; + quaternion v = quaternion.identity; + + for (int i = 0; i < iterations; ++i) + { + q = approxGivensQuat(math.float3(s.c0.x, s.c1.y, s.c0.y), math.float4(0f, 0f, 1f, 1f)); + v = math.mul(v, q); + qm = math.float3x3(q); + s = math.mul(math.mul(math.transpose(qm), s), qm); + + q = approxGivensQuat(math.float3(s.c1.y, s.c2.z, s.c1.z), math.float4(1f, 0f, 0f, 1f)); + v = math.mul(v, q); + qm = math.float3x3(q); + s = math.mul(math.mul(math.transpose(qm), s), qm); + + q = approxGivensQuat(math.float3(s.c2.z, s.c0.x, s.c2.x), math.float4(0f, 1f, 0f, 1f)); + v = math.mul(v, q); + qm = math.float3x3(q); + s = math.mul(math.mul(math.transpose(qm), s), qm); + } + + return v; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float3 singularValuesDecomposition(float3x3 a, out quaternion u, out quaternion v) + { + u = quaternion.identity; + v = quaternion.identity; + + var s = math.mul(math.transpose(a), a); + v = jacobiIteration(ref s); + var b = math.float3x3(v); + b = math.mul(a, b); + sortSingularValues(ref b, ref v); + u = givensQRFactorization(b, out var e); + + return math.float3(e.c0.x, e.c1.y, e.c2.z); + } + + public const float k_EpsilonDeterminant = 1e-6f; + public const float k_EpsilonRCP = 1e-9f; + public const float k_EpsilonNormalSqrt = 1e-15f; + public const float k_EpsilonNormal = 1e-30f; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static float3 rcpsafe(float3 x, float epsilon = k_EpsilonRCP) => + math.select(math.rcp(x), float3.zero, math.abs(x) < epsilon); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float3x3 svdInverse(float3x3 a) + { + var e = singularValuesDecomposition(a, out var u, out var v); + var um = math.float3x3(u); + var vm = math.float3x3(v); + + return math.mul(vm, math.scaleMul(rcpsafe(e, k_EpsilonDeterminant), math.transpose(um))); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static quaternion svdRotation(float3x3 a) + { + singularValuesDecomposition(a, out var u, out var v); + return math.mul(u, math.conjugate(v)); + } + } +} \ No newline at end of file diff --git a/ThirdParty/Unity.Mathematics/uint2.gen.cs b/ThirdParty/Unity.Mathematics/uint2.gen.cs new file mode 100644 index 0000000..92234f6 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint2.gen.cs @@ -0,0 +1,1043 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2 component vector of uints. + [DebuggerTypeProxy(typeof(uint2.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint2 : System.IEquatable, IFormattable + { + /// x component of the vector. + public uint x; + /// y component of the vector. + public uint y; + + /// uint2 zero value. + public static readonly uint2 zero; + + /// Constructs a uint2 vector from two uint values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(uint x, uint y) + { + this.x = x; + this.y = y; + } + + /// Constructs a uint2 vector from a uint2 vector. + /// The constructed vector's xy components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(uint2 xy) + { + this.x = xy.x; + this.y = xy.y; + } + + /// Constructs a uint2 vector from a single uint value by assigning it to every component. + /// uint to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(uint v) + { + this.x = v; + this.y = v; + } + + /// Constructs a uint2 vector from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(bool v) + { + this.x = v ? 1u : 0u; + this.y = v ? 1u : 0u; + } + + /// Constructs a uint2 vector from a bool2 vector by componentwise conversion. + /// bool2 to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(bool2 v) + { + this.x = v.x ? 1u : 0u; + this.y = v.y ? 1u : 0u; + } + + /// Constructs a uint2 vector from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(int v) + { + this.x = (uint)v; + this.y = (uint)v; + } + + /// Constructs a uint2 vector from a int2 vector by componentwise conversion. + /// int2 to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(int2 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + } + + /// Constructs a uint2 vector from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(float v) + { + this.x = (uint)v; + this.y = (uint)v; + } + + /// Constructs a uint2 vector from a float2 vector by componentwise conversion. + /// float2 to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(float2 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + } + + /// Constructs a uint2 vector from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(double v) + { + this.x = (uint)v; + this.y = (uint)v; + } + + /// Constructs a uint2 vector from a double2 vector by componentwise conversion. + /// double2 to convert to uint2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2(double2 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + } + + + /// Implicitly converts a single uint value to a uint2 vector by assigning it to every component. + /// uint to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint2(uint v) { return new uint2(v); } + + /// Explicitly converts a single bool value to a uint2 vector by converting it to uint and assigning it to every component. + /// bool to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2(bool v) { return new uint2(v); } + + /// Explicitly converts a bool2 vector to a uint2 vector by componentwise conversion. + /// bool2 to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2(bool2 v) { return new uint2(v); } + + /// Explicitly converts a single int value to a uint2 vector by converting it to uint and assigning it to every component. + /// int to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2(int v) { return new uint2(v); } + + /// Explicitly converts a int2 vector to a uint2 vector by componentwise conversion. + /// int2 to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2(int2 v) { return new uint2(v); } + + /// Explicitly converts a single float value to a uint2 vector by converting it to uint and assigning it to every component. + /// float to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2(float v) { return new uint2(v); } + + /// Explicitly converts a float2 vector to a uint2 vector by componentwise conversion. + /// float2 to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2(float2 v) { return new uint2(v); } + + /// Explicitly converts a single double value to a uint2 vector by converting it to uint and assigning it to every component. + /// double to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2(double v) { return new uint2(v); } + + /// Explicitly converts a double2 vector to a uint2 vector by componentwise conversion. + /// double2 to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2(double2 v) { return new uint2(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise multiplication. + /// Right hand side uint2 to use to compute componentwise multiplication. + /// uint2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator * (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x * rhs.x, lhs.y * rhs.y); } + + /// Returns the result of a componentwise multiplication operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator * (uint2 lhs, uint rhs) { return new uint2 (lhs.x * rhs, lhs.y * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint2 to use to compute componentwise multiplication. + /// uint2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator * (uint lhs, uint2 rhs) { return new uint2 (lhs * rhs.x, lhs * rhs.y); } + + + /// Returns the result of a componentwise addition operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise addition. + /// Right hand side uint2 to use to compute componentwise addition. + /// uint2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator + (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x + rhs.x, lhs.y + rhs.y); } + + /// Returns the result of a componentwise addition operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator + (uint2 lhs, uint rhs) { return new uint2 (lhs.x + rhs, lhs.y + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint2 to use to compute componentwise addition. + /// uint2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator + (uint lhs, uint2 rhs) { return new uint2 (lhs + rhs.x, lhs + rhs.y); } + + + /// Returns the result of a componentwise subtraction operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise subtraction. + /// Right hand side uint2 to use to compute componentwise subtraction. + /// uint2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator - (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x - rhs.x, lhs.y - rhs.y); } + + /// Returns the result of a componentwise subtraction operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator - (uint2 lhs, uint rhs) { return new uint2 (lhs.x - rhs, lhs.y - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint2 to use to compute componentwise subtraction. + /// uint2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator - (uint lhs, uint2 rhs) { return new uint2 (lhs - rhs.x, lhs - rhs.y); } + + + /// Returns the result of a componentwise division operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise division. + /// Right hand side uint2 to use to compute componentwise division. + /// uint2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator / (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x / rhs.x, lhs.y / rhs.y); } + + /// Returns the result of a componentwise division operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator / (uint2 lhs, uint rhs) { return new uint2 (lhs.x / rhs, lhs.y / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint2 to use to compute componentwise division. + /// uint2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator / (uint lhs, uint2 rhs) { return new uint2 (lhs / rhs.x, lhs / rhs.y); } + + + /// Returns the result of a componentwise modulus operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise modulus. + /// Right hand side uint2 to use to compute componentwise modulus. + /// uint2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator % (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x % rhs.x, lhs.y % rhs.y); } + + /// Returns the result of a componentwise modulus operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator % (uint2 lhs, uint rhs) { return new uint2 (lhs.x % rhs, lhs.y % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint2 to use to compute componentwise modulus. + /// uint2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator % (uint lhs, uint2 rhs) { return new uint2 (lhs % rhs.x, lhs % rhs.y); } + + + /// Returns the result of a componentwise increment operation on a uint2 vector. + /// Value to use when computing the componentwise increment. + /// uint2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator ++ (uint2 val) { return new uint2 (++val.x, ++val.y); } + + + /// Returns the result of a componentwise decrement operation on a uint2 vector. + /// Value to use when computing the componentwise decrement. + /// uint2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator -- (uint2 val) { return new uint2 (--val.x, --val.y); } + + + /// Returns the result of a componentwise less than operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise less than. + /// Right hand side uint2 to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (uint2 lhs, uint2 rhs) { return new bool2 (lhs.x < rhs.x, lhs.y < rhs.y); } + + /// Returns the result of a componentwise less than operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (uint2 lhs, uint rhs) { return new bool2 (lhs.x < rhs, lhs.y < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint2 to use to compute componentwise less than. + /// bool2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator < (uint lhs, uint2 rhs) { return new bool2 (lhs < rhs.x, lhs < rhs.y); } + + + /// Returns the result of a componentwise less or equal operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise less or equal. + /// Right hand side uint2 to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (uint2 lhs, uint2 rhs) { return new bool2 (lhs.x <= rhs.x, lhs.y <= rhs.y); } + + /// Returns the result of a componentwise less or equal operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (uint2 lhs, uint rhs) { return new bool2 (lhs.x <= rhs, lhs.y <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint2 to use to compute componentwise less or equal. + /// bool2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator <= (uint lhs, uint2 rhs) { return new bool2 (lhs <= rhs.x, lhs <= rhs.y); } + + + /// Returns the result of a componentwise greater than operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise greater than. + /// Right hand side uint2 to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (uint2 lhs, uint2 rhs) { return new bool2 (lhs.x > rhs.x, lhs.y > rhs.y); } + + /// Returns the result of a componentwise greater than operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (uint2 lhs, uint rhs) { return new bool2 (lhs.x > rhs, lhs.y > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint2 to use to compute componentwise greater than. + /// bool2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator > (uint lhs, uint2 rhs) { return new bool2 (lhs > rhs.x, lhs > rhs.y); } + + + /// Returns the result of a componentwise greater or equal operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise greater or equal. + /// Right hand side uint2 to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (uint2 lhs, uint2 rhs) { return new bool2 (lhs.x >= rhs.x, lhs.y >= rhs.y); } + + /// Returns the result of a componentwise greater or equal operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (uint2 lhs, uint rhs) { return new bool2 (lhs.x >= rhs, lhs.y >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint2 to use to compute componentwise greater or equal. + /// bool2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator >= (uint lhs, uint2 rhs) { return new bool2 (lhs >= rhs.x, lhs >= rhs.y); } + + + /// Returns the result of a componentwise unary minus operation on a uint2 vector. + /// Value to use when computing the componentwise unary minus. + /// uint2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator - (uint2 val) { return new uint2 ((uint)-val.x, (uint)-val.y); } + + + /// Returns the result of a componentwise unary plus operation on a uint2 vector. + /// Value to use when computing the componentwise unary plus. + /// uint2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator + (uint2 val) { return new uint2 (+val.x, +val.y); } + + + /// Returns the result of a componentwise left shift operation on a uint2 vector by a number of bits specified by a single int. + /// The vector to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator << (uint2 x, int n) { return new uint2 (x.x << n, x.y << n); } + + /// Returns the result of a componentwise right shift operation on a uint2 vector by a number of bits specified by a single int. + /// The vector to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator >> (uint2 x, int n) { return new uint2 (x.x >> n, x.y >> n); } + + /// Returns the result of a componentwise equality operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise equality. + /// Right hand side uint2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (uint2 lhs, uint2 rhs) { return new bool2 (lhs.x == rhs.x, lhs.y == rhs.y); } + + /// Returns the result of a componentwise equality operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (uint2 lhs, uint rhs) { return new bool2 (lhs.x == rhs, lhs.y == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint2 to use to compute componentwise equality. + /// bool2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator == (uint lhs, uint2 rhs) { return new bool2 (lhs == rhs.x, lhs == rhs.y); } + + + /// Returns the result of a componentwise not equal operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise not equal. + /// Right hand side uint2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (uint2 lhs, uint2 rhs) { return new bool2 (lhs.x != rhs.x, lhs.y != rhs.y); } + + /// Returns the result of a componentwise not equal operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (uint2 lhs, uint rhs) { return new bool2 (lhs.x != rhs, lhs.y != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint2 to use to compute componentwise not equal. + /// bool2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2 operator != (uint lhs, uint2 rhs) { return new bool2 (lhs != rhs.x, lhs != rhs.y); } + + + /// Returns the result of a componentwise bitwise not operation on a uint2 vector. + /// Value to use when computing the componentwise bitwise not. + /// uint2 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator ~ (uint2 val) { return new uint2 (~val.x, ~val.y); } + + + /// Returns the result of a componentwise bitwise and operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise bitwise and. + /// Right hand side uint2 to use to compute componentwise bitwise and. + /// uint2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator & (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x & rhs.x, lhs.y & rhs.y); } + + /// Returns the result of a componentwise bitwise and operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator & (uint2 lhs, uint rhs) { return new uint2 (lhs.x & rhs, lhs.y & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint2 to use to compute componentwise bitwise and. + /// uint2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator & (uint lhs, uint2 rhs) { return new uint2 (lhs & rhs.x, lhs & rhs.y); } + + + /// Returns the result of a componentwise bitwise or operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise bitwise or. + /// Right hand side uint2 to use to compute componentwise bitwise or. + /// uint2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator | (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x | rhs.x, lhs.y | rhs.y); } + + /// Returns the result of a componentwise bitwise or operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator | (uint2 lhs, uint rhs) { return new uint2 (lhs.x | rhs, lhs.y | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint2 to use to compute componentwise bitwise or. + /// uint2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator | (uint lhs, uint2 rhs) { return new uint2 (lhs | rhs.x, lhs | rhs.y); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint2 vectors. + /// Left hand side uint2 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint2 to use to compute componentwise bitwise exclusive or. + /// uint2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator ^ (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x ^ rhs.x, lhs.y ^ rhs.y); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint2 vector and a uint value. + /// Left hand side uint2 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator ^ (uint2 lhs, uint rhs) { return new uint2 (lhs.x ^ rhs, lhs.y ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint2 vector. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint2 to use to compute componentwise bitwise exclusive or. + /// uint2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 operator ^ (uint lhs, uint2 rhs) { return new uint2 (lhs ^ rhs.x, lhs ^ rhs.y); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, y); } + } + + + + /// Returns the uint element at a specified index. + unsafe public uint this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (uint2* array = &this) { return ((uint*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (uint* array = &x) { array[index] = value; } + } + } + + /// Returns true if the uint2 is equal to a given uint2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint2 rhs) { return x == rhs.x && y == rhs.y; } + + /// Returns true if the uint2 is equal to a given uint2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint2 converted && Equals(converted); } + + + /// Returns a hash code for the uint2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint2({0}, {1})", x, y); + } + + /// Returns a string representation of the uint2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint2({0}, {1})", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public uint x; + public uint y; + public DebuggerProxy(uint2 v) + { + x = v.x; + y = v.y; + } + } + + } + + public static partial class math + { + /// Returns a uint2 vector constructed from two uint values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// uint2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(uint x, uint y) { return new uint2(x, y); } + + /// Returns a uint2 vector constructed from a uint2 vector. + /// The constructed vector's xy components will be set to this value. + /// uint2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(uint2 xy) { return new uint2(xy); } + + /// Returns a uint2 vector constructed from a single uint value by assigning it to every component. + /// uint to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(uint v) { return new uint2(v); } + + /// Returns a uint2 vector constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(bool v) { return new uint2(v); } + + /// Return a uint2 vector constructed from a bool2 vector by componentwise conversion. + /// bool2 to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(bool2 v) { return new uint2(v); } + + /// Returns a uint2 vector constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(int v) { return new uint2(v); } + + /// Return a uint2 vector constructed from a int2 vector by componentwise conversion. + /// int2 to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(int2 v) { return new uint2(v); } + + /// Returns a uint2 vector constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(float v) { return new uint2(v); } + + /// Return a uint2 vector constructed from a float2 vector by componentwise conversion. + /// float2 to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(float2 v) { return new uint2(v); } + + /// Returns a uint2 vector constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(double v) { return new uint2(v); } + + /// Return a uint2 vector constructed from a double2 vector by componentwise conversion. + /// double2 to convert to uint2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 uint2(double2 v) { return new uint2(v); } + + /// Returns a uint hash code of a uint2 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint2 v) + { + return csum(v * uint2(0x4473BBB1u, 0xCBA11D5Fu)) + 0x685835CFu; + } + + /// + /// Returns a uint2 vector hash code of a uint2 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(uint2 v) + { + return (v * uint2(0xC3D32AE1u, 0xB966942Fu)) + 0xFE9856B3u; + } + + /// Returns the result of specified shuffling of the components from two uint2 vectors into a uint value. + /// uint2 to use as the left argument of the shuffle operation. + /// uint2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint. + /// uint result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint shuffle(uint2 left, uint2 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two uint2 vectors into a uint2 vector. + /// uint2 to use as the left argument of the shuffle operation. + /// uint2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint2 x component. + /// The ShuffleComponent to use when setting the resulting uint2 y component. + /// uint2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 shuffle(uint2 left, uint2 right, ShuffleComponent x, ShuffleComponent y) + { + return uint2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two uint2 vectors into a uint3 vector. + /// uint2 to use as the left argument of the shuffle operation. + /// uint2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint3 x component. + /// The ShuffleComponent to use when setting the resulting uint3 y component. + /// The ShuffleComponent to use when setting the resulting uint3 z component. + /// uint3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 shuffle(uint2 left, uint2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return uint3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two uint2 vectors into a uint4 vector. + /// uint2 to use as the left argument of the shuffle operation. + /// uint2 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint4 x component. + /// The ShuffleComponent to use when setting the resulting uint4 y component. + /// The ShuffleComponent to use when setting the resulting uint4 z component. + /// The ShuffleComponent to use when setting the resulting uint4 w component. + /// uint4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 shuffle(uint2 left, uint2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return uint4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint select_shuffle_component(uint2 a, uint2 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint2x2.gen.cs b/ThirdParty/Unity.Mathematics/uint2x2.gen.cs new file mode 100644 index 0000000..8f2a466 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint2x2.gen.cs @@ -0,0 +1,715 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x2 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint2x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint2 c0; + /// Column 1 of the matrix. + public uint2 c1; + + /// uint2x2 identity transform. + public static readonly uint2x2 identity = new uint2x2(1u, 0u, 0u, 1u); + + /// uint2x2 zero value. + public static readonly uint2x2 zero; + + /// Constructs a uint2x2 matrix from two uint2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(uint2 c0, uint2 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a uint2x2 matrix from 4 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(uint m00, uint m01, + uint m10, uint m11) + { + this.c0 = new uint2(m00, m10); + this.c1 = new uint2(m01, m11); + } + + /// Constructs a uint2x2 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a uint2x2 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(bool v) + { + this.c0 = math.select(new uint2(0u), new uint2(1u), v); + this.c1 = math.select(new uint2(0u), new uint2(1u), v); + } + + /// Constructs a uint2x2 matrix from a bool2x2 matrix by componentwise conversion. + /// bool2x2 to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(bool2x2 v) + { + this.c0 = math.select(new uint2(0u), new uint2(1u), v.c0); + this.c1 = math.select(new uint2(0u), new uint2(1u), v.c1); + } + + /// Constructs a uint2x2 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(int v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + } + + /// Constructs a uint2x2 matrix from a int2x2 matrix by componentwise conversion. + /// int2x2 to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(int2x2 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + } + + /// Constructs a uint2x2 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(float v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + } + + /// Constructs a uint2x2 matrix from a float2x2 matrix by componentwise conversion. + /// float2x2 to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(float2x2 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + } + + /// Constructs a uint2x2 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(double v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + } + + /// Constructs a uint2x2 matrix from a double2x2 matrix by componentwise conversion. + /// double2x2 to convert to uint2x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x2(double2x2 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + } + + + /// Implicitly converts a single uint value to a uint2x2 matrix by assigning it to every component. + /// uint to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint2x2(uint v) { return new uint2x2(v); } + + /// Explicitly converts a single bool value to a uint2x2 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x2(bool v) { return new uint2x2(v); } + + /// Explicitly converts a bool2x2 matrix to a uint2x2 matrix by componentwise conversion. + /// bool2x2 to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x2(bool2x2 v) { return new uint2x2(v); } + + /// Explicitly converts a single int value to a uint2x2 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x2(int v) { return new uint2x2(v); } + + /// Explicitly converts a int2x2 matrix to a uint2x2 matrix by componentwise conversion. + /// int2x2 to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x2(int2x2 v) { return new uint2x2(v); } + + /// Explicitly converts a single float value to a uint2x2 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x2(float v) { return new uint2x2(v); } + + /// Explicitly converts a float2x2 matrix to a uint2x2 matrix by componentwise conversion. + /// float2x2 to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x2(float2x2 v) { return new uint2x2(v); } + + /// Explicitly converts a single double value to a uint2x2 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x2(double v) { return new uint2x2(v); } + + /// Explicitly converts a double2x2 matrix to a uint2x2 matrix by componentwise conversion. + /// double2x2 to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x2(double2x2 v) { return new uint2x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise multiplication. + /// Right hand side uint2x2 to use to compute componentwise multiplication. + /// uint2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator * (uint2x2 lhs, uint2x2 rhs) { return new uint2x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator * (uint2x2 lhs, uint rhs) { return new uint2x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint2x2 to use to compute componentwise multiplication. + /// uint2x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator * (uint lhs, uint2x2 rhs) { return new uint2x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise addition. + /// Right hand side uint2x2 to use to compute componentwise addition. + /// uint2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator + (uint2x2 lhs, uint2x2 rhs) { return new uint2x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator + (uint2x2 lhs, uint rhs) { return new uint2x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint2x2 to use to compute componentwise addition. + /// uint2x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator + (uint lhs, uint2x2 rhs) { return new uint2x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise subtraction. + /// Right hand side uint2x2 to use to compute componentwise subtraction. + /// uint2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator - (uint2x2 lhs, uint2x2 rhs) { return new uint2x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator - (uint2x2 lhs, uint rhs) { return new uint2x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint2x2 to use to compute componentwise subtraction. + /// uint2x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator - (uint lhs, uint2x2 rhs) { return new uint2x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise division. + /// Right hand side uint2x2 to use to compute componentwise division. + /// uint2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator / (uint2x2 lhs, uint2x2 rhs) { return new uint2x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator / (uint2x2 lhs, uint rhs) { return new uint2x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint2x2 to use to compute componentwise division. + /// uint2x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator / (uint lhs, uint2x2 rhs) { return new uint2x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise modulus. + /// Right hand side uint2x2 to use to compute componentwise modulus. + /// uint2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator % (uint2x2 lhs, uint2x2 rhs) { return new uint2x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator % (uint2x2 lhs, uint rhs) { return new uint2x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint2x2 to use to compute componentwise modulus. + /// uint2x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator % (uint lhs, uint2x2 rhs) { return new uint2x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a uint2x2 matrix. + /// Value to use when computing the componentwise increment. + /// uint2x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator ++ (uint2x2 val) { return new uint2x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a uint2x2 matrix. + /// Value to use when computing the componentwise decrement. + /// uint2x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator -- (uint2x2 val) { return new uint2x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise less than. + /// Right hand side uint2x2 to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (uint2x2 lhs, uint2x2 rhs) { return new bool2x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (uint2x2 lhs, uint rhs) { return new bool2x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint2x2 to use to compute componentwise less than. + /// bool2x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator < (uint lhs, uint2x2 rhs) { return new bool2x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise less or equal. + /// Right hand side uint2x2 to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (uint2x2 lhs, uint2x2 rhs) { return new bool2x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (uint2x2 lhs, uint rhs) { return new bool2x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint2x2 to use to compute componentwise less or equal. + /// bool2x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator <= (uint lhs, uint2x2 rhs) { return new bool2x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise greater than. + /// Right hand side uint2x2 to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (uint2x2 lhs, uint2x2 rhs) { return new bool2x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (uint2x2 lhs, uint rhs) { return new bool2x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint2x2 to use to compute componentwise greater than. + /// bool2x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator > (uint lhs, uint2x2 rhs) { return new bool2x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise greater or equal. + /// Right hand side uint2x2 to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (uint2x2 lhs, uint2x2 rhs) { return new bool2x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (uint2x2 lhs, uint rhs) { return new bool2x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint2x2 to use to compute componentwise greater or equal. + /// bool2x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator >= (uint lhs, uint2x2 rhs) { return new bool2x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a uint2x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint2x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator - (uint2x2 val) { return new uint2x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a uint2x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint2x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator + (uint2x2 val) { return new uint2x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise left shift operation on a uint2x2 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator << (uint2x2 x, int n) { return new uint2x2 (x.c0 << n, x.c1 << n); } + + /// Returns the result of a componentwise right shift operation on a uint2x2 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator >> (uint2x2 x, int n) { return new uint2x2 (x.c0 >> n, x.c1 >> n); } + + /// Returns the result of a componentwise equality operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise equality. + /// Right hand side uint2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (uint2x2 lhs, uint2x2 rhs) { return new bool2x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (uint2x2 lhs, uint rhs) { return new bool2x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint2x2 to use to compute componentwise equality. + /// bool2x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator == (uint lhs, uint2x2 rhs) { return new bool2x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise not equal. + /// Right hand side uint2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (uint2x2 lhs, uint2x2 rhs) { return new bool2x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (uint2x2 lhs, uint rhs) { return new bool2x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint2x2 to use to compute componentwise not equal. + /// bool2x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x2 operator != (uint lhs, uint2x2 rhs) { return new bool2x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise bitwise not operation on a uint2x2 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint2x2 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator ~ (uint2x2 val) { return new uint2x2 (~val.c0, ~val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise bitwise and. + /// Right hand side uint2x2 to use to compute componentwise bitwise and. + /// uint2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator & (uint2x2 lhs, uint2x2 rhs) { return new uint2x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator & (uint2x2 lhs, uint rhs) { return new uint2x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint2x2 to use to compute componentwise bitwise and. + /// uint2x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator & (uint lhs, uint2x2 rhs) { return new uint2x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise bitwise or. + /// Right hand side uint2x2 to use to compute componentwise bitwise or. + /// uint2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator | (uint2x2 lhs, uint2x2 rhs) { return new uint2x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator | (uint2x2 lhs, uint rhs) { return new uint2x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint2x2 to use to compute componentwise bitwise or. + /// uint2x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator | (uint lhs, uint2x2 rhs) { return new uint2x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint2x2 matrices. + /// Left hand side uint2x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint2x2 to use to compute componentwise bitwise exclusive or. + /// uint2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator ^ (uint2x2 lhs, uint2x2 rhs) { return new uint2x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint2x2 matrix and a uint value. + /// Left hand side uint2x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator ^ (uint2x2 lhs, uint rhs) { return new uint2x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint2x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint2x2 to use to compute componentwise bitwise exclusive or. + /// uint2x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 operator ^ (uint lhs, uint2x2 rhs) { return new uint2x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the uint2 element at a specified index. + unsafe public ref uint2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (uint2x2* array = &this) { return ref ((uint2*)array)[index]; } + } + } + + /// Returns true if the uint2x2 is equal to a given uint2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint2x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the uint2x2 is equal to a given uint2x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint2x2 converted && Equals(converted); } + + + /// Returns a hash code for the uint2x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint2x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint2x2({0}, {1}, {2}, {3})", c0.x, c1.x, c0.y, c1.y); + } + + /// Returns a string representation of the uint2x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint2x2({0}, {1}, {2}, {3})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint2x2 matrix constructed from two uint2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// uint2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(uint2 c0, uint2 c1) { return new uint2x2(c0, c1); } + + /// Returns a uint2x2 matrix constructed from from 4 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// uint2x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(uint m00, uint m01, + uint m10, uint m11) + { + return new uint2x2(m00, m01, + m10, m11); + } + + /// Returns a uint2x2 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(uint v) { return new uint2x2(v); } + + /// Returns a uint2x2 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(bool v) { return new uint2x2(v); } + + /// Return a uint2x2 matrix constructed from a bool2x2 matrix by componentwise conversion. + /// bool2x2 to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(bool2x2 v) { return new uint2x2(v); } + + /// Returns a uint2x2 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(int v) { return new uint2x2(v); } + + /// Return a uint2x2 matrix constructed from a int2x2 matrix by componentwise conversion. + /// int2x2 to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(int2x2 v) { return new uint2x2(v); } + + /// Returns a uint2x2 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(float v) { return new uint2x2(v); } + + /// Return a uint2x2 matrix constructed from a float2x2 matrix by componentwise conversion. + /// float2x2 to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(float2x2 v) { return new uint2x2(v); } + + /// Returns a uint2x2 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(double v) { return new uint2x2(v); } + + /// Return a uint2x2 matrix constructed from a double2x2 matrix by componentwise conversion. + /// double2x2 to convert to uint2x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 uint2x2(double2x2 v) { return new uint2x2(v); } + + /// Return the uint2x2 transpose of a uint2x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x2 transpose(uint2x2 v) + { + return uint2x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y); + } + + /// Returns a uint hash code of a uint2x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint2x2 v) + { + return csum(v.c0 * uint2(0xB36DE767u, 0x6FCA387Du) + + v.c1 * uint2(0xAF0F3103u, 0xE4A056C7u)) + 0x841D8225u; + } + + /// + /// Returns a uint2 vector hash code of a uint2x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(uint2x2 v) + { + return (v.c0 * uint2(0xC9393C7Du, 0xD42EAFA3u) + + v.c1 * uint2(0xD9AFD06Du, 0x97A65421u)) + 0x7809205Fu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint2x3.gen.cs b/ThirdParty/Unity.Mathematics/uint2x3.gen.cs new file mode 100644 index 0000000..8d57626 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint2x3.gen.cs @@ -0,0 +1,734 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x3 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint2x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint2 c0; + /// Column 1 of the matrix. + public uint2 c1; + /// Column 2 of the matrix. + public uint2 c2; + + /// uint2x3 zero value. + public static readonly uint2x3 zero; + + /// Constructs a uint2x3 matrix from three uint2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(uint2 c0, uint2 c1, uint2 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a uint2x3 matrix from 6 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(uint m00, uint m01, uint m02, + uint m10, uint m11, uint m12) + { + this.c0 = new uint2(m00, m10); + this.c1 = new uint2(m01, m11); + this.c2 = new uint2(m02, m12); + } + + /// Constructs a uint2x3 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a uint2x3 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(bool v) + { + this.c0 = math.select(new uint2(0u), new uint2(1u), v); + this.c1 = math.select(new uint2(0u), new uint2(1u), v); + this.c2 = math.select(new uint2(0u), new uint2(1u), v); + } + + /// Constructs a uint2x3 matrix from a bool2x3 matrix by componentwise conversion. + /// bool2x3 to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(bool2x3 v) + { + this.c0 = math.select(new uint2(0u), new uint2(1u), v.c0); + this.c1 = math.select(new uint2(0u), new uint2(1u), v.c1); + this.c2 = math.select(new uint2(0u), new uint2(1u), v.c2); + } + + /// Constructs a uint2x3 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(int v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + this.c2 = (uint2)v; + } + + /// Constructs a uint2x3 matrix from a int2x3 matrix by componentwise conversion. + /// int2x3 to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(int2x3 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + this.c2 = (uint2)v.c2; + } + + /// Constructs a uint2x3 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(float v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + this.c2 = (uint2)v; + } + + /// Constructs a uint2x3 matrix from a float2x3 matrix by componentwise conversion. + /// float2x3 to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(float2x3 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + this.c2 = (uint2)v.c2; + } + + /// Constructs a uint2x3 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(double v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + this.c2 = (uint2)v; + } + + /// Constructs a uint2x3 matrix from a double2x3 matrix by componentwise conversion. + /// double2x3 to convert to uint2x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x3(double2x3 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + this.c2 = (uint2)v.c2; + } + + + /// Implicitly converts a single uint value to a uint2x3 matrix by assigning it to every component. + /// uint to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint2x3(uint v) { return new uint2x3(v); } + + /// Explicitly converts a single bool value to a uint2x3 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x3(bool v) { return new uint2x3(v); } + + /// Explicitly converts a bool2x3 matrix to a uint2x3 matrix by componentwise conversion. + /// bool2x3 to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x3(bool2x3 v) { return new uint2x3(v); } + + /// Explicitly converts a single int value to a uint2x3 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x3(int v) { return new uint2x3(v); } + + /// Explicitly converts a int2x3 matrix to a uint2x3 matrix by componentwise conversion. + /// int2x3 to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x3(int2x3 v) { return new uint2x3(v); } + + /// Explicitly converts a single float value to a uint2x3 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x3(float v) { return new uint2x3(v); } + + /// Explicitly converts a float2x3 matrix to a uint2x3 matrix by componentwise conversion. + /// float2x3 to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x3(float2x3 v) { return new uint2x3(v); } + + /// Explicitly converts a single double value to a uint2x3 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x3(double v) { return new uint2x3(v); } + + /// Explicitly converts a double2x3 matrix to a uint2x3 matrix by componentwise conversion. + /// double2x3 to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x3(double2x3 v) { return new uint2x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise multiplication. + /// Right hand side uint2x3 to use to compute componentwise multiplication. + /// uint2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator * (uint2x3 lhs, uint2x3 rhs) { return new uint2x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator * (uint2x3 lhs, uint rhs) { return new uint2x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint2x3 to use to compute componentwise multiplication. + /// uint2x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator * (uint lhs, uint2x3 rhs) { return new uint2x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise addition. + /// Right hand side uint2x3 to use to compute componentwise addition. + /// uint2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator + (uint2x3 lhs, uint2x3 rhs) { return new uint2x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator + (uint2x3 lhs, uint rhs) { return new uint2x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint2x3 to use to compute componentwise addition. + /// uint2x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator + (uint lhs, uint2x3 rhs) { return new uint2x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise subtraction. + /// Right hand side uint2x3 to use to compute componentwise subtraction. + /// uint2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator - (uint2x3 lhs, uint2x3 rhs) { return new uint2x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator - (uint2x3 lhs, uint rhs) { return new uint2x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint2x3 to use to compute componentwise subtraction. + /// uint2x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator - (uint lhs, uint2x3 rhs) { return new uint2x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise division. + /// Right hand side uint2x3 to use to compute componentwise division. + /// uint2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator / (uint2x3 lhs, uint2x3 rhs) { return new uint2x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator / (uint2x3 lhs, uint rhs) { return new uint2x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint2x3 to use to compute componentwise division. + /// uint2x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator / (uint lhs, uint2x3 rhs) { return new uint2x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise modulus. + /// Right hand side uint2x3 to use to compute componentwise modulus. + /// uint2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator % (uint2x3 lhs, uint2x3 rhs) { return new uint2x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator % (uint2x3 lhs, uint rhs) { return new uint2x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint2x3 to use to compute componentwise modulus. + /// uint2x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator % (uint lhs, uint2x3 rhs) { return new uint2x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a uint2x3 matrix. + /// Value to use when computing the componentwise increment. + /// uint2x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator ++ (uint2x3 val) { return new uint2x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a uint2x3 matrix. + /// Value to use when computing the componentwise decrement. + /// uint2x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator -- (uint2x3 val) { return new uint2x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise less than. + /// Right hand side uint2x3 to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (uint2x3 lhs, uint2x3 rhs) { return new bool2x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (uint2x3 lhs, uint rhs) { return new bool2x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint2x3 to use to compute componentwise less than. + /// bool2x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator < (uint lhs, uint2x3 rhs) { return new bool2x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise less or equal. + /// Right hand side uint2x3 to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (uint2x3 lhs, uint2x3 rhs) { return new bool2x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (uint2x3 lhs, uint rhs) { return new bool2x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint2x3 to use to compute componentwise less or equal. + /// bool2x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator <= (uint lhs, uint2x3 rhs) { return new bool2x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise greater than. + /// Right hand side uint2x3 to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (uint2x3 lhs, uint2x3 rhs) { return new bool2x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (uint2x3 lhs, uint rhs) { return new bool2x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint2x3 to use to compute componentwise greater than. + /// bool2x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator > (uint lhs, uint2x3 rhs) { return new bool2x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise greater or equal. + /// Right hand side uint2x3 to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (uint2x3 lhs, uint2x3 rhs) { return new bool2x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (uint2x3 lhs, uint rhs) { return new bool2x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint2x3 to use to compute componentwise greater or equal. + /// bool2x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator >= (uint lhs, uint2x3 rhs) { return new bool2x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a uint2x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint2x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator - (uint2x3 val) { return new uint2x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a uint2x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint2x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator + (uint2x3 val) { return new uint2x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise left shift operation on a uint2x3 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator << (uint2x3 x, int n) { return new uint2x3 (x.c0 << n, x.c1 << n, x.c2 << n); } + + /// Returns the result of a componentwise right shift operation on a uint2x3 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator >> (uint2x3 x, int n) { return new uint2x3 (x.c0 >> n, x.c1 >> n, x.c2 >> n); } + + /// Returns the result of a componentwise equality operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise equality. + /// Right hand side uint2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (uint2x3 lhs, uint2x3 rhs) { return new bool2x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (uint2x3 lhs, uint rhs) { return new bool2x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint2x3 to use to compute componentwise equality. + /// bool2x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator == (uint lhs, uint2x3 rhs) { return new bool2x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise not equal. + /// Right hand side uint2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (uint2x3 lhs, uint2x3 rhs) { return new bool2x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (uint2x3 lhs, uint rhs) { return new bool2x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint2x3 to use to compute componentwise not equal. + /// bool2x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x3 operator != (uint lhs, uint2x3 rhs) { return new bool2x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise bitwise not operation on a uint2x3 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint2x3 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator ~ (uint2x3 val) { return new uint2x3 (~val.c0, ~val.c1, ~val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise bitwise and. + /// Right hand side uint2x3 to use to compute componentwise bitwise and. + /// uint2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator & (uint2x3 lhs, uint2x3 rhs) { return new uint2x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator & (uint2x3 lhs, uint rhs) { return new uint2x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint2x3 to use to compute componentwise bitwise and. + /// uint2x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator & (uint lhs, uint2x3 rhs) { return new uint2x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise bitwise or. + /// Right hand side uint2x3 to use to compute componentwise bitwise or. + /// uint2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator | (uint2x3 lhs, uint2x3 rhs) { return new uint2x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator | (uint2x3 lhs, uint rhs) { return new uint2x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint2x3 to use to compute componentwise bitwise or. + /// uint2x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator | (uint lhs, uint2x3 rhs) { return new uint2x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint2x3 matrices. + /// Left hand side uint2x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint2x3 to use to compute componentwise bitwise exclusive or. + /// uint2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator ^ (uint2x3 lhs, uint2x3 rhs) { return new uint2x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint2x3 matrix and a uint value. + /// Left hand side uint2x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator ^ (uint2x3 lhs, uint rhs) { return new uint2x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint2x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint2x3 to use to compute componentwise bitwise exclusive or. + /// uint2x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 operator ^ (uint lhs, uint2x3 rhs) { return new uint2x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the uint2 element at a specified index. + unsafe public ref uint2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (uint2x3* array = &this) { return ref ((uint2*)array)[index]; } + } + } + + /// Returns true if the uint2x3 is equal to a given uint2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint2x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the uint2x3 is equal to a given uint2x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint2x3 converted && Equals(converted); } + + + /// Returns a hash code for the uint2x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint2x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y); + } + + /// Returns a string representation of the uint2x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint2x3({0}, {1}, {2}, {3}, {4}, {5})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint2x3 matrix constructed from three uint2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// uint2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(uint2 c0, uint2 c1, uint2 c2) { return new uint2x3(c0, c1, c2); } + + /// Returns a uint2x3 matrix constructed from from 6 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// uint2x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(uint m00, uint m01, uint m02, + uint m10, uint m11, uint m12) + { + return new uint2x3(m00, m01, m02, + m10, m11, m12); + } + + /// Returns a uint2x3 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(uint v) { return new uint2x3(v); } + + /// Returns a uint2x3 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(bool v) { return new uint2x3(v); } + + /// Return a uint2x3 matrix constructed from a bool2x3 matrix by componentwise conversion. + /// bool2x3 to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(bool2x3 v) { return new uint2x3(v); } + + /// Returns a uint2x3 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(int v) { return new uint2x3(v); } + + /// Return a uint2x3 matrix constructed from a int2x3 matrix by componentwise conversion. + /// int2x3 to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(int2x3 v) { return new uint2x3(v); } + + /// Returns a uint2x3 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(float v) { return new uint2x3(v); } + + /// Return a uint2x3 matrix constructed from a float2x3 matrix by componentwise conversion. + /// float2x3 to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(float2x3 v) { return new uint2x3(v); } + + /// Returns a uint2x3 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(double v) { return new uint2x3(v); } + + /// Return a uint2x3 matrix constructed from a double2x3 matrix by componentwise conversion. + /// double2x3 to convert to uint2x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 uint2x3(double2x3 v) { return new uint2x3(v); } + + /// Return the uint3x2 transpose of a uint2x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 transpose(uint2x3 v) + { + return uint3x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y); + } + + /// Returns a uint hash code of a uint2x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint2x3 v) + { + return csum(v.c0 * uint2(0xEF63C699u, 0x9001903Fu) + + v.c1 * uint2(0xA895B9CDu, 0x9D23B201u) + + v.c2 * uint2(0x4B01D3E1u, 0x7461CA0Du)) + 0x79725379u; + } + + /// + /// Returns a uint2 vector hash code of a uint2x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(uint2x3 v) + { + return (v.c0 * uint2(0xD6258E5Bu, 0xEE390C97u) + + v.c1 * uint2(0x9C8A2F05u, 0x4DDC6509u) + + v.c2 * uint2(0x7CF083CBu, 0x5C4D6CEDu)) + 0xF9137117u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint2x4.gen.cs b/ThirdParty/Unity.Mathematics/uint2x4.gen.cs new file mode 100644 index 0000000..362e69a --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint2x4.gen.cs @@ -0,0 +1,756 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 2x4 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint2x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint2 c0; + /// Column 1 of the matrix. + public uint2 c1; + /// Column 2 of the matrix. + public uint2 c2; + /// Column 3 of the matrix. + public uint2 c3; + + /// uint2x4 zero value. + public static readonly uint2x4 zero; + + /// Constructs a uint2x4 matrix from four uint2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(uint2 c0, uint2 c1, uint2 c2, uint2 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a uint2x4 matrix from 8 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(uint m00, uint m01, uint m02, uint m03, + uint m10, uint m11, uint m12, uint m13) + { + this.c0 = new uint2(m00, m10); + this.c1 = new uint2(m01, m11); + this.c2 = new uint2(m02, m12); + this.c3 = new uint2(m03, m13); + } + + /// Constructs a uint2x4 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a uint2x4 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(bool v) + { + this.c0 = math.select(new uint2(0u), new uint2(1u), v); + this.c1 = math.select(new uint2(0u), new uint2(1u), v); + this.c2 = math.select(new uint2(0u), new uint2(1u), v); + this.c3 = math.select(new uint2(0u), new uint2(1u), v); + } + + /// Constructs a uint2x4 matrix from a bool2x4 matrix by componentwise conversion. + /// bool2x4 to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(bool2x4 v) + { + this.c0 = math.select(new uint2(0u), new uint2(1u), v.c0); + this.c1 = math.select(new uint2(0u), new uint2(1u), v.c1); + this.c2 = math.select(new uint2(0u), new uint2(1u), v.c2); + this.c3 = math.select(new uint2(0u), new uint2(1u), v.c3); + } + + /// Constructs a uint2x4 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(int v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + this.c2 = (uint2)v; + this.c3 = (uint2)v; + } + + /// Constructs a uint2x4 matrix from a int2x4 matrix by componentwise conversion. + /// int2x4 to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(int2x4 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + this.c2 = (uint2)v.c2; + this.c3 = (uint2)v.c3; + } + + /// Constructs a uint2x4 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(float v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + this.c2 = (uint2)v; + this.c3 = (uint2)v; + } + + /// Constructs a uint2x4 matrix from a float2x4 matrix by componentwise conversion. + /// float2x4 to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(float2x4 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + this.c2 = (uint2)v.c2; + this.c3 = (uint2)v.c3; + } + + /// Constructs a uint2x4 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(double v) + { + this.c0 = (uint2)v; + this.c1 = (uint2)v; + this.c2 = (uint2)v; + this.c3 = (uint2)v; + } + + /// Constructs a uint2x4 matrix from a double2x4 matrix by componentwise conversion. + /// double2x4 to convert to uint2x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint2x4(double2x4 v) + { + this.c0 = (uint2)v.c0; + this.c1 = (uint2)v.c1; + this.c2 = (uint2)v.c2; + this.c3 = (uint2)v.c3; + } + + + /// Implicitly converts a single uint value to a uint2x4 matrix by assigning it to every component. + /// uint to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint2x4(uint v) { return new uint2x4(v); } + + /// Explicitly converts a single bool value to a uint2x4 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x4(bool v) { return new uint2x4(v); } + + /// Explicitly converts a bool2x4 matrix to a uint2x4 matrix by componentwise conversion. + /// bool2x4 to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x4(bool2x4 v) { return new uint2x4(v); } + + /// Explicitly converts a single int value to a uint2x4 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x4(int v) { return new uint2x4(v); } + + /// Explicitly converts a int2x4 matrix to a uint2x4 matrix by componentwise conversion. + /// int2x4 to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x4(int2x4 v) { return new uint2x4(v); } + + /// Explicitly converts a single float value to a uint2x4 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x4(float v) { return new uint2x4(v); } + + /// Explicitly converts a float2x4 matrix to a uint2x4 matrix by componentwise conversion. + /// float2x4 to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x4(float2x4 v) { return new uint2x4(v); } + + /// Explicitly converts a single double value to a uint2x4 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x4(double v) { return new uint2x4(v); } + + /// Explicitly converts a double2x4 matrix to a uint2x4 matrix by componentwise conversion. + /// double2x4 to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint2x4(double2x4 v) { return new uint2x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise multiplication. + /// Right hand side uint2x4 to use to compute componentwise multiplication. + /// uint2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator * (uint2x4 lhs, uint2x4 rhs) { return new uint2x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator * (uint2x4 lhs, uint rhs) { return new uint2x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint2x4 to use to compute componentwise multiplication. + /// uint2x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator * (uint lhs, uint2x4 rhs) { return new uint2x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise addition. + /// Right hand side uint2x4 to use to compute componentwise addition. + /// uint2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator + (uint2x4 lhs, uint2x4 rhs) { return new uint2x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator + (uint2x4 lhs, uint rhs) { return new uint2x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint2x4 to use to compute componentwise addition. + /// uint2x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator + (uint lhs, uint2x4 rhs) { return new uint2x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise subtraction. + /// Right hand side uint2x4 to use to compute componentwise subtraction. + /// uint2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator - (uint2x4 lhs, uint2x4 rhs) { return new uint2x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator - (uint2x4 lhs, uint rhs) { return new uint2x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint2x4 to use to compute componentwise subtraction. + /// uint2x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator - (uint lhs, uint2x4 rhs) { return new uint2x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise division. + /// Right hand side uint2x4 to use to compute componentwise division. + /// uint2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator / (uint2x4 lhs, uint2x4 rhs) { return new uint2x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator / (uint2x4 lhs, uint rhs) { return new uint2x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint2x4 to use to compute componentwise division. + /// uint2x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator / (uint lhs, uint2x4 rhs) { return new uint2x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise modulus. + /// Right hand side uint2x4 to use to compute componentwise modulus. + /// uint2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator % (uint2x4 lhs, uint2x4 rhs) { return new uint2x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator % (uint2x4 lhs, uint rhs) { return new uint2x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint2x4 to use to compute componentwise modulus. + /// uint2x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator % (uint lhs, uint2x4 rhs) { return new uint2x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a uint2x4 matrix. + /// Value to use when computing the componentwise increment. + /// uint2x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator ++ (uint2x4 val) { return new uint2x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a uint2x4 matrix. + /// Value to use when computing the componentwise decrement. + /// uint2x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator -- (uint2x4 val) { return new uint2x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise less than. + /// Right hand side uint2x4 to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (uint2x4 lhs, uint2x4 rhs) { return new bool2x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (uint2x4 lhs, uint rhs) { return new bool2x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint2x4 to use to compute componentwise less than. + /// bool2x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator < (uint lhs, uint2x4 rhs) { return new bool2x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise less or equal. + /// Right hand side uint2x4 to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (uint2x4 lhs, uint2x4 rhs) { return new bool2x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (uint2x4 lhs, uint rhs) { return new bool2x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint2x4 to use to compute componentwise less or equal. + /// bool2x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator <= (uint lhs, uint2x4 rhs) { return new bool2x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise greater than. + /// Right hand side uint2x4 to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (uint2x4 lhs, uint2x4 rhs) { return new bool2x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (uint2x4 lhs, uint rhs) { return new bool2x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint2x4 to use to compute componentwise greater than. + /// bool2x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator > (uint lhs, uint2x4 rhs) { return new bool2x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise greater or equal. + /// Right hand side uint2x4 to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (uint2x4 lhs, uint2x4 rhs) { return new bool2x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (uint2x4 lhs, uint rhs) { return new bool2x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint2x4 to use to compute componentwise greater or equal. + /// bool2x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator >= (uint lhs, uint2x4 rhs) { return new bool2x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a uint2x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint2x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator - (uint2x4 val) { return new uint2x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a uint2x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint2x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator + (uint2x4 val) { return new uint2x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise left shift operation on a uint2x4 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator << (uint2x4 x, int n) { return new uint2x4 (x.c0 << n, x.c1 << n, x.c2 << n, x.c3 << n); } + + /// Returns the result of a componentwise right shift operation on a uint2x4 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator >> (uint2x4 x, int n) { return new uint2x4 (x.c0 >> n, x.c1 >> n, x.c2 >> n, x.c3 >> n); } + + /// Returns the result of a componentwise equality operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise equality. + /// Right hand side uint2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (uint2x4 lhs, uint2x4 rhs) { return new bool2x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (uint2x4 lhs, uint rhs) { return new bool2x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint2x4 to use to compute componentwise equality. + /// bool2x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator == (uint lhs, uint2x4 rhs) { return new bool2x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise not equal. + /// Right hand side uint2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (uint2x4 lhs, uint2x4 rhs) { return new bool2x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (uint2x4 lhs, uint rhs) { return new bool2x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint2x4 to use to compute componentwise not equal. + /// bool2x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool2x4 operator != (uint lhs, uint2x4 rhs) { return new bool2x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise bitwise not operation on a uint2x4 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint2x4 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator ~ (uint2x4 val) { return new uint2x4 (~val.c0, ~val.c1, ~val.c2, ~val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise bitwise and. + /// Right hand side uint2x4 to use to compute componentwise bitwise and. + /// uint2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator & (uint2x4 lhs, uint2x4 rhs) { return new uint2x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator & (uint2x4 lhs, uint rhs) { return new uint2x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint2x4 to use to compute componentwise bitwise and. + /// uint2x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator & (uint lhs, uint2x4 rhs) { return new uint2x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise bitwise or. + /// Right hand side uint2x4 to use to compute componentwise bitwise or. + /// uint2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator | (uint2x4 lhs, uint2x4 rhs) { return new uint2x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator | (uint2x4 lhs, uint rhs) { return new uint2x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint2x4 to use to compute componentwise bitwise or. + /// uint2x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator | (uint lhs, uint2x4 rhs) { return new uint2x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint2x4 matrices. + /// Left hand side uint2x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint2x4 to use to compute componentwise bitwise exclusive or. + /// uint2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator ^ (uint2x4 lhs, uint2x4 rhs) { return new uint2x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint2x4 matrix and a uint value. + /// Left hand side uint2x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator ^ (uint2x4 lhs, uint rhs) { return new uint2x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint2x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint2x4 to use to compute componentwise bitwise exclusive or. + /// uint2x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 operator ^ (uint lhs, uint2x4 rhs) { return new uint2x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the uint2 element at a specified index. + unsafe public ref uint2 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (uint2x4* array = &this) { return ref ((uint2*)array)[index]; } + } + } + + /// Returns true if the uint2x4 is equal to a given uint2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint2x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the uint2x4 is equal to a given uint2x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint2x4 converted && Equals(converted); } + + + /// Returns a hash code for the uint2x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint2x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint2x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y); + } + + /// Returns a string representation of the uint2x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint2x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint2x4 matrix constructed from four uint2 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// uint2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(uint2 c0, uint2 c1, uint2 c2, uint2 c3) { return new uint2x4(c0, c1, c2, c3); } + + /// Returns a uint2x4 matrix constructed from from 8 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// uint2x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(uint m00, uint m01, uint m02, uint m03, + uint m10, uint m11, uint m12, uint m13) + { + return new uint2x4(m00, m01, m02, m03, + m10, m11, m12, m13); + } + + /// Returns a uint2x4 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(uint v) { return new uint2x4(v); } + + /// Returns a uint2x4 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(bool v) { return new uint2x4(v); } + + /// Return a uint2x4 matrix constructed from a bool2x4 matrix by componentwise conversion. + /// bool2x4 to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(bool2x4 v) { return new uint2x4(v); } + + /// Returns a uint2x4 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(int v) { return new uint2x4(v); } + + /// Return a uint2x4 matrix constructed from a int2x4 matrix by componentwise conversion. + /// int2x4 to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(int2x4 v) { return new uint2x4(v); } + + /// Returns a uint2x4 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(float v) { return new uint2x4(v); } + + /// Return a uint2x4 matrix constructed from a float2x4 matrix by componentwise conversion. + /// float2x4 to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(float2x4 v) { return new uint2x4(v); } + + /// Returns a uint2x4 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(double v) { return new uint2x4(v); } + + /// Return a uint2x4 matrix constructed from a double2x4 matrix by componentwise conversion. + /// double2x4 to convert to uint2x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 uint2x4(double2x4 v) { return new uint2x4(v); } + + /// Return the uint4x2 transpose of a uint2x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 transpose(uint2x4 v) + { + return uint4x2( + v.c0.x, v.c0.y, + v.c1.x, v.c1.y, + v.c2.x, v.c2.y, + v.c3.x, v.c3.y); + } + + /// Returns a uint hash code of a uint2x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint2x4 v) + { + return csum(v.c0 * uint2(0x9DF50593u, 0xF18EEB85u) + + v.c1 * uint2(0x9E19BFC3u, 0x8196B06Fu) + + v.c2 * uint2(0xD24EFA19u, 0x7D8048BBu) + + v.c3 * uint2(0x713BD06Fu, 0x753AD6ADu)) + 0xD19764C7u; + } + + /// + /// Returns a uint2 vector hash code of a uint2x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint2 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 hashwide(uint2x4 v) + { + return (v.c0 * uint2(0xB5D0BF63u, 0xF9102C5Fu) + + v.c1 * uint2(0x9881FB9Fu, 0x56A1530Du) + + v.c2 * uint2(0x804B722Du, 0x738E50E5u) + + v.c3 * uint2(0x4FC93C25u, 0xCD0445A5u)) + 0xD2B90D9Bu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint3.gen.cs b/ThirdParty/Unity.Mathematics/uint3.gen.cs new file mode 100644 index 0000000..95df67b --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint3.gen.cs @@ -0,0 +1,1921 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3 component vector of uints. + [DebuggerTypeProxy(typeof(uint3.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint3 : System.IEquatable, IFormattable + { + /// x component of the vector. + public uint x; + /// y component of the vector. + public uint y; + /// z component of the vector. + public uint z; + + /// uint3 zero value. + public static readonly uint3 zero; + + /// Constructs a uint3 vector from three uint values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(uint x, uint y, uint z) + { + this.x = x; + this.y = y; + this.z = z; + } + + /// Constructs a uint3 vector from a uint value and a uint2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(uint x, uint2 yz) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + } + + /// Constructs a uint3 vector from a uint2 vector and a uint value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(uint2 xy, uint z) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + } + + /// Constructs a uint3 vector from a uint3 vector. + /// The constructed vector's xyz components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(uint3 xyz) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + } + + /// Constructs a uint3 vector from a single uint value by assigning it to every component. + /// uint to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(uint v) + { + this.x = v; + this.y = v; + this.z = v; + } + + /// Constructs a uint3 vector from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(bool v) + { + this.x = v ? 1u : 0u; + this.y = v ? 1u : 0u; + this.z = v ? 1u : 0u; + } + + /// Constructs a uint3 vector from a bool3 vector by componentwise conversion. + /// bool3 to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(bool3 v) + { + this.x = v.x ? 1u : 0u; + this.y = v.y ? 1u : 0u; + this.z = v.z ? 1u : 0u; + } + + /// Constructs a uint3 vector from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(int v) + { + this.x = (uint)v; + this.y = (uint)v; + this.z = (uint)v; + } + + /// Constructs a uint3 vector from a int3 vector by componentwise conversion. + /// int3 to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(int3 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + this.z = (uint)v.z; + } + + /// Constructs a uint3 vector from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(float v) + { + this.x = (uint)v; + this.y = (uint)v; + this.z = (uint)v; + } + + /// Constructs a uint3 vector from a float3 vector by componentwise conversion. + /// float3 to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(float3 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + this.z = (uint)v.z; + } + + /// Constructs a uint3 vector from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(double v) + { + this.x = (uint)v; + this.y = (uint)v; + this.z = (uint)v; + } + + /// Constructs a uint3 vector from a double3 vector by componentwise conversion. + /// double3 to convert to uint3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3(double3 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + this.z = (uint)v.z; + } + + + /// Implicitly converts a single uint value to a uint3 vector by assigning it to every component. + /// uint to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint3(uint v) { return new uint3(v); } + + /// Explicitly converts a single bool value to a uint3 vector by converting it to uint and assigning it to every component. + /// bool to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3(bool v) { return new uint3(v); } + + /// Explicitly converts a bool3 vector to a uint3 vector by componentwise conversion. + /// bool3 to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3(bool3 v) { return new uint3(v); } + + /// Explicitly converts a single int value to a uint3 vector by converting it to uint and assigning it to every component. + /// int to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3(int v) { return new uint3(v); } + + /// Explicitly converts a int3 vector to a uint3 vector by componentwise conversion. + /// int3 to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3(int3 v) { return new uint3(v); } + + /// Explicitly converts a single float value to a uint3 vector by converting it to uint and assigning it to every component. + /// float to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3(float v) { return new uint3(v); } + + /// Explicitly converts a float3 vector to a uint3 vector by componentwise conversion. + /// float3 to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3(float3 v) { return new uint3(v); } + + /// Explicitly converts a single double value to a uint3 vector by converting it to uint and assigning it to every component. + /// double to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3(double v) { return new uint3(v); } + + /// Explicitly converts a double3 vector to a uint3 vector by componentwise conversion. + /// double3 to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3(double3 v) { return new uint3(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise multiplication. + /// Right hand side uint3 to use to compute componentwise multiplication. + /// uint3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator * (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } + + /// Returns the result of a componentwise multiplication operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator * (uint3 lhs, uint rhs) { return new uint3 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint3 to use to compute componentwise multiplication. + /// uint3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator * (uint lhs, uint3 rhs) { return new uint3 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); } + + + /// Returns the result of a componentwise addition operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise addition. + /// Right hand side uint3 to use to compute componentwise addition. + /// uint3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator + (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); } + + /// Returns the result of a componentwise addition operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator + (uint3 lhs, uint rhs) { return new uint3 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint3 to use to compute componentwise addition. + /// uint3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator + (uint lhs, uint3 rhs) { return new uint3 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z); } + + + /// Returns the result of a componentwise subtraction operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise subtraction. + /// Right hand side uint3 to use to compute componentwise subtraction. + /// uint3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator - (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); } + + /// Returns the result of a componentwise subtraction operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator - (uint3 lhs, uint rhs) { return new uint3 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint3 to use to compute componentwise subtraction. + /// uint3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator - (uint lhs, uint3 rhs) { return new uint3 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z); } + + + /// Returns the result of a componentwise division operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise division. + /// Right hand side uint3 to use to compute componentwise division. + /// uint3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator / (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z); } + + /// Returns the result of a componentwise division operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator / (uint3 lhs, uint rhs) { return new uint3 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint3 to use to compute componentwise division. + /// uint3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator / (uint lhs, uint3 rhs) { return new uint3 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z); } + + + /// Returns the result of a componentwise modulus operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise modulus. + /// Right hand side uint3 to use to compute componentwise modulus. + /// uint3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator % (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z); } + + /// Returns the result of a componentwise modulus operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator % (uint3 lhs, uint rhs) { return new uint3 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint3 to use to compute componentwise modulus. + /// uint3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator % (uint lhs, uint3 rhs) { return new uint3 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z); } + + + /// Returns the result of a componentwise increment operation on a uint3 vector. + /// Value to use when computing the componentwise increment. + /// uint3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator ++ (uint3 val) { return new uint3 (++val.x, ++val.y, ++val.z); } + + + /// Returns the result of a componentwise decrement operation on a uint3 vector. + /// Value to use when computing the componentwise decrement. + /// uint3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator -- (uint3 val) { return new uint3 (--val.x, --val.y, --val.z); } + + + /// Returns the result of a componentwise less than operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise less than. + /// Right hand side uint3 to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (uint3 lhs, uint3 rhs) { return new bool3 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z); } + + /// Returns the result of a componentwise less than operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (uint3 lhs, uint rhs) { return new bool3 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint3 to use to compute componentwise less than. + /// bool3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator < (uint lhs, uint3 rhs) { return new bool3 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z); } + + + /// Returns the result of a componentwise less or equal operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise less or equal. + /// Right hand side uint3 to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (uint3 lhs, uint3 rhs) { return new bool3 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z); } + + /// Returns the result of a componentwise less or equal operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (uint3 lhs, uint rhs) { return new bool3 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint3 to use to compute componentwise less or equal. + /// bool3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator <= (uint lhs, uint3 rhs) { return new bool3 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z); } + + + /// Returns the result of a componentwise greater than operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise greater than. + /// Right hand side uint3 to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (uint3 lhs, uint3 rhs) { return new bool3 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z); } + + /// Returns the result of a componentwise greater than operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (uint3 lhs, uint rhs) { return new bool3 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint3 to use to compute componentwise greater than. + /// bool3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator > (uint lhs, uint3 rhs) { return new bool3 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z); } + + + /// Returns the result of a componentwise greater or equal operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise greater or equal. + /// Right hand side uint3 to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (uint3 lhs, uint3 rhs) { return new bool3 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z); } + + /// Returns the result of a componentwise greater or equal operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (uint3 lhs, uint rhs) { return new bool3 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint3 to use to compute componentwise greater or equal. + /// bool3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator >= (uint lhs, uint3 rhs) { return new bool3 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z); } + + + /// Returns the result of a componentwise unary minus operation on a uint3 vector. + /// Value to use when computing the componentwise unary minus. + /// uint3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator - (uint3 val) { return new uint3 ((uint)-val.x, (uint)-val.y, (uint)-val.z); } + + + /// Returns the result of a componentwise unary plus operation on a uint3 vector. + /// Value to use when computing the componentwise unary plus. + /// uint3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator + (uint3 val) { return new uint3 (+val.x, +val.y, +val.z); } + + + /// Returns the result of a componentwise left shift operation on a uint3 vector by a number of bits specified by a single int. + /// The vector to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator << (uint3 x, int n) { return new uint3 (x.x << n, x.y << n, x.z << n); } + + /// Returns the result of a componentwise right shift operation on a uint3 vector by a number of bits specified by a single int. + /// The vector to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator >> (uint3 x, int n) { return new uint3 (x.x >> n, x.y >> n, x.z >> n); } + + /// Returns the result of a componentwise equality operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise equality. + /// Right hand side uint3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (uint3 lhs, uint3 rhs) { return new bool3 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z); } + + /// Returns the result of a componentwise equality operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (uint3 lhs, uint rhs) { return new bool3 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint3 to use to compute componentwise equality. + /// bool3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator == (uint lhs, uint3 rhs) { return new bool3 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z); } + + + /// Returns the result of a componentwise not equal operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise not equal. + /// Right hand side uint3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (uint3 lhs, uint3 rhs) { return new bool3 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z); } + + /// Returns the result of a componentwise not equal operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (uint3 lhs, uint rhs) { return new bool3 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint3 to use to compute componentwise not equal. + /// bool3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3 operator != (uint lhs, uint3 rhs) { return new bool3 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z); } + + + /// Returns the result of a componentwise bitwise not operation on a uint3 vector. + /// Value to use when computing the componentwise bitwise not. + /// uint3 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator ~ (uint3 val) { return new uint3 (~val.x, ~val.y, ~val.z); } + + + /// Returns the result of a componentwise bitwise and operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise bitwise and. + /// Right hand side uint3 to use to compute componentwise bitwise and. + /// uint3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator & (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x & rhs.x, lhs.y & rhs.y, lhs.z & rhs.z); } + + /// Returns the result of a componentwise bitwise and operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator & (uint3 lhs, uint rhs) { return new uint3 (lhs.x & rhs, lhs.y & rhs, lhs.z & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint3 to use to compute componentwise bitwise and. + /// uint3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator & (uint lhs, uint3 rhs) { return new uint3 (lhs & rhs.x, lhs & rhs.y, lhs & rhs.z); } + + + /// Returns the result of a componentwise bitwise or operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise bitwise or. + /// Right hand side uint3 to use to compute componentwise bitwise or. + /// uint3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator | (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x | rhs.x, lhs.y | rhs.y, lhs.z | rhs.z); } + + /// Returns the result of a componentwise bitwise or operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator | (uint3 lhs, uint rhs) { return new uint3 (lhs.x | rhs, lhs.y | rhs, lhs.z | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint3 to use to compute componentwise bitwise or. + /// uint3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator | (uint lhs, uint3 rhs) { return new uint3 (lhs | rhs.x, lhs | rhs.y, lhs | rhs.z); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint3 vectors. + /// Left hand side uint3 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint3 to use to compute componentwise bitwise exclusive or. + /// uint3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator ^ (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x ^ rhs.x, lhs.y ^ rhs.y, lhs.z ^ rhs.z); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint3 vector and a uint value. + /// Left hand side uint3 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator ^ (uint3 lhs, uint rhs) { return new uint3 (lhs.x ^ rhs, lhs.y ^ rhs, lhs.z ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint3 vector. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint3 to use to compute componentwise bitwise exclusive or. + /// uint3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 operator ^ (uint lhs, uint3 rhs) { return new uint3 (lhs ^ rhs.x, lhs ^ rhs.y, lhs ^ rhs.z); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(z, z); } + } + + + + /// Returns the uint element at a specified index. + unsafe public uint this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (uint3* array = &this) { return ((uint*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (uint* array = &x) { array[index] = value; } + } + } + + /// Returns true if the uint3 is equal to a given uint3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } + + /// Returns true if the uint3 is equal to a given uint3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint3 converted && Equals(converted); } + + + /// Returns a hash code for the uint3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint3({0}, {1}, {2})", x, y, z); + } + + /// Returns a string representation of the uint3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint3({0}, {1}, {2})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public uint x; + public uint y; + public uint z; + public DebuggerProxy(uint3 v) + { + x = v.x; + y = v.y; + z = v.z; + } + } + + } + + public static partial class math + { + /// Returns a uint3 vector constructed from three uint values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// uint3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(uint x, uint y, uint z) { return new uint3(x, y, z); } + + /// Returns a uint3 vector constructed from a uint value and a uint2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// uint3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(uint x, uint2 yz) { return new uint3(x, yz); } + + /// Returns a uint3 vector constructed from a uint2 vector and a uint value. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// uint3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(uint2 xy, uint z) { return new uint3(xy, z); } + + /// Returns a uint3 vector constructed from a uint3 vector. + /// The constructed vector's xyz components will be set to this value. + /// uint3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(uint3 xyz) { return new uint3(xyz); } + + /// Returns a uint3 vector constructed from a single uint value by assigning it to every component. + /// uint to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(uint v) { return new uint3(v); } + + /// Returns a uint3 vector constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(bool v) { return new uint3(v); } + + /// Return a uint3 vector constructed from a bool3 vector by componentwise conversion. + /// bool3 to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(bool3 v) { return new uint3(v); } + + /// Returns a uint3 vector constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(int v) { return new uint3(v); } + + /// Return a uint3 vector constructed from a int3 vector by componentwise conversion. + /// int3 to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(int3 v) { return new uint3(v); } + + /// Returns a uint3 vector constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(float v) { return new uint3(v); } + + /// Return a uint3 vector constructed from a float3 vector by componentwise conversion. + /// float3 to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(float3 v) { return new uint3(v); } + + /// Returns a uint3 vector constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(double v) { return new uint3(v); } + + /// Return a uint3 vector constructed from a double3 vector by componentwise conversion. + /// double3 to convert to uint3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 uint3(double3 v) { return new uint3(v); } + + /// Returns a uint hash code of a uint3 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint3 v) + { + return csum(v * uint3(0xCD266C89u, 0xF1852A33u, 0x77E35E77u)) + 0x863E3729u; + } + + /// + /// Returns a uint3 vector hash code of a uint3 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(uint3 v) + { + return (v * uint3(0xE191B035u, 0x68586FAFu, 0xD4DFF6D3u)) + 0xCB634F4Du; + } + + /// Returns the result of specified shuffling of the components from two uint3 vectors into a uint value. + /// uint3 to use as the left argument of the shuffle operation. + /// uint3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint. + /// uint result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint shuffle(uint3 left, uint3 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two uint3 vectors into a uint2 vector. + /// uint3 to use as the left argument of the shuffle operation. + /// uint3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint2 x component. + /// The ShuffleComponent to use when setting the resulting uint2 y component. + /// uint2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 shuffle(uint3 left, uint3 right, ShuffleComponent x, ShuffleComponent y) + { + return uint2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two uint3 vectors into a uint3 vector. + /// uint3 to use as the left argument of the shuffle operation. + /// uint3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint3 x component. + /// The ShuffleComponent to use when setting the resulting uint3 y component. + /// The ShuffleComponent to use when setting the resulting uint3 z component. + /// uint3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 shuffle(uint3 left, uint3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return uint3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two uint3 vectors into a uint4 vector. + /// uint3 to use as the left argument of the shuffle operation. + /// uint3 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint4 x component. + /// The ShuffleComponent to use when setting the resulting uint4 y component. + /// The ShuffleComponent to use when setting the resulting uint4 z component. + /// The ShuffleComponent to use when setting the resulting uint4 w component. + /// uint4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 shuffle(uint3 left, uint3 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return uint4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint select_shuffle_component(uint3 a, uint3 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint3x2.gen.cs b/ThirdParty/Unity.Mathematics/uint3x2.gen.cs new file mode 100644 index 0000000..15ac238 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint3x2.gen.cs @@ -0,0 +1,719 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x2 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint3x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint3 c0; + /// Column 1 of the matrix. + public uint3 c1; + + /// uint3x2 zero value. + public static readonly uint3x2 zero; + + /// Constructs a uint3x2 matrix from two uint3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(uint3 c0, uint3 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a uint3x2 matrix from 6 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(uint m00, uint m01, + uint m10, uint m11, + uint m20, uint m21) + { + this.c0 = new uint3(m00, m10, m20); + this.c1 = new uint3(m01, m11, m21); + } + + /// Constructs a uint3x2 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a uint3x2 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(bool v) + { + this.c0 = math.select(new uint3(0u), new uint3(1u), v); + this.c1 = math.select(new uint3(0u), new uint3(1u), v); + } + + /// Constructs a uint3x2 matrix from a bool3x2 matrix by componentwise conversion. + /// bool3x2 to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(bool3x2 v) + { + this.c0 = math.select(new uint3(0u), new uint3(1u), v.c0); + this.c1 = math.select(new uint3(0u), new uint3(1u), v.c1); + } + + /// Constructs a uint3x2 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(int v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + } + + /// Constructs a uint3x2 matrix from a int3x2 matrix by componentwise conversion. + /// int3x2 to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(int3x2 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + } + + /// Constructs a uint3x2 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(float v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + } + + /// Constructs a uint3x2 matrix from a float3x2 matrix by componentwise conversion. + /// float3x2 to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(float3x2 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + } + + /// Constructs a uint3x2 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(double v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + } + + /// Constructs a uint3x2 matrix from a double3x2 matrix by componentwise conversion. + /// double3x2 to convert to uint3x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x2(double3x2 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + } + + + /// Implicitly converts a single uint value to a uint3x2 matrix by assigning it to every component. + /// uint to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint3x2(uint v) { return new uint3x2(v); } + + /// Explicitly converts a single bool value to a uint3x2 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x2(bool v) { return new uint3x2(v); } + + /// Explicitly converts a bool3x2 matrix to a uint3x2 matrix by componentwise conversion. + /// bool3x2 to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x2(bool3x2 v) { return new uint3x2(v); } + + /// Explicitly converts a single int value to a uint3x2 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x2(int v) { return new uint3x2(v); } + + /// Explicitly converts a int3x2 matrix to a uint3x2 matrix by componentwise conversion. + /// int3x2 to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x2(int3x2 v) { return new uint3x2(v); } + + /// Explicitly converts a single float value to a uint3x2 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x2(float v) { return new uint3x2(v); } + + /// Explicitly converts a float3x2 matrix to a uint3x2 matrix by componentwise conversion. + /// float3x2 to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x2(float3x2 v) { return new uint3x2(v); } + + /// Explicitly converts a single double value to a uint3x2 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x2(double v) { return new uint3x2(v); } + + /// Explicitly converts a double3x2 matrix to a uint3x2 matrix by componentwise conversion. + /// double3x2 to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x2(double3x2 v) { return new uint3x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise multiplication. + /// Right hand side uint3x2 to use to compute componentwise multiplication. + /// uint3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator * (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator * (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint3x2 to use to compute componentwise multiplication. + /// uint3x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator * (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise addition. + /// Right hand side uint3x2 to use to compute componentwise addition. + /// uint3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator + (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator + (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint3x2 to use to compute componentwise addition. + /// uint3x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator + (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise subtraction. + /// Right hand side uint3x2 to use to compute componentwise subtraction. + /// uint3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator - (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator - (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint3x2 to use to compute componentwise subtraction. + /// uint3x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator - (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise division. + /// Right hand side uint3x2 to use to compute componentwise division. + /// uint3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator / (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator / (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint3x2 to use to compute componentwise division. + /// uint3x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator / (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise modulus. + /// Right hand side uint3x2 to use to compute componentwise modulus. + /// uint3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator % (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator % (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint3x2 to use to compute componentwise modulus. + /// uint3x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator % (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a uint3x2 matrix. + /// Value to use when computing the componentwise increment. + /// uint3x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator ++ (uint3x2 val) { return new uint3x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a uint3x2 matrix. + /// Value to use when computing the componentwise decrement. + /// uint3x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator -- (uint3x2 val) { return new uint3x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise less than. + /// Right hand side uint3x2 to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint3x2 to use to compute componentwise less than. + /// bool3x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator < (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise less or equal. + /// Right hand side uint3x2 to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint3x2 to use to compute componentwise less or equal. + /// bool3x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator <= (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise greater than. + /// Right hand side uint3x2 to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint3x2 to use to compute componentwise greater than. + /// bool3x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator > (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise greater or equal. + /// Right hand side uint3x2 to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint3x2 to use to compute componentwise greater or equal. + /// bool3x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator >= (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a uint3x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint3x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator - (uint3x2 val) { return new uint3x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a uint3x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint3x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator + (uint3x2 val) { return new uint3x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise left shift operation on a uint3x2 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator << (uint3x2 x, int n) { return new uint3x2 (x.c0 << n, x.c1 << n); } + + /// Returns the result of a componentwise right shift operation on a uint3x2 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator >> (uint3x2 x, int n) { return new uint3x2 (x.c0 >> n, x.c1 >> n); } + + /// Returns the result of a componentwise equality operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise equality. + /// Right hand side uint3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint3x2 to use to compute componentwise equality. + /// bool3x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator == (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise not equal. + /// Right hand side uint3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (uint3x2 lhs, uint3x2 rhs) { return new bool3x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (uint3x2 lhs, uint rhs) { return new bool3x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint3x2 to use to compute componentwise not equal. + /// bool3x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x2 operator != (uint lhs, uint3x2 rhs) { return new bool3x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise bitwise not operation on a uint3x2 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint3x2 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator ~ (uint3x2 val) { return new uint3x2 (~val.c0, ~val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise bitwise and. + /// Right hand side uint3x2 to use to compute componentwise bitwise and. + /// uint3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator & (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator & (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint3x2 to use to compute componentwise bitwise and. + /// uint3x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator & (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise bitwise or. + /// Right hand side uint3x2 to use to compute componentwise bitwise or. + /// uint3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator | (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator | (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint3x2 to use to compute componentwise bitwise or. + /// uint3x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator | (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint3x2 matrices. + /// Left hand side uint3x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint3x2 to use to compute componentwise bitwise exclusive or. + /// uint3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator ^ (uint3x2 lhs, uint3x2 rhs) { return new uint3x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint3x2 matrix and a uint value. + /// Left hand side uint3x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator ^ (uint3x2 lhs, uint rhs) { return new uint3x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint3x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint3x2 to use to compute componentwise bitwise exclusive or. + /// uint3x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 operator ^ (uint lhs, uint3x2 rhs) { return new uint3x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the uint3 element at a specified index. + unsafe public ref uint3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (uint3x2* array = &this) { return ref ((uint3*)array)[index]; } + } + } + + /// Returns true if the uint3x2 is equal to a given uint3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint3x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the uint3x2 is equal to a given uint3x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint3x2 converted && Equals(converted); } + + + /// Returns a hash code for the uint3x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint3x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint3x2({0}, {1}, {2}, {3}, {4}, {5})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z); + } + + /// Returns a string representation of the uint3x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint3x2({0}, {1}, {2}, {3}, {4}, {5})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint3x2 matrix constructed from two uint3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// uint3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(uint3 c0, uint3 c1) { return new uint3x2(c0, c1); } + + /// Returns a uint3x2 matrix constructed from from 6 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// uint3x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(uint m00, uint m01, + uint m10, uint m11, + uint m20, uint m21) + { + return new uint3x2(m00, m01, + m10, m11, + m20, m21); + } + + /// Returns a uint3x2 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(uint v) { return new uint3x2(v); } + + /// Returns a uint3x2 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(bool v) { return new uint3x2(v); } + + /// Return a uint3x2 matrix constructed from a bool3x2 matrix by componentwise conversion. + /// bool3x2 to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(bool3x2 v) { return new uint3x2(v); } + + /// Returns a uint3x2 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(int v) { return new uint3x2(v); } + + /// Return a uint3x2 matrix constructed from a int3x2 matrix by componentwise conversion. + /// int3x2 to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(int3x2 v) { return new uint3x2(v); } + + /// Returns a uint3x2 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(float v) { return new uint3x2(v); } + + /// Return a uint3x2 matrix constructed from a float3x2 matrix by componentwise conversion. + /// float3x2 to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(float3x2 v) { return new uint3x2(v); } + + /// Returns a uint3x2 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(double v) { return new uint3x2(v); } + + /// Return a uint3x2 matrix constructed from a double3x2 matrix by componentwise conversion. + /// double3x2 to convert to uint3x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x2 uint3x2(double3x2 v) { return new uint3x2(v); } + + /// Return the uint2x3 transpose of a uint3x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x3 transpose(uint3x2 v) + { + return uint2x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z); + } + + /// Returns a uint hash code of a uint3x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint3x2 v) + { + return csum(v.c0 * uint3(0x515D90F5u, 0xEC9F68F3u, 0xF9EA92D5u) + + v.c1 * uint3(0xC2FAFCB9u, 0x616E9CA1u, 0xC5C5394Bu)) + 0xCAE78587u; + } + + /// + /// Returns a uint3 vector hash code of a uint3x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(uint3x2 v) + { + return (v.c0 * uint3(0x7A1541C9u, 0xF83BD927u, 0x6A243BCBu) + + v.c1 * uint3(0x509B84C9u, 0x91D13847u, 0x52F7230Fu)) + 0xCF286E83u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint3x3.gen.cs b/ThirdParty/Unity.Mathematics/uint3x3.gen.cs new file mode 100644 index 0000000..57f9f1d --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint3x3.gen.cs @@ -0,0 +1,746 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x3 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint3x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint3 c0; + /// Column 1 of the matrix. + public uint3 c1; + /// Column 2 of the matrix. + public uint3 c2; + + /// uint3x3 identity transform. + public static readonly uint3x3 identity = new uint3x3(1u, 0u, 0u, 0u, 1u, 0u, 0u, 0u, 1u); + + /// uint3x3 zero value. + public static readonly uint3x3 zero; + + /// Constructs a uint3x3 matrix from three uint3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(uint3 c0, uint3 c1, uint3 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a uint3x3 matrix from 9 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(uint m00, uint m01, uint m02, + uint m10, uint m11, uint m12, + uint m20, uint m21, uint m22) + { + this.c0 = new uint3(m00, m10, m20); + this.c1 = new uint3(m01, m11, m21); + this.c2 = new uint3(m02, m12, m22); + } + + /// Constructs a uint3x3 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a uint3x3 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(bool v) + { + this.c0 = math.select(new uint3(0u), new uint3(1u), v); + this.c1 = math.select(new uint3(0u), new uint3(1u), v); + this.c2 = math.select(new uint3(0u), new uint3(1u), v); + } + + /// Constructs a uint3x3 matrix from a bool3x3 matrix by componentwise conversion. + /// bool3x3 to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(bool3x3 v) + { + this.c0 = math.select(new uint3(0u), new uint3(1u), v.c0); + this.c1 = math.select(new uint3(0u), new uint3(1u), v.c1); + this.c2 = math.select(new uint3(0u), new uint3(1u), v.c2); + } + + /// Constructs a uint3x3 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(int v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + this.c2 = (uint3)v; + } + + /// Constructs a uint3x3 matrix from a int3x3 matrix by componentwise conversion. + /// int3x3 to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(int3x3 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + this.c2 = (uint3)v.c2; + } + + /// Constructs a uint3x3 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(float v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + this.c2 = (uint3)v; + } + + /// Constructs a uint3x3 matrix from a float3x3 matrix by componentwise conversion. + /// float3x3 to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(float3x3 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + this.c2 = (uint3)v.c2; + } + + /// Constructs a uint3x3 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(double v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + this.c2 = (uint3)v; + } + + /// Constructs a uint3x3 matrix from a double3x3 matrix by componentwise conversion. + /// double3x3 to convert to uint3x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x3(double3x3 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + this.c2 = (uint3)v.c2; + } + + + /// Implicitly converts a single uint value to a uint3x3 matrix by assigning it to every component. + /// uint to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint3x3(uint v) { return new uint3x3(v); } + + /// Explicitly converts a single bool value to a uint3x3 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x3(bool v) { return new uint3x3(v); } + + /// Explicitly converts a bool3x3 matrix to a uint3x3 matrix by componentwise conversion. + /// bool3x3 to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x3(bool3x3 v) { return new uint3x3(v); } + + /// Explicitly converts a single int value to a uint3x3 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x3(int v) { return new uint3x3(v); } + + /// Explicitly converts a int3x3 matrix to a uint3x3 matrix by componentwise conversion. + /// int3x3 to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x3(int3x3 v) { return new uint3x3(v); } + + /// Explicitly converts a single float value to a uint3x3 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x3(float v) { return new uint3x3(v); } + + /// Explicitly converts a float3x3 matrix to a uint3x3 matrix by componentwise conversion. + /// float3x3 to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x3(float3x3 v) { return new uint3x3(v); } + + /// Explicitly converts a single double value to a uint3x3 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x3(double v) { return new uint3x3(v); } + + /// Explicitly converts a double3x3 matrix to a uint3x3 matrix by componentwise conversion. + /// double3x3 to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x3(double3x3 v) { return new uint3x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise multiplication. + /// Right hand side uint3x3 to use to compute componentwise multiplication. + /// uint3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator * (uint3x3 lhs, uint3x3 rhs) { return new uint3x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator * (uint3x3 lhs, uint rhs) { return new uint3x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint3x3 to use to compute componentwise multiplication. + /// uint3x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator * (uint lhs, uint3x3 rhs) { return new uint3x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise addition. + /// Right hand side uint3x3 to use to compute componentwise addition. + /// uint3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator + (uint3x3 lhs, uint3x3 rhs) { return new uint3x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator + (uint3x3 lhs, uint rhs) { return new uint3x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint3x3 to use to compute componentwise addition. + /// uint3x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator + (uint lhs, uint3x3 rhs) { return new uint3x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise subtraction. + /// Right hand side uint3x3 to use to compute componentwise subtraction. + /// uint3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator - (uint3x3 lhs, uint3x3 rhs) { return new uint3x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator - (uint3x3 lhs, uint rhs) { return new uint3x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint3x3 to use to compute componentwise subtraction. + /// uint3x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator - (uint lhs, uint3x3 rhs) { return new uint3x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise division. + /// Right hand side uint3x3 to use to compute componentwise division. + /// uint3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator / (uint3x3 lhs, uint3x3 rhs) { return new uint3x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator / (uint3x3 lhs, uint rhs) { return new uint3x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint3x3 to use to compute componentwise division. + /// uint3x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator / (uint lhs, uint3x3 rhs) { return new uint3x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise modulus. + /// Right hand side uint3x3 to use to compute componentwise modulus. + /// uint3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator % (uint3x3 lhs, uint3x3 rhs) { return new uint3x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator % (uint3x3 lhs, uint rhs) { return new uint3x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint3x3 to use to compute componentwise modulus. + /// uint3x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator % (uint lhs, uint3x3 rhs) { return new uint3x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a uint3x3 matrix. + /// Value to use when computing the componentwise increment. + /// uint3x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator ++ (uint3x3 val) { return new uint3x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a uint3x3 matrix. + /// Value to use when computing the componentwise decrement. + /// uint3x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator -- (uint3x3 val) { return new uint3x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise less than. + /// Right hand side uint3x3 to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (uint3x3 lhs, uint3x3 rhs) { return new bool3x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (uint3x3 lhs, uint rhs) { return new bool3x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint3x3 to use to compute componentwise less than. + /// bool3x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator < (uint lhs, uint3x3 rhs) { return new bool3x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise less or equal. + /// Right hand side uint3x3 to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (uint3x3 lhs, uint3x3 rhs) { return new bool3x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (uint3x3 lhs, uint rhs) { return new bool3x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint3x3 to use to compute componentwise less or equal. + /// bool3x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator <= (uint lhs, uint3x3 rhs) { return new bool3x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise greater than. + /// Right hand side uint3x3 to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (uint3x3 lhs, uint3x3 rhs) { return new bool3x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (uint3x3 lhs, uint rhs) { return new bool3x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint3x3 to use to compute componentwise greater than. + /// bool3x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator > (uint lhs, uint3x3 rhs) { return new bool3x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise greater or equal. + /// Right hand side uint3x3 to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (uint3x3 lhs, uint3x3 rhs) { return new bool3x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (uint3x3 lhs, uint rhs) { return new bool3x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint3x3 to use to compute componentwise greater or equal. + /// bool3x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator >= (uint lhs, uint3x3 rhs) { return new bool3x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a uint3x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint3x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator - (uint3x3 val) { return new uint3x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a uint3x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint3x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator + (uint3x3 val) { return new uint3x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise left shift operation on a uint3x3 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator << (uint3x3 x, int n) { return new uint3x3 (x.c0 << n, x.c1 << n, x.c2 << n); } + + /// Returns the result of a componentwise right shift operation on a uint3x3 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator >> (uint3x3 x, int n) { return new uint3x3 (x.c0 >> n, x.c1 >> n, x.c2 >> n); } + + /// Returns the result of a componentwise equality operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise equality. + /// Right hand side uint3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (uint3x3 lhs, uint3x3 rhs) { return new bool3x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (uint3x3 lhs, uint rhs) { return new bool3x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint3x3 to use to compute componentwise equality. + /// bool3x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator == (uint lhs, uint3x3 rhs) { return new bool3x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise not equal. + /// Right hand side uint3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (uint3x3 lhs, uint3x3 rhs) { return new bool3x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (uint3x3 lhs, uint rhs) { return new bool3x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint3x3 to use to compute componentwise not equal. + /// bool3x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x3 operator != (uint lhs, uint3x3 rhs) { return new bool3x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise bitwise not operation on a uint3x3 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint3x3 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator ~ (uint3x3 val) { return new uint3x3 (~val.c0, ~val.c1, ~val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise bitwise and. + /// Right hand side uint3x3 to use to compute componentwise bitwise and. + /// uint3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator & (uint3x3 lhs, uint3x3 rhs) { return new uint3x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator & (uint3x3 lhs, uint rhs) { return new uint3x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint3x3 to use to compute componentwise bitwise and. + /// uint3x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator & (uint lhs, uint3x3 rhs) { return new uint3x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise bitwise or. + /// Right hand side uint3x3 to use to compute componentwise bitwise or. + /// uint3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator | (uint3x3 lhs, uint3x3 rhs) { return new uint3x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator | (uint3x3 lhs, uint rhs) { return new uint3x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint3x3 to use to compute componentwise bitwise or. + /// uint3x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator | (uint lhs, uint3x3 rhs) { return new uint3x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint3x3 matrices. + /// Left hand side uint3x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint3x3 to use to compute componentwise bitwise exclusive or. + /// uint3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator ^ (uint3x3 lhs, uint3x3 rhs) { return new uint3x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint3x3 matrix and a uint value. + /// Left hand side uint3x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator ^ (uint3x3 lhs, uint rhs) { return new uint3x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint3x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint3x3 to use to compute componentwise bitwise exclusive or. + /// uint3x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 operator ^ (uint lhs, uint3x3 rhs) { return new uint3x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the uint3 element at a specified index. + unsafe public ref uint3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (uint3x3* array = &this) { return ref ((uint3*)array)[index]; } + } + } + + /// Returns true if the uint3x3 is equal to a given uint3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint3x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the uint3x3 is equal to a given uint3x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint3x3 converted && Equals(converted); } + + + /// Returns a hash code for the uint3x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint3x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint3x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z); + } + + /// Returns a string representation of the uint3x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint3x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint3x3 matrix constructed from three uint3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// uint3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(uint3 c0, uint3 c1, uint3 c2) { return new uint3x3(c0, c1, c2); } + + /// Returns a uint3x3 matrix constructed from from 9 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// uint3x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(uint m00, uint m01, uint m02, + uint m10, uint m11, uint m12, + uint m20, uint m21, uint m22) + { + return new uint3x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22); + } + + /// Returns a uint3x3 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(uint v) { return new uint3x3(v); } + + /// Returns a uint3x3 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(bool v) { return new uint3x3(v); } + + /// Return a uint3x3 matrix constructed from a bool3x3 matrix by componentwise conversion. + /// bool3x3 to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(bool3x3 v) { return new uint3x3(v); } + + /// Returns a uint3x3 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(int v) { return new uint3x3(v); } + + /// Return a uint3x3 matrix constructed from a int3x3 matrix by componentwise conversion. + /// int3x3 to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(int3x3 v) { return new uint3x3(v); } + + /// Returns a uint3x3 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(float v) { return new uint3x3(v); } + + /// Return a uint3x3 matrix constructed from a float3x3 matrix by componentwise conversion. + /// float3x3 to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(float3x3 v) { return new uint3x3(v); } + + /// Returns a uint3x3 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(double v) { return new uint3x3(v); } + + /// Return a uint3x3 matrix constructed from a double3x3 matrix by componentwise conversion. + /// double3x3 to convert to uint3x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 uint3x3(double3x3 v) { return new uint3x3(v); } + + /// Return the uint3x3 transpose of a uint3x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x3 transpose(uint3x3 v) + { + return uint3x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z); + } + + /// Returns a uint hash code of a uint3x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint3x3 v) + { + return csum(v.c0 * uint3(0xAC60D0C3u, 0x9263662Fu, 0xE69626FFu) + + v.c1 * uint3(0xBD010EEBu, 0x9CEDE1D1u, 0x43BE0B51u) + + v.c2 * uint3(0xAF836EE1u, 0xB130C137u, 0x54834775u)) + 0x7C022221u; + } + + /// + /// Returns a uint3 vector hash code of a uint3x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(uint3x3 v) + { + return (v.c0 * uint3(0xA2D00EDFu, 0xA8977779u, 0x9F1C739Bu) + + v.c1 * uint3(0x4B1BD187u, 0x9DF50593u, 0xF18EEB85u) + + v.c2 * uint3(0x9E19BFC3u, 0x8196B06Fu, 0xD24EFA19u)) + 0x7D8048BBu; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint3x4.gen.cs b/ThirdParty/Unity.Mathematics/uint3x4.gen.cs new file mode 100644 index 0000000..51bca3b --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint3x4.gen.cs @@ -0,0 +1,767 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 3x4 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint3x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint3 c0; + /// Column 1 of the matrix. + public uint3 c1; + /// Column 2 of the matrix. + public uint3 c2; + /// Column 3 of the matrix. + public uint3 c3; + + /// uint3x4 zero value. + public static readonly uint3x4 zero; + + /// Constructs a uint3x4 matrix from four uint3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(uint3 c0, uint3 c1, uint3 c2, uint3 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a uint3x4 matrix from 12 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(uint m00, uint m01, uint m02, uint m03, + uint m10, uint m11, uint m12, uint m13, + uint m20, uint m21, uint m22, uint m23) + { + this.c0 = new uint3(m00, m10, m20); + this.c1 = new uint3(m01, m11, m21); + this.c2 = new uint3(m02, m12, m22); + this.c3 = new uint3(m03, m13, m23); + } + + /// Constructs a uint3x4 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a uint3x4 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(bool v) + { + this.c0 = math.select(new uint3(0u), new uint3(1u), v); + this.c1 = math.select(new uint3(0u), new uint3(1u), v); + this.c2 = math.select(new uint3(0u), new uint3(1u), v); + this.c3 = math.select(new uint3(0u), new uint3(1u), v); + } + + /// Constructs a uint3x4 matrix from a bool3x4 matrix by componentwise conversion. + /// bool3x4 to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(bool3x4 v) + { + this.c0 = math.select(new uint3(0u), new uint3(1u), v.c0); + this.c1 = math.select(new uint3(0u), new uint3(1u), v.c1); + this.c2 = math.select(new uint3(0u), new uint3(1u), v.c2); + this.c3 = math.select(new uint3(0u), new uint3(1u), v.c3); + } + + /// Constructs a uint3x4 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(int v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + this.c2 = (uint3)v; + this.c3 = (uint3)v; + } + + /// Constructs a uint3x4 matrix from a int3x4 matrix by componentwise conversion. + /// int3x4 to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(int3x4 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + this.c2 = (uint3)v.c2; + this.c3 = (uint3)v.c3; + } + + /// Constructs a uint3x4 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(float v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + this.c2 = (uint3)v; + this.c3 = (uint3)v; + } + + /// Constructs a uint3x4 matrix from a float3x4 matrix by componentwise conversion. + /// float3x4 to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(float3x4 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + this.c2 = (uint3)v.c2; + this.c3 = (uint3)v.c3; + } + + /// Constructs a uint3x4 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(double v) + { + this.c0 = (uint3)v; + this.c1 = (uint3)v; + this.c2 = (uint3)v; + this.c3 = (uint3)v; + } + + /// Constructs a uint3x4 matrix from a double3x4 matrix by componentwise conversion. + /// double3x4 to convert to uint3x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint3x4(double3x4 v) + { + this.c0 = (uint3)v.c0; + this.c1 = (uint3)v.c1; + this.c2 = (uint3)v.c2; + this.c3 = (uint3)v.c3; + } + + + /// Implicitly converts a single uint value to a uint3x4 matrix by assigning it to every component. + /// uint to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint3x4(uint v) { return new uint3x4(v); } + + /// Explicitly converts a single bool value to a uint3x4 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x4(bool v) { return new uint3x4(v); } + + /// Explicitly converts a bool3x4 matrix to a uint3x4 matrix by componentwise conversion. + /// bool3x4 to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x4(bool3x4 v) { return new uint3x4(v); } + + /// Explicitly converts a single int value to a uint3x4 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x4(int v) { return new uint3x4(v); } + + /// Explicitly converts a int3x4 matrix to a uint3x4 matrix by componentwise conversion. + /// int3x4 to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x4(int3x4 v) { return new uint3x4(v); } + + /// Explicitly converts a single float value to a uint3x4 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x4(float v) { return new uint3x4(v); } + + /// Explicitly converts a float3x4 matrix to a uint3x4 matrix by componentwise conversion. + /// float3x4 to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x4(float3x4 v) { return new uint3x4(v); } + + /// Explicitly converts a single double value to a uint3x4 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x4(double v) { return new uint3x4(v); } + + /// Explicitly converts a double3x4 matrix to a uint3x4 matrix by componentwise conversion. + /// double3x4 to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint3x4(double3x4 v) { return new uint3x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise multiplication. + /// Right hand side uint3x4 to use to compute componentwise multiplication. + /// uint3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator * (uint3x4 lhs, uint3x4 rhs) { return new uint3x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator * (uint3x4 lhs, uint rhs) { return new uint3x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint3x4 to use to compute componentwise multiplication. + /// uint3x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator * (uint lhs, uint3x4 rhs) { return new uint3x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise addition. + /// Right hand side uint3x4 to use to compute componentwise addition. + /// uint3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator + (uint3x4 lhs, uint3x4 rhs) { return new uint3x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator + (uint3x4 lhs, uint rhs) { return new uint3x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint3x4 to use to compute componentwise addition. + /// uint3x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator + (uint lhs, uint3x4 rhs) { return new uint3x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise subtraction. + /// Right hand side uint3x4 to use to compute componentwise subtraction. + /// uint3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator - (uint3x4 lhs, uint3x4 rhs) { return new uint3x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator - (uint3x4 lhs, uint rhs) { return new uint3x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint3x4 to use to compute componentwise subtraction. + /// uint3x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator - (uint lhs, uint3x4 rhs) { return new uint3x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise division. + /// Right hand side uint3x4 to use to compute componentwise division. + /// uint3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator / (uint3x4 lhs, uint3x4 rhs) { return new uint3x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator / (uint3x4 lhs, uint rhs) { return new uint3x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint3x4 to use to compute componentwise division. + /// uint3x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator / (uint lhs, uint3x4 rhs) { return new uint3x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise modulus. + /// Right hand side uint3x4 to use to compute componentwise modulus. + /// uint3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator % (uint3x4 lhs, uint3x4 rhs) { return new uint3x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator % (uint3x4 lhs, uint rhs) { return new uint3x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint3x4 to use to compute componentwise modulus. + /// uint3x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator % (uint lhs, uint3x4 rhs) { return new uint3x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a uint3x4 matrix. + /// Value to use when computing the componentwise increment. + /// uint3x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator ++ (uint3x4 val) { return new uint3x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a uint3x4 matrix. + /// Value to use when computing the componentwise decrement. + /// uint3x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator -- (uint3x4 val) { return new uint3x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise less than. + /// Right hand side uint3x4 to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (uint3x4 lhs, uint3x4 rhs) { return new bool3x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (uint3x4 lhs, uint rhs) { return new bool3x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint3x4 to use to compute componentwise less than. + /// bool3x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator < (uint lhs, uint3x4 rhs) { return new bool3x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise less or equal. + /// Right hand side uint3x4 to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (uint3x4 lhs, uint3x4 rhs) { return new bool3x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (uint3x4 lhs, uint rhs) { return new bool3x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint3x4 to use to compute componentwise less or equal. + /// bool3x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator <= (uint lhs, uint3x4 rhs) { return new bool3x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise greater than. + /// Right hand side uint3x4 to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (uint3x4 lhs, uint3x4 rhs) { return new bool3x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (uint3x4 lhs, uint rhs) { return new bool3x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint3x4 to use to compute componentwise greater than. + /// bool3x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator > (uint lhs, uint3x4 rhs) { return new bool3x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise greater or equal. + /// Right hand side uint3x4 to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (uint3x4 lhs, uint3x4 rhs) { return new bool3x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (uint3x4 lhs, uint rhs) { return new bool3x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint3x4 to use to compute componentwise greater or equal. + /// bool3x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator >= (uint lhs, uint3x4 rhs) { return new bool3x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a uint3x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint3x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator - (uint3x4 val) { return new uint3x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a uint3x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint3x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator + (uint3x4 val) { return new uint3x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise left shift operation on a uint3x4 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator << (uint3x4 x, int n) { return new uint3x4 (x.c0 << n, x.c1 << n, x.c2 << n, x.c3 << n); } + + /// Returns the result of a componentwise right shift operation on a uint3x4 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator >> (uint3x4 x, int n) { return new uint3x4 (x.c0 >> n, x.c1 >> n, x.c2 >> n, x.c3 >> n); } + + /// Returns the result of a componentwise equality operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise equality. + /// Right hand side uint3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (uint3x4 lhs, uint3x4 rhs) { return new bool3x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (uint3x4 lhs, uint rhs) { return new bool3x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint3x4 to use to compute componentwise equality. + /// bool3x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator == (uint lhs, uint3x4 rhs) { return new bool3x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise not equal. + /// Right hand side uint3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (uint3x4 lhs, uint3x4 rhs) { return new bool3x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (uint3x4 lhs, uint rhs) { return new bool3x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint3x4 to use to compute componentwise not equal. + /// bool3x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool3x4 operator != (uint lhs, uint3x4 rhs) { return new bool3x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise bitwise not operation on a uint3x4 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint3x4 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator ~ (uint3x4 val) { return new uint3x4 (~val.c0, ~val.c1, ~val.c2, ~val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise bitwise and. + /// Right hand side uint3x4 to use to compute componentwise bitwise and. + /// uint3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator & (uint3x4 lhs, uint3x4 rhs) { return new uint3x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator & (uint3x4 lhs, uint rhs) { return new uint3x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint3x4 to use to compute componentwise bitwise and. + /// uint3x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator & (uint lhs, uint3x4 rhs) { return new uint3x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise bitwise or. + /// Right hand side uint3x4 to use to compute componentwise bitwise or. + /// uint3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator | (uint3x4 lhs, uint3x4 rhs) { return new uint3x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator | (uint3x4 lhs, uint rhs) { return new uint3x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint3x4 to use to compute componentwise bitwise or. + /// uint3x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator | (uint lhs, uint3x4 rhs) { return new uint3x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint3x4 matrices. + /// Left hand side uint3x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint3x4 to use to compute componentwise bitwise exclusive or. + /// uint3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator ^ (uint3x4 lhs, uint3x4 rhs) { return new uint3x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint3x4 matrix and a uint value. + /// Left hand side uint3x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator ^ (uint3x4 lhs, uint rhs) { return new uint3x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint3x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint3x4 to use to compute componentwise bitwise exclusive or. + /// uint3x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 operator ^ (uint lhs, uint3x4 rhs) { return new uint3x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the uint3 element at a specified index. + unsafe public ref uint3 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (uint3x4* array = &this) { return ref ((uint3*)array)[index]; } + } + } + + /// Returns true if the uint3x4 is equal to a given uint3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint3x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the uint3x4 is equal to a given uint3x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint3x4 converted && Equals(converted); } + + + /// Returns a hash code for the uint3x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint3x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint3x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z); + } + + /// Returns a string representation of the uint3x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint3x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c3.z.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint3x4 matrix constructed from four uint3 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// uint3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(uint3 c0, uint3 c1, uint3 c2, uint3 c3) { return new uint3x4(c0, c1, c2, c3); } + + /// Returns a uint3x4 matrix constructed from from 12 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// uint3x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(uint m00, uint m01, uint m02, uint m03, + uint m10, uint m11, uint m12, uint m13, + uint m20, uint m21, uint m22, uint m23) + { + return new uint3x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23); + } + + /// Returns a uint3x4 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(uint v) { return new uint3x4(v); } + + /// Returns a uint3x4 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(bool v) { return new uint3x4(v); } + + /// Return a uint3x4 matrix constructed from a bool3x4 matrix by componentwise conversion. + /// bool3x4 to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(bool3x4 v) { return new uint3x4(v); } + + /// Returns a uint3x4 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(int v) { return new uint3x4(v); } + + /// Return a uint3x4 matrix constructed from a int3x4 matrix by componentwise conversion. + /// int3x4 to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(int3x4 v) { return new uint3x4(v); } + + /// Returns a uint3x4 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(float v) { return new uint3x4(v); } + + /// Return a uint3x4 matrix constructed from a float3x4 matrix by componentwise conversion. + /// float3x4 to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(float3x4 v) { return new uint3x4(v); } + + /// Returns a uint3x4 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(double v) { return new uint3x4(v); } + + /// Return a uint3x4 matrix constructed from a double3x4 matrix by componentwise conversion. + /// double3x4 to convert to uint3x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 uint3x4(double3x4 v) { return new uint3x4(v); } + + /// Return the uint4x3 transpose of a uint3x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 transpose(uint3x4 v) + { + return uint4x3( + v.c0.x, v.c0.y, v.c0.z, + v.c1.x, v.c1.y, v.c1.z, + v.c2.x, v.c2.y, v.c2.z, + v.c3.x, v.c3.y, v.c3.z); + } + + /// Returns a uint hash code of a uint3x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint3x4 v) + { + return csum(v.c0 * uint3(0xD1224537u, 0xE99ED6F3u, 0x48125549u) + + v.c1 * uint3(0xEEE2123Bu, 0xE3AD9FE5u, 0xCE1CF8BFu) + + v.c2 * uint3(0x7BE39F3Bu, 0xFAB9913Fu, 0xB4501269u) + + v.c3 * uint3(0xE04B89FDu, 0xDB3DE101u, 0x7B6D1B4Bu)) + 0x58399E77u; + } + + /// + /// Returns a uint3 vector hash code of a uint3x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint3 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 hashwide(uint3x4 v) + { + return (v.c0 * uint3(0x5EAC29C9u, 0xFC6014F9u, 0x6BF6693Fu) + + v.c1 * uint3(0x9D1B1D9Bu, 0xF842F5C1u, 0xA47EC335u) + + v.c2 * uint3(0xA477DF57u, 0xC4B1493Fu, 0xBA0966D3u) + + v.c3 * uint3(0xAFBEE253u, 0x5B419C01u, 0x515D90F5u)) + 0xEC9F68F3u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint4.gen.cs b/ThirdParty/Unity.Mathematics/uint4.gen.cs new file mode 100644 index 0000000..cffed4f --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint4.gen.cs @@ -0,0 +1,4093 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4 component vector of uints. + [DebuggerTypeProxy(typeof(uint4.DebuggerProxy))] + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint4 : System.IEquatable, IFormattable + { + /// x component of the vector. + public uint x; + /// y component of the vector. + public uint y; + /// z component of the vector. + public uint z; + /// w component of the vector. + public uint w; + + /// uint4 zero value. + public static readonly uint4 zero; + + /// Constructs a uint4 vector from four uint values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint x, uint y, uint z, uint w) + { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + /// Constructs a uint4 vector from two uint values and a uint2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint x, uint y, uint2 zw) + { + this.x = x; + this.y = y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a uint4 vector from a uint value, a uint2 vector and a uint value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint x, uint2 yz, uint w) + { + this.x = x; + this.y = yz.x; + this.z = yz.y; + this.w = w; + } + + /// Constructs a uint4 vector from a uint value and a uint3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint x, uint3 yzw) + { + this.x = x; + this.y = yzw.x; + this.z = yzw.y; + this.w = yzw.z; + } + + /// Constructs a uint4 vector from a uint2 vector and two uint values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint2 xy, uint z, uint w) + { + this.x = xy.x; + this.y = xy.y; + this.z = z; + this.w = w; + } + + /// Constructs a uint4 vector from two uint2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint2 xy, uint2 zw) + { + this.x = xy.x; + this.y = xy.y; + this.z = zw.x; + this.w = zw.y; + } + + /// Constructs a uint4 vector from a uint3 vector and a uint value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint3 xyz, uint w) + { + this.x = xyz.x; + this.y = xyz.y; + this.z = xyz.z; + this.w = w; + } + + /// Constructs a uint4 vector from a uint4 vector. + /// The constructed vector's xyzw components will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint4 xyzw) + { + this.x = xyzw.x; + this.y = xyzw.y; + this.z = xyzw.z; + this.w = xyzw.w; + } + + /// Constructs a uint4 vector from a single uint value by assigning it to every component. + /// uint to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(uint v) + { + this.x = v; + this.y = v; + this.z = v; + this.w = v; + } + + /// Constructs a uint4 vector from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(bool v) + { + this.x = v ? 1u : 0u; + this.y = v ? 1u : 0u; + this.z = v ? 1u : 0u; + this.w = v ? 1u : 0u; + } + + /// Constructs a uint4 vector from a bool4 vector by componentwise conversion. + /// bool4 to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(bool4 v) + { + this.x = v.x ? 1u : 0u; + this.y = v.y ? 1u : 0u; + this.z = v.z ? 1u : 0u; + this.w = v.w ? 1u : 0u; + } + + /// Constructs a uint4 vector from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(int v) + { + this.x = (uint)v; + this.y = (uint)v; + this.z = (uint)v; + this.w = (uint)v; + } + + /// Constructs a uint4 vector from a int4 vector by componentwise conversion. + /// int4 to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(int4 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + this.z = (uint)v.z; + this.w = (uint)v.w; + } + + /// Constructs a uint4 vector from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(float v) + { + this.x = (uint)v; + this.y = (uint)v; + this.z = (uint)v; + this.w = (uint)v; + } + + /// Constructs a uint4 vector from a float4 vector by componentwise conversion. + /// float4 to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(float4 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + this.z = (uint)v.z; + this.w = (uint)v.w; + } + + /// Constructs a uint4 vector from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(double v) + { + this.x = (uint)v; + this.y = (uint)v; + this.z = (uint)v; + this.w = (uint)v; + } + + /// Constructs a uint4 vector from a double4 vector by componentwise conversion. + /// double4 to convert to uint4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4(double4 v) + { + this.x = (uint)v.x; + this.y = (uint)v.y; + this.z = (uint)v.z; + this.w = (uint)v.w; + } + + + /// Implicitly converts a single uint value to a uint4 vector by assigning it to every component. + /// uint to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint4(uint v) { return new uint4(v); } + + /// Explicitly converts a single bool value to a uint4 vector by converting it to uint and assigning it to every component. + /// bool to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4(bool v) { return new uint4(v); } + + /// Explicitly converts a bool4 vector to a uint4 vector by componentwise conversion. + /// bool4 to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4(bool4 v) { return new uint4(v); } + + /// Explicitly converts a single int value to a uint4 vector by converting it to uint and assigning it to every component. + /// int to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4(int v) { return new uint4(v); } + + /// Explicitly converts a int4 vector to a uint4 vector by componentwise conversion. + /// int4 to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4(int4 v) { return new uint4(v); } + + /// Explicitly converts a single float value to a uint4 vector by converting it to uint and assigning it to every component. + /// float to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4(float v) { return new uint4(v); } + + /// Explicitly converts a float4 vector to a uint4 vector by componentwise conversion. + /// float4 to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4(float4 v) { return new uint4(v); } + + /// Explicitly converts a single double value to a uint4 vector by converting it to uint and assigning it to every component. + /// double to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4(double v) { return new uint4(v); } + + /// Explicitly converts a double4 vector to a uint4 vector by componentwise conversion. + /// double4 to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4(double4 v) { return new uint4(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise multiplication. + /// Right hand side uint4 to use to compute componentwise multiplication. + /// uint4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator * (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z, lhs.w * rhs.w); } + + /// Returns the result of a componentwise multiplication operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator * (uint4 lhs, uint rhs) { return new uint4 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs, lhs.w * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint4 to use to compute componentwise multiplication. + /// uint4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator * (uint lhs, uint4 rhs) { return new uint4 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z, lhs * rhs.w); } + + + /// Returns the result of a componentwise addition operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise addition. + /// Right hand side uint4 to use to compute componentwise addition. + /// uint4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator + (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z, lhs.w + rhs.w); } + + /// Returns the result of a componentwise addition operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator + (uint4 lhs, uint rhs) { return new uint4 (lhs.x + rhs, lhs.y + rhs, lhs.z + rhs, lhs.w + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint4 to use to compute componentwise addition. + /// uint4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator + (uint lhs, uint4 rhs) { return new uint4 (lhs + rhs.x, lhs + rhs.y, lhs + rhs.z, lhs + rhs.w); } + + + /// Returns the result of a componentwise subtraction operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise subtraction. + /// Right hand side uint4 to use to compute componentwise subtraction. + /// uint4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator - (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z, lhs.w - rhs.w); } + + /// Returns the result of a componentwise subtraction operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator - (uint4 lhs, uint rhs) { return new uint4 (lhs.x - rhs, lhs.y - rhs, lhs.z - rhs, lhs.w - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint4 to use to compute componentwise subtraction. + /// uint4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator - (uint lhs, uint4 rhs) { return new uint4 (lhs - rhs.x, lhs - rhs.y, lhs - rhs.z, lhs - rhs.w); } + + + /// Returns the result of a componentwise division operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise division. + /// Right hand side uint4 to use to compute componentwise division. + /// uint4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator / (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x / rhs.x, lhs.y / rhs.y, lhs.z / rhs.z, lhs.w / rhs.w); } + + /// Returns the result of a componentwise division operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator / (uint4 lhs, uint rhs) { return new uint4 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs, lhs.w / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint4 to use to compute componentwise division. + /// uint4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator / (uint lhs, uint4 rhs) { return new uint4 (lhs / rhs.x, lhs / rhs.y, lhs / rhs.z, lhs / rhs.w); } + + + /// Returns the result of a componentwise modulus operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise modulus. + /// Right hand side uint4 to use to compute componentwise modulus. + /// uint4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator % (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x % rhs.x, lhs.y % rhs.y, lhs.z % rhs.z, lhs.w % rhs.w); } + + /// Returns the result of a componentwise modulus operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator % (uint4 lhs, uint rhs) { return new uint4 (lhs.x % rhs, lhs.y % rhs, lhs.z % rhs, lhs.w % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint4 to use to compute componentwise modulus. + /// uint4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator % (uint lhs, uint4 rhs) { return new uint4 (lhs % rhs.x, lhs % rhs.y, lhs % rhs.z, lhs % rhs.w); } + + + /// Returns the result of a componentwise increment operation on a uint4 vector. + /// Value to use when computing the componentwise increment. + /// uint4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator ++ (uint4 val) { return new uint4 (++val.x, ++val.y, ++val.z, ++val.w); } + + + /// Returns the result of a componentwise decrement operation on a uint4 vector. + /// Value to use when computing the componentwise decrement. + /// uint4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator -- (uint4 val) { return new uint4 (--val.x, --val.y, --val.z, --val.w); } + + + /// Returns the result of a componentwise less than operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise less than. + /// Right hand side uint4 to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (uint4 lhs, uint4 rhs) { return new bool4 (lhs.x < rhs.x, lhs.y < rhs.y, lhs.z < rhs.z, lhs.w < rhs.w); } + + /// Returns the result of a componentwise less than operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (uint4 lhs, uint rhs) { return new bool4 (lhs.x < rhs, lhs.y < rhs, lhs.z < rhs, lhs.w < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint4 to use to compute componentwise less than. + /// bool4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator < (uint lhs, uint4 rhs) { return new bool4 (lhs < rhs.x, lhs < rhs.y, lhs < rhs.z, lhs < rhs.w); } + + + /// Returns the result of a componentwise less or equal operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise less or equal. + /// Right hand side uint4 to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (uint4 lhs, uint4 rhs) { return new bool4 (lhs.x <= rhs.x, lhs.y <= rhs.y, lhs.z <= rhs.z, lhs.w <= rhs.w); } + + /// Returns the result of a componentwise less or equal operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (uint4 lhs, uint rhs) { return new bool4 (lhs.x <= rhs, lhs.y <= rhs, lhs.z <= rhs, lhs.w <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint4 to use to compute componentwise less or equal. + /// bool4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator <= (uint lhs, uint4 rhs) { return new bool4 (lhs <= rhs.x, lhs <= rhs.y, lhs <= rhs.z, lhs <= rhs.w); } + + + /// Returns the result of a componentwise greater than operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise greater than. + /// Right hand side uint4 to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (uint4 lhs, uint4 rhs) { return new bool4 (lhs.x > rhs.x, lhs.y > rhs.y, lhs.z > rhs.z, lhs.w > rhs.w); } + + /// Returns the result of a componentwise greater than operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (uint4 lhs, uint rhs) { return new bool4 (lhs.x > rhs, lhs.y > rhs, lhs.z > rhs, lhs.w > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint4 to use to compute componentwise greater than. + /// bool4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator > (uint lhs, uint4 rhs) { return new bool4 (lhs > rhs.x, lhs > rhs.y, lhs > rhs.z, lhs > rhs.w); } + + + /// Returns the result of a componentwise greater or equal operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise greater or equal. + /// Right hand side uint4 to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (uint4 lhs, uint4 rhs) { return new bool4 (lhs.x >= rhs.x, lhs.y >= rhs.y, lhs.z >= rhs.z, lhs.w >= rhs.w); } + + /// Returns the result of a componentwise greater or equal operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (uint4 lhs, uint rhs) { return new bool4 (lhs.x >= rhs, lhs.y >= rhs, lhs.z >= rhs, lhs.w >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint4 to use to compute componentwise greater or equal. + /// bool4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator >= (uint lhs, uint4 rhs) { return new bool4 (lhs >= rhs.x, lhs >= rhs.y, lhs >= rhs.z, lhs >= rhs.w); } + + + /// Returns the result of a componentwise unary minus operation on a uint4 vector. + /// Value to use when computing the componentwise unary minus. + /// uint4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator - (uint4 val) { return new uint4 ((uint)-val.x, (uint)-val.y, (uint)-val.z, (uint)-val.w); } + + + /// Returns the result of a componentwise unary plus operation on a uint4 vector. + /// Value to use when computing the componentwise unary plus. + /// uint4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator + (uint4 val) { return new uint4 (+val.x, +val.y, +val.z, +val.w); } + + + /// Returns the result of a componentwise left shift operation on a uint4 vector by a number of bits specified by a single int. + /// The vector to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator << (uint4 x, int n) { return new uint4 (x.x << n, x.y << n, x.z << n, x.w << n); } + + /// Returns the result of a componentwise right shift operation on a uint4 vector by a number of bits specified by a single int. + /// The vector to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator >> (uint4 x, int n) { return new uint4 (x.x >> n, x.y >> n, x.z >> n, x.w >> n); } + + /// Returns the result of a componentwise equality operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise equality. + /// Right hand side uint4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (uint4 lhs, uint4 rhs) { return new bool4 (lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z, lhs.w == rhs.w); } + + /// Returns the result of a componentwise equality operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (uint4 lhs, uint rhs) { return new bool4 (lhs.x == rhs, lhs.y == rhs, lhs.z == rhs, lhs.w == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint4 to use to compute componentwise equality. + /// bool4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator == (uint lhs, uint4 rhs) { return new bool4 (lhs == rhs.x, lhs == rhs.y, lhs == rhs.z, lhs == rhs.w); } + + + /// Returns the result of a componentwise not equal operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise not equal. + /// Right hand side uint4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (uint4 lhs, uint4 rhs) { return new bool4 (lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z, lhs.w != rhs.w); } + + /// Returns the result of a componentwise not equal operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (uint4 lhs, uint rhs) { return new bool4 (lhs.x != rhs, lhs.y != rhs, lhs.z != rhs, lhs.w != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint4 to use to compute componentwise not equal. + /// bool4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4 operator != (uint lhs, uint4 rhs) { return new bool4 (lhs != rhs.x, lhs != rhs.y, lhs != rhs.z, lhs != rhs.w); } + + + /// Returns the result of a componentwise bitwise not operation on a uint4 vector. + /// Value to use when computing the componentwise bitwise not. + /// uint4 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator ~ (uint4 val) { return new uint4 (~val.x, ~val.y, ~val.z, ~val.w); } + + + /// Returns the result of a componentwise bitwise and operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise bitwise and. + /// Right hand side uint4 to use to compute componentwise bitwise and. + /// uint4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator & (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x & rhs.x, lhs.y & rhs.y, lhs.z & rhs.z, lhs.w & rhs.w); } + + /// Returns the result of a componentwise bitwise and operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator & (uint4 lhs, uint rhs) { return new uint4 (lhs.x & rhs, lhs.y & rhs, lhs.z & rhs, lhs.w & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint4 to use to compute componentwise bitwise and. + /// uint4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator & (uint lhs, uint4 rhs) { return new uint4 (lhs & rhs.x, lhs & rhs.y, lhs & rhs.z, lhs & rhs.w); } + + + /// Returns the result of a componentwise bitwise or operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise bitwise or. + /// Right hand side uint4 to use to compute componentwise bitwise or. + /// uint4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator | (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x | rhs.x, lhs.y | rhs.y, lhs.z | rhs.z, lhs.w | rhs.w); } + + /// Returns the result of a componentwise bitwise or operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator | (uint4 lhs, uint rhs) { return new uint4 (lhs.x | rhs, lhs.y | rhs, lhs.z | rhs, lhs.w | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint4 to use to compute componentwise bitwise or. + /// uint4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator | (uint lhs, uint4 rhs) { return new uint4 (lhs | rhs.x, lhs | rhs.y, lhs | rhs.z, lhs | rhs.w); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint4 vectors. + /// Left hand side uint4 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint4 to use to compute componentwise bitwise exclusive or. + /// uint4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator ^ (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x ^ rhs.x, lhs.y ^ rhs.y, lhs.z ^ rhs.z, lhs.w ^ rhs.w); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint4 vector and a uint value. + /// Left hand side uint4 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator ^ (uint4 lhs, uint rhs) { return new uint4 (lhs.x ^ rhs, lhs.y ^ rhs, lhs.z ^ rhs, lhs.w ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint4 vector. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint4 to use to compute componentwise bitwise exclusive or. + /// uint4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 operator ^ (uint lhs, uint4 rhs) { return new uint4 (lhs ^ rhs.x, lhs ^ rhs.y, lhs ^ rhs.z, lhs ^ rhs.w); } + + + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 xwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(x, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 yzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 ywww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(y, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; w = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 zwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(z, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wxww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; z = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wyww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; y = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; x = value.w; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wzww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint4 wwww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint4(w, w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 xww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(x, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 ywx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 ywy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 ywz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 yww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(y, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, x, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, y, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; w = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, z, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, z, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 zww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(z, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wxx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wxy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wxz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wxw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, x, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wyx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wyy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wyz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; z = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wyw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, y, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wzx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; x = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wzy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; y = value.z; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wzz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wzw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, z, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wwx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, w, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wwy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, w, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 wwz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, w, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint3 www + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint3(w, w, w); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, x); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 xw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(x, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { x = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, y); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 yw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(y, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { y = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 zx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(z, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 zy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(z, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 zz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(z, z); } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 zw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(z, w); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { z = value.x; w = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 wx + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(w, x); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; x = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 wy + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(w, y); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; y = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 wz + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(w, z); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set { w = value.x; z = value.y; } + } + + + /// Swizzles the vector. + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public uint2 ww + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return new uint2(w, w); } + } + + + + /// Returns the uint element at a specified index. + unsafe public uint this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (uint4* array = &this) { return ((uint*)array)[index]; } + } + set + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (uint* array = &x) { array[index] = value; } + } + } + + /// Returns true if the uint4 is equal to a given uint4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } + + /// Returns true if the uint4 is equal to a given uint4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint4 converted && Equals(converted); } + + + /// Returns a hash code for the uint4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint4({0}, {1}, {2}, {3})", x, y, z, w); + } + + /// Returns a string representation of the uint4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint4({0}, {1}, {2}, {3})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); + } + + internal sealed class DebuggerProxy + { + public uint x; + public uint y; + public uint z; + public uint w; + public DebuggerProxy(uint4 v) + { + x = v.x; + y = v.y; + z = v.z; + w = v.w; + } + } + + } + + public static partial class math + { + /// Returns a uint4 vector constructed from four uint values. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// uint4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint x, uint y, uint z, uint w) { return new uint4(x, y, z, w); } + + /// Returns a uint4 vector constructed from two uint values and a uint2 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's y component will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// uint4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint x, uint y, uint2 zw) { return new uint4(x, y, zw); } + + /// Returns a uint4 vector constructed from a uint value, a uint2 vector and a uint value. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// uint4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint x, uint2 yz, uint w) { return new uint4(x, yz, w); } + + /// Returns a uint4 vector constructed from a uint value and a uint3 vector. + /// The constructed vector's x component will be set to this value. + /// The constructed vector's yzw components will be set to this value. + /// uint4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint x, uint3 yzw) { return new uint4(x, yzw); } + + /// Returns a uint4 vector constructed from a uint2 vector and two uint values. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's z component will be set to this value. + /// The constructed vector's w component will be set to this value. + /// uint4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint2 xy, uint z, uint w) { return new uint4(xy, z, w); } + + /// Returns a uint4 vector constructed from two uint2 vectors. + /// The constructed vector's xy components will be set to this value. + /// The constructed vector's zw components will be set to this value. + /// uint4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint2 xy, uint2 zw) { return new uint4(xy, zw); } + + /// Returns a uint4 vector constructed from a uint3 vector and a uint value. + /// The constructed vector's xyz components will be set to this value. + /// The constructed vector's w component will be set to this value. + /// uint4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint3 xyz, uint w) { return new uint4(xyz, w); } + + /// Returns a uint4 vector constructed from a uint4 vector. + /// The constructed vector's xyzw components will be set to this value. + /// uint4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint4 xyzw) { return new uint4(xyzw); } + + /// Returns a uint4 vector constructed from a single uint value by assigning it to every component. + /// uint to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(uint v) { return new uint4(v); } + + /// Returns a uint4 vector constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(bool v) { return new uint4(v); } + + /// Return a uint4 vector constructed from a bool4 vector by componentwise conversion. + /// bool4 to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(bool4 v) { return new uint4(v); } + + /// Returns a uint4 vector constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(int v) { return new uint4(v); } + + /// Return a uint4 vector constructed from a int4 vector by componentwise conversion. + /// int4 to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(int4 v) { return new uint4(v); } + + /// Returns a uint4 vector constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(float v) { return new uint4(v); } + + /// Return a uint4 vector constructed from a float4 vector by componentwise conversion. + /// float4 to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(float4 v) { return new uint4(v); } + + /// Returns a uint4 vector constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(double v) { return new uint4(v); } + + /// Return a uint4 vector constructed from a double4 vector by componentwise conversion. + /// double4 to convert to uint4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 uint4(double4 v) { return new uint4(v); } + + /// Returns a uint hash code of a uint4 vector. + /// Vector value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint4 v) + { + return csum(v * uint4(0xB492BF15u, 0xD37220E3u, 0x7AA2C2BDu, 0xE16BC89Du)) + 0x7AA07CD3u; + } + + /// + /// Returns a uint4 vector hash code of a uint4 vector. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Vector value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(uint4 v) + { + return (v * uint4(0xAF642BA9u, 0xA8F2213Bu, 0x9F3FDC37u, 0xAC60D0C3u)) + 0x9263662Fu; + } + + /// Returns the result of specified shuffling of the components from two uint4 vectors into a uint value. + /// uint4 to use as the left argument of the shuffle operation. + /// uint4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint. + /// uint result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint shuffle(uint4 left, uint4 right, ShuffleComponent x) + { + return select_shuffle_component(left, right, x); + } + + /// Returns the result of specified shuffling of the components from two uint4 vectors into a uint2 vector. + /// uint4 to use as the left argument of the shuffle operation. + /// uint4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint2 x component. + /// The ShuffleComponent to use when setting the resulting uint2 y component. + /// uint2 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2 shuffle(uint4 left, uint4 right, ShuffleComponent x, ShuffleComponent y) + { + return uint2( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y)); + } + + /// Returns the result of specified shuffling of the components from two uint4 vectors into a uint3 vector. + /// uint4 to use as the left argument of the shuffle operation. + /// uint4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint3 x component. + /// The ShuffleComponent to use when setting the resulting uint3 y component. + /// The ShuffleComponent to use when setting the resulting uint3 z component. + /// uint3 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3 shuffle(uint4 left, uint4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) + { + return uint3( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z)); + } + + /// Returns the result of specified shuffling of the components from two uint4 vectors into a uint4 vector. + /// uint4 to use as the left argument of the shuffle operation. + /// uint4 to use as the right argument of the shuffle operation. + /// The ShuffleComponent to use when setting the resulting uint4 x component. + /// The ShuffleComponent to use when setting the resulting uint4 y component. + /// The ShuffleComponent to use when setting the resulting uint4 z component. + /// The ShuffleComponent to use when setting the resulting uint4 w component. + /// uint4 result of the shuffle operation. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 shuffle(uint4 left, uint4 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) + { + return uint4( + select_shuffle_component(left, right, x), + select_shuffle_component(left, right, y), + select_shuffle_component(left, right, z), + select_shuffle_component(left, right, w)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static uint select_shuffle_component(uint4 a, uint4 b, ShuffleComponent component) + { + switch(component) + { + case ShuffleComponent.LeftX: + return a.x; + case ShuffleComponent.LeftY: + return a.y; + case ShuffleComponent.LeftZ: + return a.z; + case ShuffleComponent.LeftW: + return a.w; + case ShuffleComponent.RightX: + return b.x; + case ShuffleComponent.RightY: + return b.y; + case ShuffleComponent.RightZ: + return b.z; + case ShuffleComponent.RightW: + return b.w; + default: + throw new System.ArgumentException("Invalid shuffle component: " + component); + } + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint4x2.gen.cs b/ThirdParty/Unity.Mathematics/uint4x2.gen.cs new file mode 100644 index 0000000..29cbd50 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint4x2.gen.cs @@ -0,0 +1,726 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x2 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint4x2 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint4 c0; + /// Column 1 of the matrix. + public uint4 c1; + + /// uint4x2 zero value. + public static readonly uint4x2 zero; + + /// Constructs a uint4x2 matrix from two uint4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(uint4 c0, uint4 c1) + { + this.c0 = c0; + this.c1 = c1; + } + + /// Constructs a uint4x2 matrix from 8 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(uint m00, uint m01, + uint m10, uint m11, + uint m20, uint m21, + uint m30, uint m31) + { + this.c0 = new uint4(m00, m10, m20, m30); + this.c1 = new uint4(m01, m11, m21, m31); + } + + /// Constructs a uint4x2 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(uint v) + { + this.c0 = v; + this.c1 = v; + } + + /// Constructs a uint4x2 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(bool v) + { + this.c0 = math.select(new uint4(0u), new uint4(1u), v); + this.c1 = math.select(new uint4(0u), new uint4(1u), v); + } + + /// Constructs a uint4x2 matrix from a bool4x2 matrix by componentwise conversion. + /// bool4x2 to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(bool4x2 v) + { + this.c0 = math.select(new uint4(0u), new uint4(1u), v.c0); + this.c1 = math.select(new uint4(0u), new uint4(1u), v.c1); + } + + /// Constructs a uint4x2 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(int v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + } + + /// Constructs a uint4x2 matrix from a int4x2 matrix by componentwise conversion. + /// int4x2 to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(int4x2 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + } + + /// Constructs a uint4x2 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(float v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + } + + /// Constructs a uint4x2 matrix from a float4x2 matrix by componentwise conversion. + /// float4x2 to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(float4x2 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + } + + /// Constructs a uint4x2 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(double v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + } + + /// Constructs a uint4x2 matrix from a double4x2 matrix by componentwise conversion. + /// double4x2 to convert to uint4x2 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x2(double4x2 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + } + + + /// Implicitly converts a single uint value to a uint4x2 matrix by assigning it to every component. + /// uint to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint4x2(uint v) { return new uint4x2(v); } + + /// Explicitly converts a single bool value to a uint4x2 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x2(bool v) { return new uint4x2(v); } + + /// Explicitly converts a bool4x2 matrix to a uint4x2 matrix by componentwise conversion. + /// bool4x2 to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x2(bool4x2 v) { return new uint4x2(v); } + + /// Explicitly converts a single int value to a uint4x2 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x2(int v) { return new uint4x2(v); } + + /// Explicitly converts a int4x2 matrix to a uint4x2 matrix by componentwise conversion. + /// int4x2 to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x2(int4x2 v) { return new uint4x2(v); } + + /// Explicitly converts a single float value to a uint4x2 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x2(float v) { return new uint4x2(v); } + + /// Explicitly converts a float4x2 matrix to a uint4x2 matrix by componentwise conversion. + /// float4x2 to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x2(float4x2 v) { return new uint4x2(v); } + + /// Explicitly converts a single double value to a uint4x2 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x2(double v) { return new uint4x2(v); } + + /// Explicitly converts a double4x2 matrix to a uint4x2 matrix by componentwise conversion. + /// double4x2 to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x2(double4x2 v) { return new uint4x2(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise multiplication. + /// Right hand side uint4x2 to use to compute componentwise multiplication. + /// uint4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator * (uint4x2 lhs, uint4x2 rhs) { return new uint4x2 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1); } + + /// Returns the result of a componentwise multiplication operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator * (uint4x2 lhs, uint rhs) { return new uint4x2 (lhs.c0 * rhs, lhs.c1 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint4x2 to use to compute componentwise multiplication. + /// uint4x2 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator * (uint lhs, uint4x2 rhs) { return new uint4x2 (lhs * rhs.c0, lhs * rhs.c1); } + + + /// Returns the result of a componentwise addition operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise addition. + /// Right hand side uint4x2 to use to compute componentwise addition. + /// uint4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator + (uint4x2 lhs, uint4x2 rhs) { return new uint4x2 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1); } + + /// Returns the result of a componentwise addition operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator + (uint4x2 lhs, uint rhs) { return new uint4x2 (lhs.c0 + rhs, lhs.c1 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint4x2 to use to compute componentwise addition. + /// uint4x2 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator + (uint lhs, uint4x2 rhs) { return new uint4x2 (lhs + rhs.c0, lhs + rhs.c1); } + + + /// Returns the result of a componentwise subtraction operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise subtraction. + /// Right hand side uint4x2 to use to compute componentwise subtraction. + /// uint4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator - (uint4x2 lhs, uint4x2 rhs) { return new uint4x2 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1); } + + /// Returns the result of a componentwise subtraction operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator - (uint4x2 lhs, uint rhs) { return new uint4x2 (lhs.c0 - rhs, lhs.c1 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint4x2 to use to compute componentwise subtraction. + /// uint4x2 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator - (uint lhs, uint4x2 rhs) { return new uint4x2 (lhs - rhs.c0, lhs - rhs.c1); } + + + /// Returns the result of a componentwise division operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise division. + /// Right hand side uint4x2 to use to compute componentwise division. + /// uint4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator / (uint4x2 lhs, uint4x2 rhs) { return new uint4x2 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1); } + + /// Returns the result of a componentwise division operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator / (uint4x2 lhs, uint rhs) { return new uint4x2 (lhs.c0 / rhs, lhs.c1 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint4x2 to use to compute componentwise division. + /// uint4x2 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator / (uint lhs, uint4x2 rhs) { return new uint4x2 (lhs / rhs.c0, lhs / rhs.c1); } + + + /// Returns the result of a componentwise modulus operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise modulus. + /// Right hand side uint4x2 to use to compute componentwise modulus. + /// uint4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator % (uint4x2 lhs, uint4x2 rhs) { return new uint4x2 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1); } + + /// Returns the result of a componentwise modulus operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator % (uint4x2 lhs, uint rhs) { return new uint4x2 (lhs.c0 % rhs, lhs.c1 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint4x2 to use to compute componentwise modulus. + /// uint4x2 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator % (uint lhs, uint4x2 rhs) { return new uint4x2 (lhs % rhs.c0, lhs % rhs.c1); } + + + /// Returns the result of a componentwise increment operation on a uint4x2 matrix. + /// Value to use when computing the componentwise increment. + /// uint4x2 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator ++ (uint4x2 val) { return new uint4x2 (++val.c0, ++val.c1); } + + + /// Returns the result of a componentwise decrement operation on a uint4x2 matrix. + /// Value to use when computing the componentwise decrement. + /// uint4x2 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator -- (uint4x2 val) { return new uint4x2 (--val.c0, --val.c1); } + + + /// Returns the result of a componentwise less than operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise less than. + /// Right hand side uint4x2 to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (uint4x2 lhs, uint4x2 rhs) { return new bool4x2 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1); } + + /// Returns the result of a componentwise less than operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (uint4x2 lhs, uint rhs) { return new bool4x2 (lhs.c0 < rhs, lhs.c1 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint4x2 to use to compute componentwise less than. + /// bool4x2 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator < (uint lhs, uint4x2 rhs) { return new bool4x2 (lhs < rhs.c0, lhs < rhs.c1); } + + + /// Returns the result of a componentwise less or equal operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise less or equal. + /// Right hand side uint4x2 to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (uint4x2 lhs, uint4x2 rhs) { return new bool4x2 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1); } + + /// Returns the result of a componentwise less or equal operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (uint4x2 lhs, uint rhs) { return new bool4x2 (lhs.c0 <= rhs, lhs.c1 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint4x2 to use to compute componentwise less or equal. + /// bool4x2 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator <= (uint lhs, uint4x2 rhs) { return new bool4x2 (lhs <= rhs.c0, lhs <= rhs.c1); } + + + /// Returns the result of a componentwise greater than operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise greater than. + /// Right hand side uint4x2 to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (uint4x2 lhs, uint4x2 rhs) { return new bool4x2 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1); } + + /// Returns the result of a componentwise greater than operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (uint4x2 lhs, uint rhs) { return new bool4x2 (lhs.c0 > rhs, lhs.c1 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint4x2 to use to compute componentwise greater than. + /// bool4x2 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator > (uint lhs, uint4x2 rhs) { return new bool4x2 (lhs > rhs.c0, lhs > rhs.c1); } + + + /// Returns the result of a componentwise greater or equal operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise greater or equal. + /// Right hand side uint4x2 to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (uint4x2 lhs, uint4x2 rhs) { return new bool4x2 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1); } + + /// Returns the result of a componentwise greater or equal operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (uint4x2 lhs, uint rhs) { return new bool4x2 (lhs.c0 >= rhs, lhs.c1 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint4x2 to use to compute componentwise greater or equal. + /// bool4x2 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator >= (uint lhs, uint4x2 rhs) { return new bool4x2 (lhs >= rhs.c0, lhs >= rhs.c1); } + + + /// Returns the result of a componentwise unary minus operation on a uint4x2 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint4x2 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator - (uint4x2 val) { return new uint4x2 (-val.c0, -val.c1); } + + + /// Returns the result of a componentwise unary plus operation on a uint4x2 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint4x2 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator + (uint4x2 val) { return new uint4x2 (+val.c0, +val.c1); } + + + /// Returns the result of a componentwise left shift operation on a uint4x2 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator << (uint4x2 x, int n) { return new uint4x2 (x.c0 << n, x.c1 << n); } + + /// Returns the result of a componentwise right shift operation on a uint4x2 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator >> (uint4x2 x, int n) { return new uint4x2 (x.c0 >> n, x.c1 >> n); } + + /// Returns the result of a componentwise equality operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise equality. + /// Right hand side uint4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (uint4x2 lhs, uint4x2 rhs) { return new bool4x2 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1); } + + /// Returns the result of a componentwise equality operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (uint4x2 lhs, uint rhs) { return new bool4x2 (lhs.c0 == rhs, lhs.c1 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint4x2 to use to compute componentwise equality. + /// bool4x2 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator == (uint lhs, uint4x2 rhs) { return new bool4x2 (lhs == rhs.c0, lhs == rhs.c1); } + + + /// Returns the result of a componentwise not equal operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise not equal. + /// Right hand side uint4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (uint4x2 lhs, uint4x2 rhs) { return new bool4x2 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1); } + + /// Returns the result of a componentwise not equal operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (uint4x2 lhs, uint rhs) { return new bool4x2 (lhs.c0 != rhs, lhs.c1 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint4x2 to use to compute componentwise not equal. + /// bool4x2 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x2 operator != (uint lhs, uint4x2 rhs) { return new bool4x2 (lhs != rhs.c0, lhs != rhs.c1); } + + + /// Returns the result of a componentwise bitwise not operation on a uint4x2 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint4x2 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator ~ (uint4x2 val) { return new uint4x2 (~val.c0, ~val.c1); } + + + /// Returns the result of a componentwise bitwise and operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise bitwise and. + /// Right hand side uint4x2 to use to compute componentwise bitwise and. + /// uint4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator & (uint4x2 lhs, uint4x2 rhs) { return new uint4x2 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1); } + + /// Returns the result of a componentwise bitwise and operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator & (uint4x2 lhs, uint rhs) { return new uint4x2 (lhs.c0 & rhs, lhs.c1 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint4x2 to use to compute componentwise bitwise and. + /// uint4x2 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator & (uint lhs, uint4x2 rhs) { return new uint4x2 (lhs & rhs.c0, lhs & rhs.c1); } + + + /// Returns the result of a componentwise bitwise or operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise bitwise or. + /// Right hand side uint4x2 to use to compute componentwise bitwise or. + /// uint4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator | (uint4x2 lhs, uint4x2 rhs) { return new uint4x2 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1); } + + /// Returns the result of a componentwise bitwise or operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator | (uint4x2 lhs, uint rhs) { return new uint4x2 (lhs.c0 | rhs, lhs.c1 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint4x2 to use to compute componentwise bitwise or. + /// uint4x2 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator | (uint lhs, uint4x2 rhs) { return new uint4x2 (lhs | rhs.c0, lhs | rhs.c1); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint4x2 matrices. + /// Left hand side uint4x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint4x2 to use to compute componentwise bitwise exclusive or. + /// uint4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator ^ (uint4x2 lhs, uint4x2 rhs) { return new uint4x2 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint4x2 matrix and a uint value. + /// Left hand side uint4x2 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator ^ (uint4x2 lhs, uint rhs) { return new uint4x2 (lhs.c0 ^ rhs, lhs.c1 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint4x2 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint4x2 to use to compute componentwise bitwise exclusive or. + /// uint4x2 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 operator ^ (uint lhs, uint4x2 rhs) { return new uint4x2 (lhs ^ rhs.c0, lhs ^ rhs.c1); } + + + + /// Returns the uint4 element at a specified index. + unsafe public ref uint4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 2) + throw new System.ArgumentException("index must be between[0...1]"); +#endif + fixed (uint4x2* array = &this) { return ref ((uint4*)array)[index]; } + } + } + + /// Returns true if the uint4x2 is equal to a given uint4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint4x2 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1); } + + /// Returns true if the uint4x2 is equal to a given uint4x2, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint4x2 converted && Equals(converted); } + + + /// Returns a hash code for the uint4x2. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint4x2. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint4x2({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x, c1.x, c0.y, c1.y, c0.z, c1.z, c0.w, c1.w); + } + + /// Returns a string representation of the uint4x2 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint4x2({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint4x2 matrix constructed from two uint4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// uint4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(uint4 c0, uint4 c1) { return new uint4x2(c0, c1); } + + /// Returns a uint4x2 matrix constructed from from 8 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// uint4x2 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(uint m00, uint m01, + uint m10, uint m11, + uint m20, uint m21, + uint m30, uint m31) + { + return new uint4x2(m00, m01, + m10, m11, + m20, m21, + m30, m31); + } + + /// Returns a uint4x2 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(uint v) { return new uint4x2(v); } + + /// Returns a uint4x2 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(bool v) { return new uint4x2(v); } + + /// Return a uint4x2 matrix constructed from a bool4x2 matrix by componentwise conversion. + /// bool4x2 to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(bool4x2 v) { return new uint4x2(v); } + + /// Returns a uint4x2 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(int v) { return new uint4x2(v); } + + /// Return a uint4x2 matrix constructed from a int4x2 matrix by componentwise conversion. + /// int4x2 to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(int4x2 v) { return new uint4x2(v); } + + /// Returns a uint4x2 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(float v) { return new uint4x2(v); } + + /// Return a uint4x2 matrix constructed from a float4x2 matrix by componentwise conversion. + /// float4x2 to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(float4x2 v) { return new uint4x2(v); } + + /// Returns a uint4x2 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(double v) { return new uint4x2(v); } + + /// Return a uint4x2 matrix constructed from a double4x2 matrix by componentwise conversion. + /// double4x2 to convert to uint4x2 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x2 uint4x2(double4x2 v) { return new uint4x2(v); } + + /// Return the uint2x4 transpose of a uint4x2 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint2x4 transpose(uint4x2 v) + { + return uint2x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w); + } + + /// Returns a uint hash code of a uint4x2 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint4x2 v) + { + return csum(v.c0 * uint4(0xFA3A3285u, 0xAD55999Du, 0xDCDD5341u, 0x94DDD769u) + + v.c1 * uint4(0xA1E92D39u, 0x4583C801u, 0x9536A0F5u, 0xAF816615u)) + 0x9AF8D62Du; + } + + /// + /// Returns a uint4 vector hash code of a uint4x2 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(uint4x2 v) + { + return (v.c0 * uint4(0xE3600729u, 0x5F17300Du, 0x670D6809u, 0x7AF32C49u) + + v.c1 * uint4(0xAE131389u, 0x5D1B165Bu, 0x87096CD7u, 0x4C7F6DD1u)) + 0x4822A3E9u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint4x3.gen.cs b/ThirdParty/Unity.Mathematics/uint4x3.gen.cs new file mode 100644 index 0000000..0eede77 --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint4x3.gen.cs @@ -0,0 +1,752 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x3 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint4x3 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint4 c0; + /// Column 1 of the matrix. + public uint4 c1; + /// Column 2 of the matrix. + public uint4 c2; + + /// uint4x3 zero value. + public static readonly uint4x3 zero; + + /// Constructs a uint4x3 matrix from three uint4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(uint4 c0, uint4 c1, uint4 c2) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + } + + /// Constructs a uint4x3 matrix from 12 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(uint m00, uint m01, uint m02, + uint m10, uint m11, uint m12, + uint m20, uint m21, uint m22, + uint m30, uint m31, uint m32) + { + this.c0 = new uint4(m00, m10, m20, m30); + this.c1 = new uint4(m01, m11, m21, m31); + this.c2 = new uint4(m02, m12, m22, m32); + } + + /// Constructs a uint4x3 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + } + + /// Constructs a uint4x3 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(bool v) + { + this.c0 = math.select(new uint4(0u), new uint4(1u), v); + this.c1 = math.select(new uint4(0u), new uint4(1u), v); + this.c2 = math.select(new uint4(0u), new uint4(1u), v); + } + + /// Constructs a uint4x3 matrix from a bool4x3 matrix by componentwise conversion. + /// bool4x3 to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(bool4x3 v) + { + this.c0 = math.select(new uint4(0u), new uint4(1u), v.c0); + this.c1 = math.select(new uint4(0u), new uint4(1u), v.c1); + this.c2 = math.select(new uint4(0u), new uint4(1u), v.c2); + } + + /// Constructs a uint4x3 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(int v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + this.c2 = (uint4)v; + } + + /// Constructs a uint4x3 matrix from a int4x3 matrix by componentwise conversion. + /// int4x3 to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(int4x3 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + this.c2 = (uint4)v.c2; + } + + /// Constructs a uint4x3 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(float v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + this.c2 = (uint4)v; + } + + /// Constructs a uint4x3 matrix from a float4x3 matrix by componentwise conversion. + /// float4x3 to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(float4x3 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + this.c2 = (uint4)v.c2; + } + + /// Constructs a uint4x3 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(double v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + this.c2 = (uint4)v; + } + + /// Constructs a uint4x3 matrix from a double4x3 matrix by componentwise conversion. + /// double4x3 to convert to uint4x3 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x3(double4x3 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + this.c2 = (uint4)v.c2; + } + + + /// Implicitly converts a single uint value to a uint4x3 matrix by assigning it to every component. + /// uint to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint4x3(uint v) { return new uint4x3(v); } + + /// Explicitly converts a single bool value to a uint4x3 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x3(bool v) { return new uint4x3(v); } + + /// Explicitly converts a bool4x3 matrix to a uint4x3 matrix by componentwise conversion. + /// bool4x3 to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x3(bool4x3 v) { return new uint4x3(v); } + + /// Explicitly converts a single int value to a uint4x3 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x3(int v) { return new uint4x3(v); } + + /// Explicitly converts a int4x3 matrix to a uint4x3 matrix by componentwise conversion. + /// int4x3 to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x3(int4x3 v) { return new uint4x3(v); } + + /// Explicitly converts a single float value to a uint4x3 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x3(float v) { return new uint4x3(v); } + + /// Explicitly converts a float4x3 matrix to a uint4x3 matrix by componentwise conversion. + /// float4x3 to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x3(float4x3 v) { return new uint4x3(v); } + + /// Explicitly converts a single double value to a uint4x3 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x3(double v) { return new uint4x3(v); } + + /// Explicitly converts a double4x3 matrix to a uint4x3 matrix by componentwise conversion. + /// double4x3 to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x3(double4x3 v) { return new uint4x3(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise multiplication. + /// Right hand side uint4x3 to use to compute componentwise multiplication. + /// uint4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator * (uint4x3 lhs, uint4x3 rhs) { return new uint4x3 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2); } + + /// Returns the result of a componentwise multiplication operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator * (uint4x3 lhs, uint rhs) { return new uint4x3 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint4x3 to use to compute componentwise multiplication. + /// uint4x3 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator * (uint lhs, uint4x3 rhs) { return new uint4x3 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2); } + + + /// Returns the result of a componentwise addition operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise addition. + /// Right hand side uint4x3 to use to compute componentwise addition. + /// uint4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator + (uint4x3 lhs, uint4x3 rhs) { return new uint4x3 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2); } + + /// Returns the result of a componentwise addition operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator + (uint4x3 lhs, uint rhs) { return new uint4x3 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint4x3 to use to compute componentwise addition. + /// uint4x3 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator + (uint lhs, uint4x3 rhs) { return new uint4x3 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2); } + + + /// Returns the result of a componentwise subtraction operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise subtraction. + /// Right hand side uint4x3 to use to compute componentwise subtraction. + /// uint4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator - (uint4x3 lhs, uint4x3 rhs) { return new uint4x3 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2); } + + /// Returns the result of a componentwise subtraction operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator - (uint4x3 lhs, uint rhs) { return new uint4x3 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint4x3 to use to compute componentwise subtraction. + /// uint4x3 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator - (uint lhs, uint4x3 rhs) { return new uint4x3 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2); } + + + /// Returns the result of a componentwise division operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise division. + /// Right hand side uint4x3 to use to compute componentwise division. + /// uint4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator / (uint4x3 lhs, uint4x3 rhs) { return new uint4x3 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2); } + + /// Returns the result of a componentwise division operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator / (uint4x3 lhs, uint rhs) { return new uint4x3 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint4x3 to use to compute componentwise division. + /// uint4x3 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator / (uint lhs, uint4x3 rhs) { return new uint4x3 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2); } + + + /// Returns the result of a componentwise modulus operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise modulus. + /// Right hand side uint4x3 to use to compute componentwise modulus. + /// uint4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator % (uint4x3 lhs, uint4x3 rhs) { return new uint4x3 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2); } + + /// Returns the result of a componentwise modulus operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator % (uint4x3 lhs, uint rhs) { return new uint4x3 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint4x3 to use to compute componentwise modulus. + /// uint4x3 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator % (uint lhs, uint4x3 rhs) { return new uint4x3 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2); } + + + /// Returns the result of a componentwise increment operation on a uint4x3 matrix. + /// Value to use when computing the componentwise increment. + /// uint4x3 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator ++ (uint4x3 val) { return new uint4x3 (++val.c0, ++val.c1, ++val.c2); } + + + /// Returns the result of a componentwise decrement operation on a uint4x3 matrix. + /// Value to use when computing the componentwise decrement. + /// uint4x3 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator -- (uint4x3 val) { return new uint4x3 (--val.c0, --val.c1, --val.c2); } + + + /// Returns the result of a componentwise less than operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise less than. + /// Right hand side uint4x3 to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (uint4x3 lhs, uint4x3 rhs) { return new bool4x3 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2); } + + /// Returns the result of a componentwise less than operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (uint4x3 lhs, uint rhs) { return new bool4x3 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint4x3 to use to compute componentwise less than. + /// bool4x3 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator < (uint lhs, uint4x3 rhs) { return new bool4x3 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2); } + + + /// Returns the result of a componentwise less or equal operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise less or equal. + /// Right hand side uint4x3 to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (uint4x3 lhs, uint4x3 rhs) { return new bool4x3 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2); } + + /// Returns the result of a componentwise less or equal operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (uint4x3 lhs, uint rhs) { return new bool4x3 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint4x3 to use to compute componentwise less or equal. + /// bool4x3 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator <= (uint lhs, uint4x3 rhs) { return new bool4x3 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2); } + + + /// Returns the result of a componentwise greater than operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise greater than. + /// Right hand side uint4x3 to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (uint4x3 lhs, uint4x3 rhs) { return new bool4x3 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2); } + + /// Returns the result of a componentwise greater than operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (uint4x3 lhs, uint rhs) { return new bool4x3 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint4x3 to use to compute componentwise greater than. + /// bool4x3 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator > (uint lhs, uint4x3 rhs) { return new bool4x3 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2); } + + + /// Returns the result of a componentwise greater or equal operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise greater or equal. + /// Right hand side uint4x3 to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (uint4x3 lhs, uint4x3 rhs) { return new bool4x3 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2); } + + /// Returns the result of a componentwise greater or equal operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (uint4x3 lhs, uint rhs) { return new bool4x3 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint4x3 to use to compute componentwise greater or equal. + /// bool4x3 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator >= (uint lhs, uint4x3 rhs) { return new bool4x3 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2); } + + + /// Returns the result of a componentwise unary minus operation on a uint4x3 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint4x3 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator - (uint4x3 val) { return new uint4x3 (-val.c0, -val.c1, -val.c2); } + + + /// Returns the result of a componentwise unary plus operation on a uint4x3 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint4x3 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator + (uint4x3 val) { return new uint4x3 (+val.c0, +val.c1, +val.c2); } + + + /// Returns the result of a componentwise left shift operation on a uint4x3 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator << (uint4x3 x, int n) { return new uint4x3 (x.c0 << n, x.c1 << n, x.c2 << n); } + + /// Returns the result of a componentwise right shift operation on a uint4x3 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator >> (uint4x3 x, int n) { return new uint4x3 (x.c0 >> n, x.c1 >> n, x.c2 >> n); } + + /// Returns the result of a componentwise equality operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise equality. + /// Right hand side uint4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (uint4x3 lhs, uint4x3 rhs) { return new bool4x3 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2); } + + /// Returns the result of a componentwise equality operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (uint4x3 lhs, uint rhs) { return new bool4x3 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint4x3 to use to compute componentwise equality. + /// bool4x3 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator == (uint lhs, uint4x3 rhs) { return new bool4x3 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2); } + + + /// Returns the result of a componentwise not equal operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise not equal. + /// Right hand side uint4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (uint4x3 lhs, uint4x3 rhs) { return new bool4x3 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2); } + + /// Returns the result of a componentwise not equal operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (uint4x3 lhs, uint rhs) { return new bool4x3 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint4x3 to use to compute componentwise not equal. + /// bool4x3 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x3 operator != (uint lhs, uint4x3 rhs) { return new bool4x3 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2); } + + + /// Returns the result of a componentwise bitwise not operation on a uint4x3 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint4x3 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator ~ (uint4x3 val) { return new uint4x3 (~val.c0, ~val.c1, ~val.c2); } + + + /// Returns the result of a componentwise bitwise and operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise bitwise and. + /// Right hand side uint4x3 to use to compute componentwise bitwise and. + /// uint4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator & (uint4x3 lhs, uint4x3 rhs) { return new uint4x3 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2); } + + /// Returns the result of a componentwise bitwise and operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator & (uint4x3 lhs, uint rhs) { return new uint4x3 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint4x3 to use to compute componentwise bitwise and. + /// uint4x3 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator & (uint lhs, uint4x3 rhs) { return new uint4x3 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2); } + + + /// Returns the result of a componentwise bitwise or operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise bitwise or. + /// Right hand side uint4x3 to use to compute componentwise bitwise or. + /// uint4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator | (uint4x3 lhs, uint4x3 rhs) { return new uint4x3 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2); } + + /// Returns the result of a componentwise bitwise or operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator | (uint4x3 lhs, uint rhs) { return new uint4x3 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint4x3 to use to compute componentwise bitwise or. + /// uint4x3 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator | (uint lhs, uint4x3 rhs) { return new uint4x3 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint4x3 matrices. + /// Left hand side uint4x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint4x3 to use to compute componentwise bitwise exclusive or. + /// uint4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator ^ (uint4x3 lhs, uint4x3 rhs) { return new uint4x3 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint4x3 matrix and a uint value. + /// Left hand side uint4x3 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator ^ (uint4x3 lhs, uint rhs) { return new uint4x3 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint4x3 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint4x3 to use to compute componentwise bitwise exclusive or. + /// uint4x3 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 operator ^ (uint lhs, uint4x3 rhs) { return new uint4x3 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2); } + + + + /// Returns the uint4 element at a specified index. + unsafe public ref uint4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 3) + throw new System.ArgumentException("index must be between[0...2]"); +#endif + fixed (uint4x3* array = &this) { return ref ((uint4*)array)[index]; } + } + } + + /// Returns true if the uint4x3 is equal to a given uint4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint4x3 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2); } + + /// Returns true if the uint4x3 is equal to a given uint4x3, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint4x3 converted && Equals(converted); } + + + /// Returns a hash code for the uint4x3. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint4x3. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint4x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x, c1.x, c2.x, c0.y, c1.y, c2.y, c0.z, c1.z, c2.z, c0.w, c1.w, c2.w); + } + + /// Returns a string representation of the uint4x3 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint4x3({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider), c2.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint4x3 matrix constructed from three uint4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// uint4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(uint4 c0, uint4 c1, uint4 c2) { return new uint4x3(c0, c1, c2); } + + /// Returns a uint4x3 matrix constructed from from 12 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// uint4x3 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(uint m00, uint m01, uint m02, + uint m10, uint m11, uint m12, + uint m20, uint m21, uint m22, + uint m30, uint m31, uint m32) + { + return new uint4x3(m00, m01, m02, + m10, m11, m12, + m20, m21, m22, + m30, m31, m32); + } + + /// Returns a uint4x3 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(uint v) { return new uint4x3(v); } + + /// Returns a uint4x3 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(bool v) { return new uint4x3(v); } + + /// Return a uint4x3 matrix constructed from a bool4x3 matrix by componentwise conversion. + /// bool4x3 to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(bool4x3 v) { return new uint4x3(v); } + + /// Returns a uint4x3 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(int v) { return new uint4x3(v); } + + /// Return a uint4x3 matrix constructed from a int4x3 matrix by componentwise conversion. + /// int4x3 to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(int4x3 v) { return new uint4x3(v); } + + /// Returns a uint4x3 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(float v) { return new uint4x3(v); } + + /// Return a uint4x3 matrix constructed from a float4x3 matrix by componentwise conversion. + /// float4x3 to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(float4x3 v) { return new uint4x3(v); } + + /// Returns a uint4x3 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(double v) { return new uint4x3(v); } + + /// Return a uint4x3 matrix constructed from a double4x3 matrix by componentwise conversion. + /// double4x3 to convert to uint4x3 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x3 uint4x3(double4x3 v) { return new uint4x3(v); } + + /// Return the uint3x4 transpose of a uint4x3 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint3x4 transpose(uint4x3 v) + { + return uint3x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w); + } + + /// Returns a uint hash code of a uint4x3 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint4x3 v) + { + return csum(v.c0 * uint4(0xE7579997u, 0xEF7D56C7u, 0x66F38F0Bu, 0x624256A3u) + + v.c1 * uint4(0x5292ADE1u, 0xD2E590E5u, 0xF25BE857u, 0x9BC17CE7u) + + v.c2 * uint4(0xC8B86851u, 0x64095221u, 0xADF428FFu, 0xA3977109u)) + 0x745ED837u; + } + + /// + /// Returns a uint4 vector hash code of a uint4x3 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(uint4x3 v) + { + return (v.c0 * uint4(0x9CDC88F5u, 0xFA62D721u, 0x7E4DB1CFu, 0x68EEE0F5u) + + v.c1 * uint4(0xBC3B0A59u, 0x816EFB5Du, 0xA24E82B7u, 0x45A22087u) + + v.c2 * uint4(0xFC104C3Bu, 0x5FFF6B19u, 0x5E6CBF3Bu, 0xB546F2A5u)) + 0xBBCF63E7u; + } + + } +} diff --git a/ThirdParty/Unity.Mathematics/uint4x4.gen.cs b/ThirdParty/Unity.Mathematics/uint4x4.gen.cs new file mode 100644 index 0000000..566373b --- /dev/null +++ b/ThirdParty/Unity.Mathematics/uint4x4.gen.cs @@ -0,0 +1,781 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. To update the generation of this file, modify and re-run Unity.Mathematics.CodeGen. +// +//------------------------------------------------------------------------------ +using System; +using System.Runtime.CompilerServices; +using Unity.IL2CPP.CompilerServices; + +#pragma warning disable 0660, 0661 + +namespace Unity.Mathematics +{ + /// A 4x4 matrix of uints. + [System.Serializable] + [Il2CppEagerStaticClassConstruction] + public partial struct uint4x4 : System.IEquatable, IFormattable + { + /// Column 0 of the matrix. + public uint4 c0; + /// Column 1 of the matrix. + public uint4 c1; + /// Column 2 of the matrix. + public uint4 c2; + /// Column 3 of the matrix. + public uint4 c3; + + /// uint4x4 identity transform. + public static readonly uint4x4 identity = new uint4x4(1u, 0u, 0u, 0u, 0u, 1u, 0u, 0u, 0u, 0u, 1u, 0u, 0u, 0u, 0u, 1u); + + /// uint4x4 zero value. + public static readonly uint4x4 zero; + + /// Constructs a uint4x4 matrix from four uint4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(uint4 c0, uint4 c1, uint4 c2, uint4 c3) + { + this.c0 = c0; + this.c1 = c1; + this.c2 = c2; + this.c3 = c3; + } + + /// Constructs a uint4x4 matrix from 16 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(uint m00, uint m01, uint m02, uint m03, + uint m10, uint m11, uint m12, uint m13, + uint m20, uint m21, uint m22, uint m23, + uint m30, uint m31, uint m32, uint m33) + { + this.c0 = new uint4(m00, m10, m20, m30); + this.c1 = new uint4(m01, m11, m21, m31); + this.c2 = new uint4(m02, m12, m22, m32); + this.c3 = new uint4(m03, m13, m23, m33); + } + + /// Constructs a uint4x4 matrix from a single uint value by assigning it to every component. + /// uint to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(uint v) + { + this.c0 = v; + this.c1 = v; + this.c2 = v; + this.c3 = v; + } + + /// Constructs a uint4x4 matrix from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(bool v) + { + this.c0 = math.select(new uint4(0u), new uint4(1u), v); + this.c1 = math.select(new uint4(0u), new uint4(1u), v); + this.c2 = math.select(new uint4(0u), new uint4(1u), v); + this.c3 = math.select(new uint4(0u), new uint4(1u), v); + } + + /// Constructs a uint4x4 matrix from a bool4x4 matrix by componentwise conversion. + /// bool4x4 to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(bool4x4 v) + { + this.c0 = math.select(new uint4(0u), new uint4(1u), v.c0); + this.c1 = math.select(new uint4(0u), new uint4(1u), v.c1); + this.c2 = math.select(new uint4(0u), new uint4(1u), v.c2); + this.c3 = math.select(new uint4(0u), new uint4(1u), v.c3); + } + + /// Constructs a uint4x4 matrix from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(int v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + this.c2 = (uint4)v; + this.c3 = (uint4)v; + } + + /// Constructs a uint4x4 matrix from a int4x4 matrix by componentwise conversion. + /// int4x4 to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(int4x4 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + this.c2 = (uint4)v.c2; + this.c3 = (uint4)v.c3; + } + + /// Constructs a uint4x4 matrix from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(float v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + this.c2 = (uint4)v; + this.c3 = (uint4)v; + } + + /// Constructs a uint4x4 matrix from a float4x4 matrix by componentwise conversion. + /// float4x4 to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(float4x4 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + this.c2 = (uint4)v.c2; + this.c3 = (uint4)v.c3; + } + + /// Constructs a uint4x4 matrix from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(double v) + { + this.c0 = (uint4)v; + this.c1 = (uint4)v; + this.c2 = (uint4)v; + this.c3 = (uint4)v; + } + + /// Constructs a uint4x4 matrix from a double4x4 matrix by componentwise conversion. + /// double4x4 to convert to uint4x4 + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint4x4(double4x4 v) + { + this.c0 = (uint4)v.c0; + this.c1 = (uint4)v.c1; + this.c2 = (uint4)v.c2; + this.c3 = (uint4)v.c3; + } + + + /// Implicitly converts a single uint value to a uint4x4 matrix by assigning it to every component. + /// uint to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator uint4x4(uint v) { return new uint4x4(v); } + + /// Explicitly converts a single bool value to a uint4x4 matrix by converting it to uint and assigning it to every component. + /// bool to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x4(bool v) { return new uint4x4(v); } + + /// Explicitly converts a bool4x4 matrix to a uint4x4 matrix by componentwise conversion. + /// bool4x4 to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x4(bool4x4 v) { return new uint4x4(v); } + + /// Explicitly converts a single int value to a uint4x4 matrix by converting it to uint and assigning it to every component. + /// int to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x4(int v) { return new uint4x4(v); } + + /// Explicitly converts a int4x4 matrix to a uint4x4 matrix by componentwise conversion. + /// int4x4 to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x4(int4x4 v) { return new uint4x4(v); } + + /// Explicitly converts a single float value to a uint4x4 matrix by converting it to uint and assigning it to every component. + /// float to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x4(float v) { return new uint4x4(v); } + + /// Explicitly converts a float4x4 matrix to a uint4x4 matrix by componentwise conversion. + /// float4x4 to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x4(float4x4 v) { return new uint4x4(v); } + + /// Explicitly converts a single double value to a uint4x4 matrix by converting it to uint and assigning it to every component. + /// double to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x4(double v) { return new uint4x4(v); } + + /// Explicitly converts a double4x4 matrix to a uint4x4 matrix by componentwise conversion. + /// double4x4 to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static explicit operator uint4x4(double4x4 v) { return new uint4x4(v); } + + + /// Returns the result of a componentwise multiplication operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise multiplication. + /// Right hand side uint4x4 to use to compute componentwise multiplication. + /// uint4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator * (uint4x4 lhs, uint4x4 rhs) { return new uint4x4 (lhs.c0 * rhs.c0, lhs.c1 * rhs.c1, lhs.c2 * rhs.c2, lhs.c3 * rhs.c3); } + + /// Returns the result of a componentwise multiplication operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise multiplication. + /// Right hand side uint to use to compute componentwise multiplication. + /// uint4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator * (uint4x4 lhs, uint rhs) { return new uint4x4 (lhs.c0 * rhs, lhs.c1 * rhs, lhs.c2 * rhs, lhs.c3 * rhs); } + + /// Returns the result of a componentwise multiplication operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise multiplication. + /// Right hand side uint4x4 to use to compute componentwise multiplication. + /// uint4x4 result of the componentwise multiplication. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator * (uint lhs, uint4x4 rhs) { return new uint4x4 (lhs * rhs.c0, lhs * rhs.c1, lhs * rhs.c2, lhs * rhs.c3); } + + + /// Returns the result of a componentwise addition operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise addition. + /// Right hand side uint4x4 to use to compute componentwise addition. + /// uint4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator + (uint4x4 lhs, uint4x4 rhs) { return new uint4x4 (lhs.c0 + rhs.c0, lhs.c1 + rhs.c1, lhs.c2 + rhs.c2, lhs.c3 + rhs.c3); } + + /// Returns the result of a componentwise addition operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise addition. + /// Right hand side uint to use to compute componentwise addition. + /// uint4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator + (uint4x4 lhs, uint rhs) { return new uint4x4 (lhs.c0 + rhs, lhs.c1 + rhs, lhs.c2 + rhs, lhs.c3 + rhs); } + + /// Returns the result of a componentwise addition operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise addition. + /// Right hand side uint4x4 to use to compute componentwise addition. + /// uint4x4 result of the componentwise addition. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator + (uint lhs, uint4x4 rhs) { return new uint4x4 (lhs + rhs.c0, lhs + rhs.c1, lhs + rhs.c2, lhs + rhs.c3); } + + + /// Returns the result of a componentwise subtraction operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise subtraction. + /// Right hand side uint4x4 to use to compute componentwise subtraction. + /// uint4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator - (uint4x4 lhs, uint4x4 rhs) { return new uint4x4 (lhs.c0 - rhs.c0, lhs.c1 - rhs.c1, lhs.c2 - rhs.c2, lhs.c3 - rhs.c3); } + + /// Returns the result of a componentwise subtraction operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise subtraction. + /// Right hand side uint to use to compute componentwise subtraction. + /// uint4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator - (uint4x4 lhs, uint rhs) { return new uint4x4 (lhs.c0 - rhs, lhs.c1 - rhs, lhs.c2 - rhs, lhs.c3 - rhs); } + + /// Returns the result of a componentwise subtraction operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise subtraction. + /// Right hand side uint4x4 to use to compute componentwise subtraction. + /// uint4x4 result of the componentwise subtraction. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator - (uint lhs, uint4x4 rhs) { return new uint4x4 (lhs - rhs.c0, lhs - rhs.c1, lhs - rhs.c2, lhs - rhs.c3); } + + + /// Returns the result of a componentwise division operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise division. + /// Right hand side uint4x4 to use to compute componentwise division. + /// uint4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator / (uint4x4 lhs, uint4x4 rhs) { return new uint4x4 (lhs.c0 / rhs.c0, lhs.c1 / rhs.c1, lhs.c2 / rhs.c2, lhs.c3 / rhs.c3); } + + /// Returns the result of a componentwise division operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise division. + /// Right hand side uint to use to compute componentwise division. + /// uint4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator / (uint4x4 lhs, uint rhs) { return new uint4x4 (lhs.c0 / rhs, lhs.c1 / rhs, lhs.c2 / rhs, lhs.c3 / rhs); } + + /// Returns the result of a componentwise division operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise division. + /// Right hand side uint4x4 to use to compute componentwise division. + /// uint4x4 result of the componentwise division. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator / (uint lhs, uint4x4 rhs) { return new uint4x4 (lhs / rhs.c0, lhs / rhs.c1, lhs / rhs.c2, lhs / rhs.c3); } + + + /// Returns the result of a componentwise modulus operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise modulus. + /// Right hand side uint4x4 to use to compute componentwise modulus. + /// uint4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator % (uint4x4 lhs, uint4x4 rhs) { return new uint4x4 (lhs.c0 % rhs.c0, lhs.c1 % rhs.c1, lhs.c2 % rhs.c2, lhs.c3 % rhs.c3); } + + /// Returns the result of a componentwise modulus operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise modulus. + /// Right hand side uint to use to compute componentwise modulus. + /// uint4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator % (uint4x4 lhs, uint rhs) { return new uint4x4 (lhs.c0 % rhs, lhs.c1 % rhs, lhs.c2 % rhs, lhs.c3 % rhs); } + + /// Returns the result of a componentwise modulus operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise modulus. + /// Right hand side uint4x4 to use to compute componentwise modulus. + /// uint4x4 result of the componentwise modulus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator % (uint lhs, uint4x4 rhs) { return new uint4x4 (lhs % rhs.c0, lhs % rhs.c1, lhs % rhs.c2, lhs % rhs.c3); } + + + /// Returns the result of a componentwise increment operation on a uint4x4 matrix. + /// Value to use when computing the componentwise increment. + /// uint4x4 result of the componentwise increment. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator ++ (uint4x4 val) { return new uint4x4 (++val.c0, ++val.c1, ++val.c2, ++val.c3); } + + + /// Returns the result of a componentwise decrement operation on a uint4x4 matrix. + /// Value to use when computing the componentwise decrement. + /// uint4x4 result of the componentwise decrement. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator -- (uint4x4 val) { return new uint4x4 (--val.c0, --val.c1, --val.c2, --val.c3); } + + + /// Returns the result of a componentwise less than operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise less than. + /// Right hand side uint4x4 to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (uint4x4 lhs, uint4x4 rhs) { return new bool4x4 (lhs.c0 < rhs.c0, lhs.c1 < rhs.c1, lhs.c2 < rhs.c2, lhs.c3 < rhs.c3); } + + /// Returns the result of a componentwise less than operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise less than. + /// Right hand side uint to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (uint4x4 lhs, uint rhs) { return new bool4x4 (lhs.c0 < rhs, lhs.c1 < rhs, lhs.c2 < rhs, lhs.c3 < rhs); } + + /// Returns the result of a componentwise less than operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise less than. + /// Right hand side uint4x4 to use to compute componentwise less than. + /// bool4x4 result of the componentwise less than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator < (uint lhs, uint4x4 rhs) { return new bool4x4 (lhs < rhs.c0, lhs < rhs.c1, lhs < rhs.c2, lhs < rhs.c3); } + + + /// Returns the result of a componentwise less or equal operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise less or equal. + /// Right hand side uint4x4 to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (uint4x4 lhs, uint4x4 rhs) { return new bool4x4 (lhs.c0 <= rhs.c0, lhs.c1 <= rhs.c1, lhs.c2 <= rhs.c2, lhs.c3 <= rhs.c3); } + + /// Returns the result of a componentwise less or equal operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise less or equal. + /// Right hand side uint to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (uint4x4 lhs, uint rhs) { return new bool4x4 (lhs.c0 <= rhs, lhs.c1 <= rhs, lhs.c2 <= rhs, lhs.c3 <= rhs); } + + /// Returns the result of a componentwise less or equal operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise less or equal. + /// Right hand side uint4x4 to use to compute componentwise less or equal. + /// bool4x4 result of the componentwise less or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator <= (uint lhs, uint4x4 rhs) { return new bool4x4 (lhs <= rhs.c0, lhs <= rhs.c1, lhs <= rhs.c2, lhs <= rhs.c3); } + + + /// Returns the result of a componentwise greater than operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise greater than. + /// Right hand side uint4x4 to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (uint4x4 lhs, uint4x4 rhs) { return new bool4x4 (lhs.c0 > rhs.c0, lhs.c1 > rhs.c1, lhs.c2 > rhs.c2, lhs.c3 > rhs.c3); } + + /// Returns the result of a componentwise greater than operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise greater than. + /// Right hand side uint to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (uint4x4 lhs, uint rhs) { return new bool4x4 (lhs.c0 > rhs, lhs.c1 > rhs, lhs.c2 > rhs, lhs.c3 > rhs); } + + /// Returns the result of a componentwise greater than operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise greater than. + /// Right hand side uint4x4 to use to compute componentwise greater than. + /// bool4x4 result of the componentwise greater than. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator > (uint lhs, uint4x4 rhs) { return new bool4x4 (lhs > rhs.c0, lhs > rhs.c1, lhs > rhs.c2, lhs > rhs.c3); } + + + /// Returns the result of a componentwise greater or equal operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise greater or equal. + /// Right hand side uint4x4 to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (uint4x4 lhs, uint4x4 rhs) { return new bool4x4 (lhs.c0 >= rhs.c0, lhs.c1 >= rhs.c1, lhs.c2 >= rhs.c2, lhs.c3 >= rhs.c3); } + + /// Returns the result of a componentwise greater or equal operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise greater or equal. + /// Right hand side uint to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (uint4x4 lhs, uint rhs) { return new bool4x4 (lhs.c0 >= rhs, lhs.c1 >= rhs, lhs.c2 >= rhs, lhs.c3 >= rhs); } + + /// Returns the result of a componentwise greater or equal operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise greater or equal. + /// Right hand side uint4x4 to use to compute componentwise greater or equal. + /// bool4x4 result of the componentwise greater or equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator >= (uint lhs, uint4x4 rhs) { return new bool4x4 (lhs >= rhs.c0, lhs >= rhs.c1, lhs >= rhs.c2, lhs >= rhs.c3); } + + + /// Returns the result of a componentwise unary minus operation on a uint4x4 matrix. + /// Value to use when computing the componentwise unary minus. + /// uint4x4 result of the componentwise unary minus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator - (uint4x4 val) { return new uint4x4 (-val.c0, -val.c1, -val.c2, -val.c3); } + + + /// Returns the result of a componentwise unary plus operation on a uint4x4 matrix. + /// Value to use when computing the componentwise unary plus. + /// uint4x4 result of the componentwise unary plus. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator + (uint4x4 val) { return new uint4x4 (+val.c0, +val.c1, +val.c2, +val.c3); } + + + /// Returns the result of a componentwise left shift operation on a uint4x4 matrix by a number of bits specified by a single int. + /// The matrix to left shift. + /// The number of bits to left shift. + /// The result of the componentwise left shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator << (uint4x4 x, int n) { return new uint4x4 (x.c0 << n, x.c1 << n, x.c2 << n, x.c3 << n); } + + /// Returns the result of a componentwise right shift operation on a uint4x4 matrix by a number of bits specified by a single int. + /// The matrix to right shift. + /// The number of bits to right shift. + /// The result of the componentwise right shift. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator >> (uint4x4 x, int n) { return new uint4x4 (x.c0 >> n, x.c1 >> n, x.c2 >> n, x.c3 >> n); } + + /// Returns the result of a componentwise equality operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise equality. + /// Right hand side uint4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (uint4x4 lhs, uint4x4 rhs) { return new bool4x4 (lhs.c0 == rhs.c0, lhs.c1 == rhs.c1, lhs.c2 == rhs.c2, lhs.c3 == rhs.c3); } + + /// Returns the result of a componentwise equality operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise equality. + /// Right hand side uint to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (uint4x4 lhs, uint rhs) { return new bool4x4 (lhs.c0 == rhs, lhs.c1 == rhs, lhs.c2 == rhs, lhs.c3 == rhs); } + + /// Returns the result of a componentwise equality operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise equality. + /// Right hand side uint4x4 to use to compute componentwise equality. + /// bool4x4 result of the componentwise equality. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator == (uint lhs, uint4x4 rhs) { return new bool4x4 (lhs == rhs.c0, lhs == rhs.c1, lhs == rhs.c2, lhs == rhs.c3); } + + + /// Returns the result of a componentwise not equal operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise not equal. + /// Right hand side uint4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (uint4x4 lhs, uint4x4 rhs) { return new bool4x4 (lhs.c0 != rhs.c0, lhs.c1 != rhs.c1, lhs.c2 != rhs.c2, lhs.c3 != rhs.c3); } + + /// Returns the result of a componentwise not equal operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise not equal. + /// Right hand side uint to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (uint4x4 lhs, uint rhs) { return new bool4x4 (lhs.c0 != rhs, lhs.c1 != rhs, lhs.c2 != rhs, lhs.c3 != rhs); } + + /// Returns the result of a componentwise not equal operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise not equal. + /// Right hand side uint4x4 to use to compute componentwise not equal. + /// bool4x4 result of the componentwise not equal. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool4x4 operator != (uint lhs, uint4x4 rhs) { return new bool4x4 (lhs != rhs.c0, lhs != rhs.c1, lhs != rhs.c2, lhs != rhs.c3); } + + + /// Returns the result of a componentwise bitwise not operation on a uint4x4 matrix. + /// Value to use when computing the componentwise bitwise not. + /// uint4x4 result of the componentwise bitwise not. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator ~ (uint4x4 val) { return new uint4x4 (~val.c0, ~val.c1, ~val.c2, ~val.c3); } + + + /// Returns the result of a componentwise bitwise and operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise bitwise and. + /// Right hand side uint4x4 to use to compute componentwise bitwise and. + /// uint4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator & (uint4x4 lhs, uint4x4 rhs) { return new uint4x4 (lhs.c0 & rhs.c0, lhs.c1 & rhs.c1, lhs.c2 & rhs.c2, lhs.c3 & rhs.c3); } + + /// Returns the result of a componentwise bitwise and operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise bitwise and. + /// Right hand side uint to use to compute componentwise bitwise and. + /// uint4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator & (uint4x4 lhs, uint rhs) { return new uint4x4 (lhs.c0 & rhs, lhs.c1 & rhs, lhs.c2 & rhs, lhs.c3 & rhs); } + + /// Returns the result of a componentwise bitwise and operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise and. + /// Right hand side uint4x4 to use to compute componentwise bitwise and. + /// uint4x4 result of the componentwise bitwise and. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator & (uint lhs, uint4x4 rhs) { return new uint4x4 (lhs & rhs.c0, lhs & rhs.c1, lhs & rhs.c2, lhs & rhs.c3); } + + + /// Returns the result of a componentwise bitwise or operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise bitwise or. + /// Right hand side uint4x4 to use to compute componentwise bitwise or. + /// uint4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator | (uint4x4 lhs, uint4x4 rhs) { return new uint4x4 (lhs.c0 | rhs.c0, lhs.c1 | rhs.c1, lhs.c2 | rhs.c2, lhs.c3 | rhs.c3); } + + /// Returns the result of a componentwise bitwise or operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise bitwise or. + /// Right hand side uint to use to compute componentwise bitwise or. + /// uint4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator | (uint4x4 lhs, uint rhs) { return new uint4x4 (lhs.c0 | rhs, lhs.c1 | rhs, lhs.c2 | rhs, lhs.c3 | rhs); } + + /// Returns the result of a componentwise bitwise or operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise or. + /// Right hand side uint4x4 to use to compute componentwise bitwise or. + /// uint4x4 result of the componentwise bitwise or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator | (uint lhs, uint4x4 rhs) { return new uint4x4 (lhs | rhs.c0, lhs | rhs.c1, lhs | rhs.c2, lhs | rhs.c3); } + + + /// Returns the result of a componentwise bitwise exclusive or operation on two uint4x4 matrices. + /// Left hand side uint4x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint4x4 to use to compute componentwise bitwise exclusive or. + /// uint4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator ^ (uint4x4 lhs, uint4x4 rhs) { return new uint4x4 (lhs.c0 ^ rhs.c0, lhs.c1 ^ rhs.c1, lhs.c2 ^ rhs.c2, lhs.c3 ^ rhs.c3); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint4x4 matrix and a uint value. + /// Left hand side uint4x4 to use to compute componentwise bitwise exclusive or. + /// Right hand side uint to use to compute componentwise bitwise exclusive or. + /// uint4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator ^ (uint4x4 lhs, uint rhs) { return new uint4x4 (lhs.c0 ^ rhs, lhs.c1 ^ rhs, lhs.c2 ^ rhs, lhs.c3 ^ rhs); } + + /// Returns the result of a componentwise bitwise exclusive or operation on a uint value and a uint4x4 matrix. + /// Left hand side uint to use to compute componentwise bitwise exclusive or. + /// Right hand side uint4x4 to use to compute componentwise bitwise exclusive or. + /// uint4x4 result of the componentwise bitwise exclusive or. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 operator ^ (uint lhs, uint4x4 rhs) { return new uint4x4 (lhs ^ rhs.c0, lhs ^ rhs.c1, lhs ^ rhs.c2, lhs ^ rhs.c3); } + + + + /// Returns the uint4 element at a specified index. + unsafe public ref uint4 this[int index] + { + get + { +#if ENABLE_UNITY_COLLECTIONS_CHECKS + if ((uint)index >= 4) + throw new System.ArgumentException("index must be between[0...3]"); +#endif + fixed (uint4x4* array = &this) { return ref ((uint4*)array)[index]; } + } + } + + /// Returns true if the uint4x4 is equal to a given uint4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(uint4x4 rhs) { return c0.Equals(rhs.c0) && c1.Equals(rhs.c1) && c2.Equals(rhs.c2) && c3.Equals(rhs.c3); } + + /// Returns true if the uint4x4 is equal to a given uint4x4, false otherwise. + /// Right hand side argument to compare equality with. + /// The result of the equality comparison. + public override bool Equals(object o) { return o is uint4x4 converted && Equals(converted); } + + + /// Returns a hash code for the uint4x4. + /// The computed hash code. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() { return (int)math.hash(this); } + + + /// Returns a string representation of the uint4x4. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override string ToString() + { + return string.Format("uint4x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15})", c0.x, c1.x, c2.x, c3.x, c0.y, c1.y, c2.y, c3.y, c0.z, c1.z, c2.z, c3.z, c0.w, c1.w, c2.w, c3.w); + } + + /// Returns a string representation of the uint4x4 using a specified format and culture-specific format information. + /// Format string to use during string formatting. + /// Format provider to use during string formatting. + /// String representation of the value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string ToString(string format, IFormatProvider formatProvider) + { + return string.Format("uint4x4({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15})", c0.x.ToString(format, formatProvider), c1.x.ToString(format, formatProvider), c2.x.ToString(format, formatProvider), c3.x.ToString(format, formatProvider), c0.y.ToString(format, formatProvider), c1.y.ToString(format, formatProvider), c2.y.ToString(format, formatProvider), c3.y.ToString(format, formatProvider), c0.z.ToString(format, formatProvider), c1.z.ToString(format, formatProvider), c2.z.ToString(format, formatProvider), c3.z.ToString(format, formatProvider), c0.w.ToString(format, formatProvider), c1.w.ToString(format, formatProvider), c2.w.ToString(format, formatProvider), c3.w.ToString(format, formatProvider)); + } + + } + + public static partial class math + { + /// Returns a uint4x4 matrix constructed from four uint4 vectors. + /// The matrix column c0 will be set to this value. + /// The matrix column c1 will be set to this value. + /// The matrix column c2 will be set to this value. + /// The matrix column c3 will be set to this value. + /// uint4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(uint4 c0, uint4 c1, uint4 c2, uint4 c3) { return new uint4x4(c0, c1, c2, c3); } + + /// Returns a uint4x4 matrix constructed from from 16 uint values given in row-major order. + /// The matrix at row 0, column 0 will be set to this value. + /// The matrix at row 0, column 1 will be set to this value. + /// The matrix at row 0, column 2 will be set to this value. + /// The matrix at row 0, column 3 will be set to this value. + /// The matrix at row 1, column 0 will be set to this value. + /// The matrix at row 1, column 1 will be set to this value. + /// The matrix at row 1, column 2 will be set to this value. + /// The matrix at row 1, column 3 will be set to this value. + /// The matrix at row 2, column 0 will be set to this value. + /// The matrix at row 2, column 1 will be set to this value. + /// The matrix at row 2, column 2 will be set to this value. + /// The matrix at row 2, column 3 will be set to this value. + /// The matrix at row 3, column 0 will be set to this value. + /// The matrix at row 3, column 1 will be set to this value. + /// The matrix at row 3, column 2 will be set to this value. + /// The matrix at row 3, column 3 will be set to this value. + /// uint4x4 constructed from arguments. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(uint m00, uint m01, uint m02, uint m03, + uint m10, uint m11, uint m12, uint m13, + uint m20, uint m21, uint m22, uint m23, + uint m30, uint m31, uint m32, uint m33) + { + return new uint4x4(m00, m01, m02, m03, + m10, m11, m12, m13, + m20, m21, m22, m23, + m30, m31, m32, m33); + } + + /// Returns a uint4x4 matrix constructed from a single uint value by assigning it to every component. + /// uint to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(uint v) { return new uint4x4(v); } + + /// Returns a uint4x4 matrix constructed from a single bool value by converting it to uint and assigning it to every component. + /// bool to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(bool v) { return new uint4x4(v); } + + /// Return a uint4x4 matrix constructed from a bool4x4 matrix by componentwise conversion. + /// bool4x4 to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(bool4x4 v) { return new uint4x4(v); } + + /// Returns a uint4x4 matrix constructed from a single int value by converting it to uint and assigning it to every component. + /// int to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(int v) { return new uint4x4(v); } + + /// Return a uint4x4 matrix constructed from a int4x4 matrix by componentwise conversion. + /// int4x4 to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(int4x4 v) { return new uint4x4(v); } + + /// Returns a uint4x4 matrix constructed from a single float value by converting it to uint and assigning it to every component. + /// float to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(float v) { return new uint4x4(v); } + + /// Return a uint4x4 matrix constructed from a float4x4 matrix by componentwise conversion. + /// float4x4 to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(float4x4 v) { return new uint4x4(v); } + + /// Returns a uint4x4 matrix constructed from a single double value by converting it to uint and assigning it to every component. + /// double to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(double v) { return new uint4x4(v); } + + /// Return a uint4x4 matrix constructed from a double4x4 matrix by componentwise conversion. + /// double4x4 to convert to uint4x4 + /// Converted value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 uint4x4(double4x4 v) { return new uint4x4(v); } + + /// Return the uint4x4 transpose of a uint4x4 matrix. + /// Value to transpose. + /// Transposed value. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4x4 transpose(uint4x4 v) + { + return uint4x4( + v.c0.x, v.c0.y, v.c0.z, v.c0.w, + v.c1.x, v.c1.y, v.c1.z, v.c1.w, + v.c2.x, v.c2.y, v.c2.z, v.c2.w, + v.c3.x, v.c3.y, v.c3.z, v.c3.w); + } + + /// Returns a uint hash code of a uint4x4 matrix. + /// Matrix value to hash. + /// uint hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint hash(uint4x4 v) + { + return csum(v.c0 * uint4(0x9C9F0823u, 0x5A9CA13Bu, 0xAFCDD5EFu, 0xA88D187Du) + + v.c1 * uint4(0xCF6EBA1Du, 0x9D88E5A1u, 0xEADF0775u, 0x747A9D7Bu) + + v.c2 * uint4(0x4111F799u, 0xB5F05AF1u, 0xFD80290Bu, 0x8B65ADB7u) + + v.c3 * uint4(0xDFF4F563u, 0x7069770Du, 0xD1224537u, 0xE99ED6F3u)) + 0x48125549u; + } + + /// + /// Returns a uint4 vector hash code of a uint4x4 matrix. + /// When multiple elements are to be hashes together, it can more efficient to calculate and combine wide hash + /// that are only reduced to a narrow uint hash at the very end instead of at every step. + /// + /// Matrix value to hash. + /// uint4 hash of the argument. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint4 hashwide(uint4x4 v) + { + return (v.c0 * uint4(0xEEE2123Bu, 0xE3AD9FE5u, 0xCE1CF8BFu, 0x7BE39F3Bu) + + v.c1 * uint4(0xFAB9913Fu, 0xB4501269u, 0xE04B89FDu, 0xDB3DE101u) + + v.c2 * uint4(0x7B6D1B4Bu, 0x58399E77u, 0x5EAC29C9u, 0xFC6014F9u) + + v.c3 * uint4(0x6BF6693Fu, 0x9D1B1D9Bu, 0xF842F5C1u, 0xA47EC335u)) + 0xA477DF57u; + } + + } +} diff --git a/Tools/Exporter/ConfigTable/CommandLine.dll b/Tools/ConfigTable/CommandLine.dll similarity index 100% rename from Tools/Exporter/ConfigTable/CommandLine.dll rename to Tools/ConfigTable/CommandLine.dll diff --git a/Tools/Exporter/ConfigTable/EPPlus.Interfaces.dll b/Tools/ConfigTable/EPPlus.Interfaces.dll similarity index 100% rename from Tools/Exporter/ConfigTable/EPPlus.Interfaces.dll rename to Tools/ConfigTable/EPPlus.Interfaces.dll diff --git a/Tools/Exporter/ConfigTable/EPPlus.System.Drawing.dll b/Tools/ConfigTable/EPPlus.System.Drawing.dll similarity index 100% rename from Tools/Exporter/ConfigTable/EPPlus.System.Drawing.dll rename to Tools/ConfigTable/EPPlus.System.Drawing.dll diff --git a/Tools/Exporter/ConfigTable/EPPlus.dll b/Tools/ConfigTable/EPPlus.dll similarity index 100% rename from Tools/Exporter/ConfigTable/EPPlus.dll rename to Tools/ConfigTable/EPPlus.dll diff --git a/Tools/Exporter/ConfigTable/ExporterSettings.json b/Tools/ConfigTable/ExporterSettings.json similarity index 100% rename from Tools/Exporter/ConfigTable/ExporterSettings.json rename to Tools/ConfigTable/ExporterSettings.json diff --git a/Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable b/Tools/ConfigTable/Fantasy.Tools.ConfigTable similarity index 100% rename from Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable rename to Tools/ConfigTable/Fantasy.Tools.ConfigTable diff --git a/Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable.deps.json b/Tools/ConfigTable/Fantasy.Tools.ConfigTable.deps.json similarity index 100% rename from Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable.deps.json rename to Tools/ConfigTable/Fantasy.Tools.ConfigTable.deps.json diff --git a/Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable.dll b/Tools/ConfigTable/Fantasy.Tools.ConfigTable.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable.dll rename to Tools/ConfigTable/Fantasy.Tools.ConfigTable.dll diff --git a/Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable.pdb b/Tools/ConfigTable/Fantasy.Tools.ConfigTable.pdb similarity index 100% rename from Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable.pdb rename to Tools/ConfigTable/Fantasy.Tools.ConfigTable.pdb diff --git a/Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable.runtimeconfig.json b/Tools/ConfigTable/Fantasy.Tools.ConfigTable.runtimeconfig.json similarity index 100% rename from Tools/Exporter/ConfigTable/Fantasy.Tools.ConfigTable.runtimeconfig.json rename to Tools/ConfigTable/Fantasy.Tools.ConfigTable.runtimeconfig.json diff --git a/Tools/Exporter/ConfigTable/Microsoft.CodeAnalysis.CSharp.dll b/Tools/ConfigTable/Microsoft.CodeAnalysis.CSharp.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.CodeAnalysis.CSharp.dll rename to Tools/ConfigTable/Microsoft.CodeAnalysis.CSharp.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.CodeAnalysis.dll b/Tools/ConfigTable/Microsoft.CodeAnalysis.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.CodeAnalysis.dll rename to Tools/ConfigTable/Microsoft.CodeAnalysis.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Extensions.Configuration.Abstractions.dll b/Tools/ConfigTable/Microsoft.Extensions.Configuration.Abstractions.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Extensions.Configuration.Abstractions.dll rename to Tools/ConfigTable/Microsoft.Extensions.Configuration.Abstractions.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Extensions.Configuration.FileExtensions.dll b/Tools/ConfigTable/Microsoft.Extensions.Configuration.FileExtensions.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Extensions.Configuration.FileExtensions.dll rename to Tools/ConfigTable/Microsoft.Extensions.Configuration.FileExtensions.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Extensions.Configuration.Json.dll b/Tools/ConfigTable/Microsoft.Extensions.Configuration.Json.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Extensions.Configuration.Json.dll rename to Tools/ConfigTable/Microsoft.Extensions.Configuration.Json.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Extensions.Configuration.dll b/Tools/ConfigTable/Microsoft.Extensions.Configuration.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Extensions.Configuration.dll rename to Tools/ConfigTable/Microsoft.Extensions.Configuration.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Extensions.FileProviders.Abstractions.dll b/Tools/ConfigTable/Microsoft.Extensions.FileProviders.Abstractions.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Extensions.FileProviders.Abstractions.dll rename to Tools/ConfigTable/Microsoft.Extensions.FileProviders.Abstractions.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Extensions.FileProviders.Physical.dll b/Tools/ConfigTable/Microsoft.Extensions.FileProviders.Physical.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Extensions.FileProviders.Physical.dll rename to Tools/ConfigTable/Microsoft.Extensions.FileProviders.Physical.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Extensions.FileSystemGlobbing.dll b/Tools/ConfigTable/Microsoft.Extensions.FileSystemGlobbing.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Extensions.FileSystemGlobbing.dll rename to Tools/ConfigTable/Microsoft.Extensions.FileSystemGlobbing.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Extensions.Primitives.dll b/Tools/ConfigTable/Microsoft.Extensions.Primitives.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Extensions.Primitives.dll rename to Tools/ConfigTable/Microsoft.Extensions.Primitives.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.IO.RecyclableMemoryStream.dll b/Tools/ConfigTable/Microsoft.IO.RecyclableMemoryStream.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.IO.RecyclableMemoryStream.dll rename to Tools/ConfigTable/Microsoft.IO.RecyclableMemoryStream.dll diff --git a/Tools/Exporter/ConfigTable/Microsoft.Win32.SystemEvents.dll b/Tools/ConfigTable/Microsoft.Win32.SystemEvents.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Microsoft.Win32.SystemEvents.dll rename to Tools/ConfigTable/Microsoft.Win32.SystemEvents.dll diff --git a/Tools/Exporter/ConfigTable/Newtonsoft.Json.dll b/Tools/ConfigTable/Newtonsoft.Json.dll similarity index 100% rename from Tools/Exporter/ConfigTable/Newtonsoft.Json.dll rename to Tools/ConfigTable/Newtonsoft.Json.dll diff --git a/Tools/Exporter/ConfigTable/Run.bat b/Tools/ConfigTable/Run.bat similarity index 100% rename from Tools/Exporter/ConfigTable/Run.bat rename to Tools/ConfigTable/Run.bat diff --git a/Tools/Exporter/ConfigTable/Run.sh b/Tools/ConfigTable/Run.sh similarity index 100% rename from Tools/Exporter/ConfigTable/Run.sh rename to Tools/ConfigTable/Run.sh diff --git a/Tools/Exporter/ConfigTable/System.Collections.Immutable.dll b/Tools/ConfigTable/System.Collections.Immutable.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.Collections.Immutable.dll rename to Tools/ConfigTable/System.Collections.Immutable.dll diff --git a/Tools/Exporter/ConfigTable/System.Drawing.Common.dll b/Tools/ConfigTable/System.Drawing.Common.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.Drawing.Common.dll rename to Tools/ConfigTable/System.Drawing.Common.dll diff --git a/Tools/Exporter/ConfigTable/System.IO.Pipelines.dll b/Tools/ConfigTable/System.IO.Pipelines.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.IO.Pipelines.dll rename to Tools/ConfigTable/System.IO.Pipelines.dll diff --git a/Tools/Exporter/ConfigTable/System.Reflection.Metadata.dll b/Tools/ConfigTable/System.Reflection.Metadata.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.Reflection.Metadata.dll rename to Tools/ConfigTable/System.Reflection.Metadata.dll diff --git a/Tools/Exporter/ConfigTable/System.Security.Cryptography.Pkcs.dll b/Tools/ConfigTable/System.Security.Cryptography.Pkcs.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.Security.Cryptography.Pkcs.dll rename to Tools/ConfigTable/System.Security.Cryptography.Pkcs.dll diff --git a/Tools/Exporter/ConfigTable/System.Security.Cryptography.Xml.dll b/Tools/ConfigTable/System.Security.Cryptography.Xml.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.Security.Cryptography.Xml.dll rename to Tools/ConfigTable/System.Security.Cryptography.Xml.dll diff --git a/Tools/Exporter/ConfigTable/System.Text.Encoding.CodePages.dll b/Tools/ConfigTable/System.Text.Encoding.CodePages.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.Text.Encoding.CodePages.dll rename to Tools/ConfigTable/System.Text.Encoding.CodePages.dll diff --git a/Tools/Exporter/ConfigTable/System.Text.Encodings.Web.dll b/Tools/ConfigTable/System.Text.Encodings.Web.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.Text.Encodings.Web.dll rename to Tools/ConfigTable/System.Text.Encodings.Web.dll diff --git a/Tools/Exporter/ConfigTable/System.Text.Json.dll b/Tools/ConfigTable/System.Text.Json.dll similarity index 100% rename from Tools/Exporter/ConfigTable/System.Text.Json.dll rename to Tools/ConfigTable/System.Text.Json.dll diff --git a/Tools/Exporter/ConfigTable/protobuf-net.Core.dll b/Tools/ConfigTable/protobuf-net.Core.dll similarity index 100% rename from Tools/Exporter/ConfigTable/protobuf-net.Core.dll rename to Tools/ConfigTable/protobuf-net.Core.dll diff --git a/Tools/Exporter/ConfigTable/protobuf-net.dll b/Tools/ConfigTable/protobuf-net.dll similarity index 100% rename from Tools/Exporter/ConfigTable/protobuf-net.dll rename to Tools/ConfigTable/protobuf-net.dll diff --git a/Tools/Exporter/ConfigTable/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll b/Tools/ConfigTable/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll similarity index 100% rename from Tools/Exporter/ConfigTable/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll rename to Tools/ConfigTable/runtimes/browser/lib/net8.0/System.Text.Encodings.Web.dll diff --git a/Tools/Exporter/ConfigTable/runtimes/win/lib/net7.0/Microsoft.Win32.SystemEvents.dll b/Tools/ConfigTable/runtimes/win/lib/net7.0/Microsoft.Win32.SystemEvents.dll similarity index 100% rename from Tools/Exporter/ConfigTable/runtimes/win/lib/net7.0/Microsoft.Win32.SystemEvents.dll rename to Tools/ConfigTable/runtimes/win/lib/net7.0/Microsoft.Win32.SystemEvents.dll diff --git a/Tools/Exporter/ConfigTable/runtimes/win/lib/net7.0/System.Drawing.Common.dll b/Tools/ConfigTable/runtimes/win/lib/net7.0/System.Drawing.Common.dll similarity index 100% rename from Tools/Exporter/ConfigTable/runtimes/win/lib/net7.0/System.Drawing.Common.dll rename to Tools/ConfigTable/runtimes/win/lib/net7.0/System.Drawing.Common.dll diff --git a/Tools/Exporter/ConfigTable/runtimes/win/lib/net8.0/System.Security.Cryptography.Pkcs.dll b/Tools/ConfigTable/runtimes/win/lib/net8.0/System.Security.Cryptography.Pkcs.dll similarity index 100% rename from Tools/Exporter/ConfigTable/runtimes/win/lib/net8.0/System.Security.Cryptography.Pkcs.dll rename to Tools/ConfigTable/runtimes/win/lib/net8.0/System.Security.Cryptography.Pkcs.dll diff --git a/Tools/Exporter/ConfigTable/runtimes/win/lib/net9.0/System.Security.Cryptography.Pkcs.dll b/Tools/ConfigTable/runtimes/win/lib/net9.0/System.Security.Cryptography.Pkcs.dll similarity index 100% rename from Tools/Exporter/ConfigTable/runtimes/win/lib/net9.0/System.Security.Cryptography.Pkcs.dll rename to Tools/ConfigTable/runtimes/win/lib/net9.0/System.Security.Cryptography.Pkcs.dll diff --git a/Tools/Exporter/ConfigTable/runtimes/win/lib/net9.0/System.Text.Encoding.CodePages.dll b/Tools/ConfigTable/runtimes/win/lib/net9.0/System.Text.Encoding.CodePages.dll similarity index 100% rename from Tools/Exporter/ConfigTable/runtimes/win/lib/net9.0/System.Text.Encoding.CodePages.dll rename to Tools/ConfigTable/runtimes/win/lib/net9.0/System.Text.Encoding.CodePages.dll diff --git a/Tools/Exporter/NetworkProtocol/CommandLine.dll b/Tools/Exporter/NetworkProtocol/CommandLine.dll deleted file mode 100644 index 3eab2be274359223f5640b0af04b2af375cce752..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225280 zcmeFa2bdhi)i&DOJ=-%o8>HD?&8*_CfLV$OivkEqfDjoI1c)TbN<(I#=fCv1Z*DRFl$O}oz z|3lx8YHDK|`0mRv_`cEX1Eby(meGdz+zTw@z$pBq!hLnog))Ws9+5NyD~>yB1>$EN z=a-9Rh1}7k&@{6;U>NBF{4MDpY$_NsZCW0|X2KJw zVRX%~j2*$H$uKh3%4vo%Ic?elTiK;8)l3o!7h7Cs767H3nk{gqw}rQ}6@rCqAy@c8 z-%;1Auk~$l&_Q=BizIip2Eh^^9Hw^W5L}=PN#kh90JUejE0E;$o^=_Bl+Wty)15~C zjOh?nXk?!6&!-=1hG1w$ zpn+as73gJC@EE2S65GNlt{0}Zt8}A!`QhE?=3{zc@&6d9>euQV!KK=t{0}Zg>zId)2h$?JEj*&II_Ml^(gh_ zjF?`Sek^(+!!he+dk|AE3+RV>AsBiQXrLE#UC>K@q+UpDSLw#}!qm2Kj_TzPpPhSu zOfQmfq+XbM6usOV(+ks&MK5GHX1(kHV(Mj~@9#*zQtxSqhJJ`On>|5Ff3p;A9o;AN z)bHzQZ@aX+-(fJ3U8Sq_w58wQkc%xjiJs68?L@v+vbDu^c1BS8A@HX?_JYs9zU2pQ z2)ZBLsR{d$+FS?*TARM^!z`R#fJ0}+zUpG|OhW$d%A3&f#Cl&vu4BgcXb(LRmo$D%(n{3!j^`}*BMOug(uKhz7s(2GC=y3sc*|IjWc6-#Po;m|i5|NWC!iD0*>YdSUvp=!Fc&te200n0nch zeyA6Mp%;M$dP$33iX-(xV!KK=t{0}Zg>zIdZKovX#`GcyN9u*CN72h|F}*PTSoA`M zW7Z2g4bjWq^h3Q647~_6&`Yc6r8H76B(|$`<9cCgyGl2zm*0JA$pzIdo3-Sw zis?lXj?@cNk5XUukLiW!$D$W99J5}qXc4{aM?cgH!O)991HH71UIs?$g~WE1Zd@-+ zZCB|=^>Wq`3w|8aizFPW7fIK+zFZX33)7E9FJw4oz3dNS)|bWfL%k3Ty$CeWONZ!X z%aM8^v0bGb*9%kI!a1s!P5=4(_hNdHgd_FB)T7jwZ^!h)^kdNr8ID;m2Y{G*!6G)Q z7lNS|fd+aRCwiGNQZFR7t90XfVQO1ANA;4Ocyez{FOqPiUYL3my}TdO3)7E9FJw4o zy&ME$>g8biVSOPOdJ$-#m+_*PnIrW=V!KK=t{0}Zg>zIdzxn>}SCm}8TREjfvv>T_(ewX1YTpJV@f!w)WsX;avb)F$)L+VrXQ99x(-oMT@E9fxyl zavh6~naxM(m~(9AJLWm|G7!@iANT!3>4)nbqG1bSVGBXlZP6*VK!uXIWyBUtWLN3N zZ9y)!WlYL%%+=`RjT zMEeV-AB+CT@T2rsU+)|NV(R5c`k`J3hF%03=%riqf&vU*?~vH8(v9ndscqpL)k|(& z>gAYTB;iQCF!d;Uxi+R3rXP!5$Z*VhISRzo%hA4n4E?a}5)J(ji?%DsdfS~KdYUt` z?J|*Fr5kU%$6-H8u4B>8r0FO=zg1#b(F+*m2SL_GPNz7qjmJv#Xoo^ zrd3HeQmafoN*&#?Iofuaek}SU!;jKmz3m9@i zu4BqC zlm(~9v?>WlYL%%+siW`5>L}BXMSo=YQTnUb(NjQ7y_`xv)Cia>6{ICZ8e+-mnxz@7h)n@)*xEA#LOxWfke5r zaxFNyHAGgMRzjJ`&Ko4nEVD}AIX4hl3bYVQJKp%U>AHsfgbLSk<= z*Y1b{0CgAhm6W-41mO(ucKVubmZ>a=;$Fl=>#dQA%pjGeQwia+;Ueku#^f0Z10#zu znYKaRU#{nEn9e7Wg-S59Pa%}v*wva_hYF2D$>e(XVgVU;!Dzx_)G)>wU7HwPM8_nI zMbt1=3v^J&PD8)_=(^A7B98B_eSJXJ3X3;*MKEU|JY6gX{{x=h=JvA^Up3+#BE^#~T^G2~Mk> zw3IE}w2X@(V=wvL3@rG4mR^-^%(z4LEdaTsU$PF zzV3ji{)Zz?>3mTDUxKSzz}Y)P-P5him?l}4VHYGt|Ro0e)rAfehBWuFGw<*$3l#`ay&eH2{G z?%HGUL``2tV90(Pt_yWQO~ll`${@9<(O)C_>w+dmVZ*Da(4hSK5!7ea;I3rQFR*vo zydE>__1TKm=O@4q-Qq&3IN{glCkgAf5~jk=NU^YqWvWgFrkM&$M3&1m4n?V^({|1` zL0#V2TyY%L`xM3N1`$;CEg~k`D^4Kqr1Nb=lg@YGy5EIUuvcK7G1+;VfbS7tt~iN+ zXX*fEJb@V^uP*dK%iwRqdiyL$@(J(z@L1-sKgw4L18CcN!SiSq&ynTxaJ(1b4A~nP ze-VzK0j?}KKR`4rs*Fb`Bfm|hjO;(k2b(K)f`IAD{$Q?^xb`#v{NZRFXlg%%BZhkk zfg$^4xb7>24HBcWC`~vVxjzDIwN}3LBq(UtjAr8qB{Ah!Oxg| zQ0-M_!W#1$0z>xeaQ%#liDbNn7|Hl#-7l5{{wzR2#*ISFM`a>es~kY+g zgO>PWC({^!pNIU=?i)atT04!Q38*ZS?P9CB;tZ(E@kS;lNGE2;z5qk=PXNX+`W8G&B>n;nwm$r)KHT@+pXs>!bM32%EZ8(t>jri( z4fMIj=Cnhn;rs$rr4-uE+ax#DBwBJZlh9@+>q(rp9kjm$t(rojSOU^-F@io}JHI0R zRMJCr%)$9JA&>*D5PeH;5a?q7`C4ob@qA6YPn~DQL23mHT_3 zFu42y-jMxAxbC}f6pUUhoM$?JLZpoPRf8R!KNEwZpx_FcEMoe!!X@H8Af&%Rdx*&` zw)hLN33J5?lKvGD=Wm3dp8~m7Szizk-Su;lhN@XCV1W2LXj$?6pq?MFtTT`oRD!bp z10?9l&