Update glam to 0.30.4
Test: m rust
Change-Id: Ia007a11f2099273374b8644aa818ea6c08dc8717
diff --git a/crates/glam/.android-checksum.json b/crates/glam/.android-checksum.json
index 1bda360..12b7dbe 100644
--- a/crates/glam/.android-checksum.json
+++ b/crates/glam/.android-checksum.json
@@ -1 +1 @@
-{"package":null,"files":{".cargo-checksum.json":"13e48ba326fc08f94168f36ebc7e589c08e4b92de5ee81facd7ed4bfc5c94318","ARCHITECTURE.md":"c966675696b1f919fbbf82dd156cd1f07f42d182e801235cc71ac9ff5b889db4","ATTRIBUTION.md":"68351d86724034ca10de19536d3110805928de42e3c34667573784212fed2429","Android.bp":"362bb47ee154bf4700ed7c78e52dda6edb9a8cd6063c44078b7e28f5ec8a0a3b","CHANGELOG.md":"baa44e315327aaf69735de9ed04251067387b2ff0b1c06040439ff6926da0b78","CODE_OF_CONDUCT.md":"104c5c02a827d2c2916183b093e999b73e5e48c6925aae556416c52e87786a30","CONTRIBUTING.md":"b034e68df52c7a06fc30f5dcb5937debd9ebd1e9f5bedf6933681ea255a71c84","Cargo.lock":"bcc7f38c4277c1a2ea5709b2856d414fb93a291261c6d1bf749e5debe6f1f076","Cargo.toml":"8c26ba4ac8a370a78bb1850e8954a83aaa775654262a816270f30250327ed4c9","LICENSE":"0a4b5b8e2558ffc8d4b08cb0ed3a3c09acb37dfa72a72d2201e24d8ec18f8d8c","LICENSE-APACHE":"0a4b5b8e2558ffc8d4b08cb0ed3a3c09acb37dfa72a72d2201e24d8ec18f8d8c","METADATA":"00bf34c191ddc572f42e4bfbafa7287179e664fe2cba49446ac8eea4464ac194","MODULE_LICENSE_APACHE2":"0d6f8afa3940b7f06bebee651376d43bc8b0d5b437337be2696d30377451e93a","README.md":"48fb90bc557df177b4c54470b5006452786e15733a707184ae38415c001643eb","benches/affine2.rs":"258fcc2b26d17c03f117e62512c48f4f3c6edab58294ee7b42b5a00e15df120c","benches/affine3.rs":"434cec45c1c89c57807970a275ea88e7bdb2827946e737913c1974f7ebc64fa4","benches/iai.rs":"8301e19a24fc80eb3de0d365c4417e5120b02a4a0c405d66c868709fb1b2c77d","benches/mat2.rs":"1acd3f8853be14fb35b9dca12603d4f32f309b0749e561c6d68d625ee9ac71e0","benches/mat3.rs":"d6d443ca41ccfbec6d2ba8a55633fd05d81ad9221e36d25e20bfeba7417935ae","benches/mat3a.rs":"cab5b9f23d68a7e3d557b2ee82f41b76ca45d725eefe42f0de7866cc3cf47a17","benches/mat4.rs":"7173961ae3abc98a10b87d05132c35615936838f70951a2dda9e3bab98b472ea","benches/quat.rs":"df5ad38e88f13459654e40d56f94fb08bd813648756db19c8fc6a0f3514a5291","benches/support.rs":"282ab869c8e066884a6d32b1762c30b9533e1c873a59cffe9ba77d76ac1092d8","benches/support/macros.rs":"a5a4ff16b792c1857db9f1db4ea5c0a5c52a208d62334111726bb14b685d8fb4","benches/vec2.rs":"fab318070b1259354cb762c99d3755f6a00ec6b42b734b7a555be6de4c10af0f","benches/vec3.rs":"e8d7d3d74100bc1843eb61d71567d7d6e0478afcaae152f9587241e0a371b61c","benches/vec3a.rs":"6b0ddec0d723d9030bbe04f60082819b6d201a33808ea2615c5ff6974fb3d618","benches/vec4.rs":"247ccd8f584edf26e9b8a495493b6060e7415fe47ce19b82a8012779fdc92201","build_all_msrv.sh":"27b5fe7fe1fa47ee75dc892542d9153057e9feaae843ee720cbfbd71726241e0","build_and_test_features.sh":"c109f5faaad65e2ebfe7cae313a56238ace8d0089eb1a41c42553a2379e5a1ba","build_and_test_wasm32_chrome.sh":"ee529572839b5e48171da9a6224d8f18804339974b53866bd08d732b096a55e6","build_and_test_wasm32_firefox.sh":"1a17c0878c478ce04dcf3083c4268cc747076962bdc82e1b86d9187cc9826723","cargo_embargo.json":"69896e04a983576d21031c0dcf61c27c7e9b109f6704a4867de9b318c318822c","clippy.toml":"40ef87c643ca926e60249ae779d096c5a11b05c52ffb1cfb4dfebb534f2c9314","codegen.json":"a262bb6d42bed9508c9a983b40cfb152f6cdeca19d3130ba184999576e71a5b7","deny.toml":"9db0956606ceb22e4514cfd1155c6e1aa82598c3b724c4a0c7c9ae7d3d268971","src/align16.rs":"2e14d45f1c2bffc3c17ae0d08a78474c83dbee23236d1d3d2bcc54cb40aee6b8","src/bool.rs":"e7341a7aabfbca192ffb0d30e4e059fa516312fb2f5c5d493995ae7ae40763cc","src/bool/bvec2.rs":"374b89d648d57b8ffa181a163a2463bc4f662fa4e48a60d5ef1c31fded5b5552","src/bool/bvec3.rs":"7e79e3ec817c727d90f20de70d3b2c1936437de644240e4e0b07e22219bbfe6b","src/bool/bvec4.rs":"2bab40511fe305fa84211760eb172322abbb950789ef2e9d4436c4a5963b4201","src/bool/coresimd.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/coresimd/bvec3a.rs":"ade501e05c232b4123b446363741db08695083b9f1a6c2c3f880ebab4b258dbf","src/bool/coresimd/bvec4a.rs":"a6bb2d5cfc4bf47a4d95cb05c0e667f1255845879236c5fc2b3c4dc3296d8def","src/bool/neon.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/neon/bvec3a.rs":"191965ed8a1dbb835de902f92b9aa94b895bebc5cd9fe36ecd07c23e7b747963","src/bool/neon/bvec4a.rs":"b0ea68c835ce6bc56d181cb9ecfcf84c91aa327c47733bfb4c54f667e843c6ca","src/bool/scalar.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/scalar/bvec3a.rs":"5be97542722e1f3a5546cfa28dc096c2428acb0dfaed38577b632d0573a34709","src/bool/scalar/bvec4a.rs":"74ec32ee41f6f687212996fd59056a9320e95a8013c2d7fac608ec9650ac59a8","src/bool/sse2.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/sse2/bvec3a.rs":"be97915bb2654d11e2134b6a90816d7c3f19e15ce21d349c90974d19c31d8919","src/bool/sse2/bvec4a.rs":"763d6ab21615be17b6b24103b17dde2e88d3dcb12f7751f433e35f3f573e4c1b","src/bool/wasm32.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/wasm32/bvec3a.rs":"fd5f8b18653219e6f1aa1b6ff53cf2ed6b0cc763d9c9f275e57face6e1691c42","src/bool/wasm32/bvec4a.rs":"4c98f6498c6742a909004fc35b663a867bd80992e51f5eb58fc0566e0d0a089d","src/coresimd.rs":"cb848dbbd30ea3ea6766311ac18587cf2549830e09304d3828ef883ed2a3e198","src/deref.rs":"d0f569375c4621f6a8b0ba38a2e9fb29e6aeca50efd7247d226f1b1ae6d0f766","src/euler.rs":"4ae0051961eadcb7d95475521a35836a6e5205257cfb1c3668bad6832c107a96","src/f32.rs":"969ac5ed16361b01df5f9b62707d5c9e7eaa4bf99409a80824dbd93ee353ae2c","src/f32/affine2.rs":"d98620e1a535ba9a8ddf8509350f5da8c874ed94615b6f92eeeb60b81253de55","src/f32/affine3a.rs":"23cb65cf0eab1fa07d3ea1c0ae05a1edb56933cf7fdad5d8bc4476736ce66542","src/f32/coresimd.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/coresimd/mat2.rs":"0c66511d79180860389894d392115886623520e257af1124680ba32e64a6265f","src/f32/coresimd/mat3a.rs":"eeb02096e9d9a479208402119b7752298423c6666ea88decae9427019a17874d","src/f32/coresimd/mat4.rs":"c476d76bce6a63a2365c54dc167b44cdb54275ad728fc8188cdded492ac07952","src/f32/coresimd/quat.rs":"c3853197771bb45f42ccfc1b418b31cfd598e70fded30ac4ad2c9fff2aff9df9","src/f32/coresimd/vec3a.rs":"563e2491fdb136b33d4faafdc03aad0393aab6ab9c565d81c488cd387c0ceab8","src/f32/coresimd/vec4.rs":"d55ab100724bbe4a646c170f39c961986d75653584355de66c5f364e79be2103","src/f32/float.rs":"fbe865e575cc00535c5d512e39aa00834947e09584b83b480202bb9e49e913ab","src/f32/mat3.rs":"810856c4e60789d747f8c941d73280acc09ccfed184012cd9ca80cb573409c22","src/f32/math.rs":"532d687bb7bc20ccc2f3f1493fc682a9f59d67d0fee1e9a469414e5000fe598a","src/f32/neon.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/neon/mat2.rs":"6f2a53bca079658fbf20b5b75a886b2b7747bad418627060e059ec9a36357f11","src/f32/neon/mat3a.rs":"3cb7ec734005ded008d2e0b07400ffd95df55694141e07dfbdb944832f0895f1","src/f32/neon/mat4.rs":"1d3408a64d07bc1ea4b47107e90e7df0b0bd864b7871f59090b8cb652e514d0c","src/f32/neon/quat.rs":"1262139509e14d57101fee6dba0126b8cb6b5f76dcc7d03a31af5dadefb9cab6","src/f32/neon/vec3a.rs":"f2f0c83f81fb35128e7db820b044db2b17fe803145847c868f27b9b75bf9be13","src/f32/neon/vec4.rs":"b24528a44353c345aac40582fbb3522086b17e71bc6365aeecf397acc92ad734","src/f32/scalar.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/scalar/mat2.rs":"2e9909d6b72b1e3b6591a67b317a3c217de545695f73f813d152aec14a66403e","src/f32/scalar/mat3a.rs":"2afa8c74cd5d597b540ddde3ece77a9c1b6292475bfcfcd084414b81f88abbb9","src/f32/scalar/mat4.rs":"702b6f902c0f6df5f8e8332283c30012a243c3ca00122e4897b0d63400f0f2b4","src/f32/scalar/quat.rs":"10edea3a9f49a7d486f316190d7e14354657af3335b9788353f094d7dc054aaf","src/f32/scalar/vec3a.rs":"7455a25580063a11d5dd56866c92b7bbb332857d8c12419cb3e51d5415c3eaa9","src/f32/scalar/vec4.rs":"930ccdb605984cc2fd44c902b3fce7cee570997795640ac20a129bbd9766e4de","src/f32/sse2.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/sse2/mat2.rs":"ee5dc00c5939d4092136043adc1e5b269e14d5d0a607aca4f0c2a91ef91c62ee","src/f32/sse2/mat3a.rs":"1e1ae991e9b81cd3ec2bc0b8ec62135fe16f5a48fd3795ec8e904a522121c769","src/f32/sse2/mat4.rs":"c9856425f7627776a4f710df5b76b26e39bd312b871deba83ff87619e69bb569","src/f32/sse2/quat.rs":"60a4f7ca51218c73ce6c8d52c158ef14d3076caa0926d81a0e392e900fa78ef5","src/f32/sse2/vec3a.rs":"64f375f2d4a178ebe3f63c438244b0210ca3ce0ce504a09c643a86457aa2a1c0","src/f32/sse2/vec4.rs":"74214e20c3b743b839a2dcdadd5b763a4b9cd332149318bdb2a34b1a950be4be","src/f32/vec2.rs":"58a526892cfaba26af3cf29b3bfc115362ad5e2bb549c2e0dfb3af8f94de00e1","src/f32/vec3.rs":"0b9e18dda7d2b762a7506d655c2a3a5a1eb14fa09c9cd41b49b9c9f18bbbd0be","src/f32/wasm32.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/wasm32/mat2.rs":"a123d1b65c52a5ab92061abf7d36f54a96a12f916791bc01482edb3155770def","src/f32/wasm32/mat3a.rs":"6d0006dc1494af3ef2de4444294d9260d69ffb5c9a86dc0d0ad1937eca91a017","src/f32/wasm32/mat4.rs":"a647d7656a0eb4f74a5bfad8b3dee4c61718acb05021cac23dde130f517f8d0c","src/f32/wasm32/quat.rs":"ab35dbb24d874b819e223b243250487c318a38344fb24e7365193ddc704c70bc","src/f32/wasm32/vec3a.rs":"68a0ba2a93397f1dc2b3108e91a40b2e2d96869b378484e79b6618095e2f5a8f","src/f32/wasm32/vec4.rs":"cdc8410ad4d7177af49fdc3286d148c07da63e03fd9fbbadd6a6dd3d5343a35f","src/f64.rs":"8bba8e3435de1b4d049e4e81046eb9ba7fc155de73a0349721124ccf947bf24b","src/f64/daffine2.rs":"f85f50cec2a659d97b8b462995dab150e2e6bf24fa277ac1ca37efc8eebc5f86","src/f64/daffine3.rs":"3b0dbeffdc1fdc00bb87f4e896cf4de372fbfbe4fbaab4be1c818dcb4df7fde4","src/f64/dmat2.rs":"2a27bc9209446b3af5cba1815b5d587f863a5e4ec06e8360aea61e79a28c5dd0","src/f64/dmat3.rs":"3bdb7820cf58d1fbca14c4f78808c219eec70b7f7f8d6b377b7fd2213ffe9573","src/f64/dmat4.rs":"83ba38a1f42f76182973f9c4d773459fbf450f3a48651871866405e912d313de","src/f64/dquat.rs":"7fdea441656eaa7fc4b236c5f02d6962f4ff6c9737e97c0314b063671c2a2d2b","src/f64/dvec2.rs":"381d48886cba1f3874152efaac2baa3db1c3062a6dc7209ba5eef91886371cf3","src/f64/dvec3.rs":"b6449b7a437360e034e5eec905261f75cea5201d474e7db9f6b913b3b550eb1c","src/f64/dvec4.rs":"5a12f0d166664c1be9e56a0ac7c0e0fd07e587b7fa1b5094e5fd74952bb3a439","src/f64/float.rs":"03dd6a4f82c14bbac55d2947ffdb98c4024e4f95f083ca031b4d02f27072e393","src/f64/math.rs":"0bc65d82cbbddf0c4862f135dae04d457ee00a14652c81145ad42c6a8db11fba","src/features.rs":"5061c1c37d9477b7b0453b9b3f45ef0fe23187f1348b0143607818b9adc20515","src/features/impl_approx.rs":"74ddf0465fcf62b8764e2e98b8b4c06ffd8f34e1e52e644f40509a9361855f6e","src/features/impl_bytemuck.rs":"f0f9720fce64b1def39697866d6f2b195155618522b8c72c395b46b71a572456","src/features/impl_mint.rs":"8b332154ae0e3897635e31cc14c39b5bca76521516c5b757e9fe5f0151ad9ad5","src/features/impl_rand.rs":"f3a4c6388f8ff9d312a22300dd245773c8f5f8803490f03fe6378fa6169c4f7a","src/features/impl_rkyv.rs":"dffe601afbc9a4e966678a172014bd5cb391a23ff967bd495307716dd0f1c2a3","src/features/impl_serde.rs":"3b4ba052a96fb147575186160486f7988316f5848e25af17957ce8c1dad8bb69","src/features/impl_speedy.rs":"41af30c30229d50579739297f44fff0f9f4add2f97026cb6f8e9d607f2b8e276","src/float.rs":"d3abce9be482305ee00f0688343aa0dcceb8d5505017093d704267dc54202e32","src/i16.rs":"22bf65b210b7e60ee8233a891924920e5b6604acbd245c81e7e645af522cbdcb","src/i16/i16vec2.rs":"a33def4aa7e5702da7ae9f724b6dd6fd192f3a95a6f7546ce62964508605ad6a","src/i16/i16vec3.rs":"cb111f85a872cfa3e7625682181ade029675f63cc8f2cd8e891ff6bc87a3c05b","src/i16/i16vec4.rs":"6b50dece346d2940576af953c891ac02a33fa3375124a63e14c356dd874df2f9","src/i32.rs":"77f8a832de656ca5b7c19f6814320d283c84323e774a9ebc415b4ad87e028569","src/i32/ivec2.rs":"83b4ce3ecef0a3cd22516d943c82a22bd381b3090fd8cdbdac18124959aa2853","src/i32/ivec3.rs":"305f43b0b02a45d7fa3509c1fdf628fcb391ccf12a2f845dabc8003e6dc1f51a","src/i32/ivec4.rs":"6641ba0d3387be9d214333f49b5fd4f6adea19c8428d9add56ba54954504810a","src/i64.rs":"1c71d9921ee0246800beeeadf49a322da5bf85f2832ffa1934688e242e735626","src/i64/i64vec2.rs":"312995e442e253a3f95c3c1e2ebc39a54d2b45639786d0233d3103cdbb3570b1","src/i64/i64vec3.rs":"a355d1a1cfc24aeee6e50a683530a44d5aa49a97eb95712e6a5a5bfa87a97f5e","src/i64/i64vec4.rs":"6052773e12a54e8053d946ba14c85c4e112966e1f7bb5ab5b538caa2967ad914","src/i8.rs":"2c09d6e947b9924a8eb3f9ef4dbf80f906a68bfd0905be3fdb7a6d6a030b9be1","src/i8/i8vec2.rs":"9c9ec3c8edd3584d7d267f936d976e1ad66d242e3079de172c9491a30ce82e76","src/i8/i8vec3.rs":"172281173d092d5aa7d5178afc57a945ad22f4c07bd0b396d407f8eb3b9a6129","src/i8/i8vec4.rs":"1f41ff2220d0526e7394f8a64f59fd9797a6a13d2c76710d49b10645a0b23fd5","src/lib.rs":"ae51b89485b36586976f20c4487c3cffb77c23b3f6b410ff5437501494a8d3df","src/macros.rs":"3954a434a61e1ad20da04b807dd6fdfa8015558da845c7ddb307f303402ccbe8","src/neon.rs":"4d3e1e3b311101913cc7e31e1a4e7413bf1a21cfcceee4145217a3d4aaba6fc9","src/spirv.rs":"9be963696fc3a6c5c75bdebcbd90cefcdb89d65b84e138b4540cf71c5f0a5502","src/sse2.rs":"82be3f657293e41f7177ea16d8d2dabe67bd6d83f51df9a9174121616231b464","src/swizzles.rs":"39b0993ca0436e70a908dca1c1c3c60e6487bf700e1535a81c0667811ad2e7b2","src/swizzles/coresimd.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/coresimd/vec3a_impl.rs":"899927465363cb3415e4fd12d1e8ae15b249f4c372e9daa3143614228d1cc847","src/swizzles/coresimd/vec4_impl.rs":"e8f84907f558b137a0bd23748dded7ebad87e541899764e9341051d51b140b31","src/swizzles/dvec2_impl.rs":"3ad5e9360577c0c42058217ae0ed3c6113372f87a7509de6c32217da522de84b","src/swizzles/dvec3_impl.rs":"93c0e3f197f364de4f57b5fd9300aff6b5c1a12a56776611318f76cda9d0b6a9","src/swizzles/dvec4_impl.rs":"0bfcfa723d40d9abbfd364cadedfe8559b2f64353c275684c58487a105e1d710","src/swizzles/i16vec2_impl.rs":"ead9d3946335f02101fad292cccde04d8c03944cf8f15e5ff9dc3afb8c372fe4","src/swizzles/i16vec3_impl.rs":"8a9d4d0d7f8faf3d87405df5f2096aad033101ba7f3fb9362375993062990364","src/swizzles/i16vec4_impl.rs":"cfe622e536ec40d8df489bb914381bb506c2e76df3c217e0545d551484ce4b62","src/swizzles/i64vec2_impl.rs":"5ccf0fa60b45ca235d0949382601008dc6828fa22a44bd9136ad2383ac87d9d5","src/swizzles/i64vec3_impl.rs":"0d0b5ca8caa5ed76e5d8f8b5c6c2296e7c5744f459a3924c1b71bae075f1b42c","src/swizzles/i64vec4_impl.rs":"02c404cf832d8f4e94b18aaac6cfa4b37b4a613030667bb1177a6c541c521fb1","src/swizzles/i8vec2_impl.rs":"780104139f8cddd6c60e293439493ca53905621f0df54a9db40d2e7b1f7bbbd1","src/swizzles/i8vec3_impl.rs":"6a8487cd03b0f6731b25b53f6e724e48258413d1a1593411dfc69d6aad2b8b28","src/swizzles/i8vec4_impl.rs":"6d0a1719050443a525309cf7530e675b9ef70a5a30ebbf1610d3011dd55ce57e","src/swizzles/ivec2_impl.rs":"c448163288d81bf6dcac8d460c8b0ae1d43251869cb05718fb6d0f1c61dfe899","src/swizzles/ivec3_impl.rs":"b407a9f158d8985caf95a610f4f1b9d44c5ec5c28e27c7a3b93134fefb245bbe","src/swizzles/ivec4_impl.rs":"29f71d33e027b76b7278ec75d849b631e299e2ddc11d1c6c7e4393bd8ae833b0","src/swizzles/neon.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/neon/vec3a_impl.rs":"d9b17b940839c39e2985071a4e7b224b5bcf74459ce76654e5f4870af920194d","src/swizzles/neon/vec4_impl.rs":"c3bdd6cc3a62df2bf12e0ed15d0296f3e1b4322f7205c309acbb00f188e3cae2","src/swizzles/scalar.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/scalar/vec3a_impl.rs":"d9b17b940839c39e2985071a4e7b224b5bcf74459ce76654e5f4870af920194d","src/swizzles/scalar/vec4_impl.rs":"c3bdd6cc3a62df2bf12e0ed15d0296f3e1b4322f7205c309acbb00f188e3cae2","src/swizzles/sse2.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/sse2/vec3a_impl.rs":"80ea163eac7c49c750c8479c8a39361bfaf5133d17e86f775a6ab0f8c7143335","src/swizzles/sse2/vec4_impl.rs":"cabc2ddd4d6b4ced8c2f8d06973bbbc1392758a8e4b905104c876c09239e544c","src/swizzles/u16vec2_impl.rs":"99f074916c778ce711161d0b10280bd37a41e0f0d1748fffefd1ca75217ecc76","src/swizzles/u16vec3_impl.rs":"f4bff967221ea6b0870178147eb4b952d170fa781a85c7a859f99dd18149d284","src/swizzles/u16vec4_impl.rs":"5e6529ed17df13b5aaa3094c8cfdd7ab7c69f82a791a3fa93ccf449379966578","src/swizzles/u64vec2_impl.rs":"a098dc7e1e64039e3a7afdeae63fc3cf1e92d6c8a2360490bb9d5c3e6614f49f","src/swizzles/u64vec3_impl.rs":"d861d0143a3b5b577d74250ec44d940cab7017dd1d4f1051addd31c3f50f0546","src/swizzles/u64vec4_impl.rs":"0bdb755dcae0a92cffb795bec383393e72d594b72bb69c191cbc91194bbba560","src/swizzles/u8vec2_impl.rs":"000df4972d523c4592b777db4920e00d4b610508826b688098973930468abe1d","src/swizzles/u8vec3_impl.rs":"27ae57970e562e2e5cae788e967eb77e2b5f28f195b21e2215ae9ad514eb2e53","src/swizzles/u8vec4_impl.rs":"1d8fb7b9696b8d5db6fd1b7c80509c186102b0b2c8cda285c1c179e45e7e4537","src/swizzles/usizevec2_impl.rs":"33623d61c77345041d9b44fb8a47e3059d470a4f0fbd0db726c2fcadfbe22dfd","src/swizzles/usizevec3_impl.rs":"a4ff705ab19ce31bb4e4142631b667e998d11c1bce49837b4f46a2f1eb8e9800","src/swizzles/usizevec4_impl.rs":"827ec0e0518b42486949d85e4839fc1369f92a94a12693a682f72c27b2bd79be","src/swizzles/uvec2_impl.rs":"c7fc754d2f0f95d01a0c59e0975ab1974369ac51902aac736b2bb7b7e6af6050","src/swizzles/uvec3_impl.rs":"e713b627f5ae1a199227f101bb939a8bd2de47022687710c7975de30892bae9b","src/swizzles/uvec4_impl.rs":"99a4af167fe03795881aba1cee59bcfcfc02f5bf063042a35dd715e907c55638","src/swizzles/vec2_impl.rs":"9770b7fec4763c2fe7a109188209b6197e7b1a81fef84207ccbd14ddfd42dfa1","src/swizzles/vec3_impl.rs":"ebf6c7a414d826421b7a3be99e447d8fb52563d9e4136a93460ee4c8441436e7","src/swizzles/vec_traits.rs":"0333c2204fa2fcf8ceb70cfacf75567010b8b81b4731aafab1e54c3df03d1fc9","src/swizzles/wasm32.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/wasm32/vec3a_impl.rs":"38ba7fa0bb2d4cb7c934e186054b9b576bc7b714cc8dc152e018483e0789f2bf","src/swizzles/wasm32/vec4_impl.rs":"ecfb171feee033cc39e720aa039b36e1115f6228751da72f0c9c66219e048a72","src/u16.rs":"8c7f16036cc69a45f4a3388c0c3b2bda0bbfd9b393c6f77f1aa6fd30049f42a5","src/u16/u16vec2.rs":"d33545f34ca1b111b139b08591f38bbcfecd53826851c309df6c78816cba3be8","src/u16/u16vec3.rs":"6794d5c228cf1602aa9db7070c1705a1c169ba42f168d14aa82e60d79faa7cd9","src/u16/u16vec4.rs":"a04c7a6e9cfec075c2f31490cc111d146d08360332a1a7f91bdd270db665fdd8","src/u32.rs":"0f3bc0a26144df8c25928b5aade55423ed219399d0adbb6ca0ef9a8a8477e389","src/u32/uvec2.rs":"70ab639669a4e64695dbf6981aaec6f45e74c84a8de77e18684d7666cddd2aa7","src/u32/uvec3.rs":"d19ceb2ef8934c5531bbacf612e948f9a1428798862163a037c8e526c802f0ef","src/u32/uvec4.rs":"c24cab370e30fd63be9dd5a5db4910f69d1bd7d4d0ce6ed78f1694b1fe65157c","src/u64.rs":"666b677ecc47fca6406f7ff2c1e89898989a56fe755f9b92acd6a7ddf4ade22e","src/u64/u64vec2.rs":"ea2286e54623f07d3de6de8aef9d2870c021c706f17455bafb4e9a38948f06d4","src/u64/u64vec3.rs":"8c40869642ff2605b4ff8f43791146d702e88acaabb9c7f905b20f47bce8217e","src/u64/u64vec4.rs":"53392742afac516edb8dc1d3aa1df8bdf63e24ba5990dabf8e7531f779b34ab3","src/u8.rs":"26b2f5a08aa5e7cd09c34d030295398eee37765a5cbb140b7eaff543a3f23a0e","src/u8/u8vec2.rs":"18e6b884247d53cb247423f41d8be973ec074ee3bd8b57390b71d73b41bb5a01","src/u8/u8vec3.rs":"af2268df3574342b1a0e6a86d3e81c5ed89a85b4df0cb29a651e8bfda88f345d","src/u8/u8vec4.rs":"89e5683f4b3f7caaa6163b34a210ce87601027261881a7859e708ef90a7d7c68","src/usize.rs":"78d27775d78b34a7c6ce6d03947e74a1d7756bb567128f24e130d3383dd6c978","src/usize/usizevec2.rs":"1c4030d41683f2791d92499fb2107012e44e2e5ff3be785a4456b72eca4461b0","src/usize/usizevec3.rs":"b4038fb3eac22c353a69822d4d8077a433c92e52882bd2a2e1a6cee3828f439e","src/usize/usizevec4.rs":"7efef7e4fa0833baee3f71794580ca6d017a40f3713d595bdb850a9f436561c4","src/wasm32.rs":"a5cc46a676281d7267644d5759ba13eba7c84ea471b5617571f6c11dce6a832c","templates/affine.rs.tera":"26c8c884d661c3663ef333371a1b77711ebbcc2905da2b34103969d2de11fa08","templates/coresimd.rs.tera":"cd8fad2b8617ad3f59edd03ca771ed3ad7939218850e25b66fbd66f493dc0a34","templates/float.rs.tera":"c8052e8382f9d6695f716999807a16ebf1ccb63f07704bdb4c434584a7912c07","templates/macros.rs.tera":"bc93f77ab95cdf9a8f9bb6069f7a2084ffc843cedd3a637e31895ceaec347255","templates/mat.rs.tera":"2e8751334ac1198e63102ccd2a808efd6ac894b92605d17cb9b258ab6a6f2811","templates/neon.rs.tera":"51f9cdc8bb93476d8e4cb042f0e5820fbf9dc963ff2f8a0154a24f4971ce8e82","templates/quat.rs.tera":"333e9ee2389e9ae77c22167b89f4d168b908c8cae946de664a9f9232544a97c5","templates/sse2.rs.tera":"173524b420903db23878bdd5404bb404e751db9f10c430a3021f91d507b5f448","templates/swizzle_impl.rs.tera":"63d6dba18a6f2f5ae2b1258de25f19049fecd8fec714631b09778c379cbeee0d","templates/swizzle_traits.rs.tera":"875a8b259cf9e0412e726c10f38dfb5087f167849d56ee12500b788d6f465a15","templates/vec.rs.tera":"668c2a31ed80502c893efe61d46cc5e894918a245a90174bddad141f5c2f30f3","templates/vec_mask.rs.tera":"85f5244b197ad1f82188f449c05670a5d8f6cc8faea2074f8deff7ce3cfb6f6c","templates/wasm32.rs.tera":"9ad4ff592b7452fc13c07804fead05a626b048b1882cef9f72961e82635e18a4","tests/affine2.rs":"50c970c1b6365c6bf0264cc834922abcad03f25db73f0039b98b87d6296457a6","tests/affine3.rs":"2969c4d669555d6245dc857fff69645477e440e83c49080e2df91cc0b938d72d","tests/euler.rs":"98dd5c10bbec80ffb20f311b81358513b85bf8f079793db6a015cfefe1726fe1","tests/float.rs":"7c4176fa6b4ef70408370366f8ca5c3ace3e22294f03f8cfa2a64ef250d701aa","tests/mat2.rs":"afce03547472e992ea3d60a2d9b1f7d221e1be00805cd4030830f05d8dfe428e","tests/mat3.rs":"7f7f2b7349cf0b6f9a4647ece5c65fcbc6e2fca85068acc905d0161e0a3780e7","tests/mat4.rs":"5d5e6b2c31c0e5018a496dc96b460efd50ccf34d4c9365b1bc431deebc42096d","tests/quat.rs":"a7d68438597ef5e7856d963623352bc0300c18ff7f21a886d6a359d745734837","tests/support.rs":"f502a6c788bb669de5b39bdc71cda88a7ce1dccd0768c0fda582f1d499e983e2","tests/support/macros.rs":"be414cf81ad962f287ec980fb5290b0e8db6d12fa0eea8362750fdb158708e84","tests/swizzles_f32.rs":"4fdc5b79dc81d56cb16208ddc886c8a87a5785f471fa2dedc24cf9fba347acf1","tests/swizzles_f64.rs":"a9a915bc6fd885a3b2a0175c2cd66f5bcc58c87f744a644a9f77d7a4916d0963","tests/swizzles_i16.rs":"1e85f9d2d8a47bb458b12504aa054d901e4947b7e24ae110cb7b35aa920988ab","tests/swizzles_i32.rs":"e564b482459145c6646a186966e7de7c9a3878d5ef01f09793f973fe94e58d49","tests/swizzles_i64.rs":"4da58dddbdb04fc43d07efe1ad55a3fe7d510cfdf5118f2b34a6adb9dc4f6805","tests/swizzles_i8.rs":"dd5baa4c0432941a26dd98ff667d8c5ae0589978f154b635c3bb6d607cc954d4","tests/swizzles_u16.rs":"b36548dfff33914ac1127b310207742fe7fc491c556755ac0a66ea22119cfb45","tests/swizzles_u32.rs":"46497be5e3b56a16c7a3fe54573d006fd346dab42733df3bc1b9291e5f078c11","tests/swizzles_u64.rs":"575b26771cfabbf93f41d14ef6ca932019ac330d216711f0d6401c09f3859757","tests/swizzles_u8.rs":"073f55ed4ed876674f8abedd38971df3da0fea5a3b9f1ebdb5e4a01e758aec6c","tests/swizzles_usize.rs":"94d3020fc34e4adfad1d186cc46781a66c32ec2363be87c9a865b94fa27b4a4f","tests/vec2.rs":"fcea34131b6ff68725025062156e9d66dfb2e3f03177cc12f5c4d4fd43517579","tests/vec3.rs":"51cf2460a4ceb7233ea25e526f57b3292f225e59f35862998690d5c9be2f8d3d","tests/vec4.rs":"cf6e3f6f306640530b7895ba649fdda2fb3aa99fd68dccf68f0e190456741520"}}
\ No newline at end of file
+{"package":null,"files":{".cargo-checksum.json":"8da56cce7ad1e5382a99d0e90daaa85049f91ca3bb366bd9a380b129813c8ab5","ARCHITECTURE.md":"c966675696b1f919fbbf82dd156cd1f07f42d182e801235cc71ac9ff5b889db4","ATTRIBUTION.md":"68351d86724034ca10de19536d3110805928de42e3c34667573784212fed2429","Android.bp":"6555527f0ceec23c7994cee8ff639d6ae40b622aa6fe2da997cd3491547aa21a","CHANGELOG.md":"b330f347824ece16110a00a1c17116b9e1d1871729b3c50d382d377e5e31ff91","CODE_OF_CONDUCT.md":"104c5c02a827d2c2916183b093e999b73e5e48c6925aae556416c52e87786a30","CONTRIBUTING.md":"b034e68df52c7a06fc30f5dcb5937debd9ebd1e9f5bedf6933681ea255a71c84","Cargo.lock":"9ebe7ec0721b30b4abc1d70947224a8138bc3eaaaf98b6b5670d324d21d394ed","Cargo.toml":"7a06910ecf72206111fde7cd8200c79fff2539b91892f08febe8bb93486d83ca","LICENSE":"0a4b5b8e2558ffc8d4b08cb0ed3a3c09acb37dfa72a72d2201e24d8ec18f8d8c","LICENSE-APACHE":"0a4b5b8e2558ffc8d4b08cb0ed3a3c09acb37dfa72a72d2201e24d8ec18f8d8c","METADATA":"65bcb9251d4590876998b72e2b3bd5ed34c6239ec7b4c32368c4a9ba2a30d559","MODULE_LICENSE_APACHE2":"0d6f8afa3940b7f06bebee651376d43bc8b0d5b437337be2696d30377451e93a","README.md":"2d4d67ab4f2787e646c584449448399844274813b411db7959cd579d051638c8","benches/affine2.rs":"258fcc2b26d17c03f117e62512c48f4f3c6edab58294ee7b42b5a00e15df120c","benches/affine3.rs":"434cec45c1c89c57807970a275ea88e7bdb2827946e737913c1974f7ebc64fa4","benches/iai.rs":"354fea0093fe1a1b45591e08e04066a01325f593df8cc76bd053dad7bba0eaf1","benches/mat2.rs":"1acd3f8853be14fb35b9dca12603d4f32f309b0749e561c6d68d625ee9ac71e0","benches/mat3.rs":"d6d443ca41ccfbec6d2ba8a55633fd05d81ad9221e36d25e20bfeba7417935ae","benches/mat3a.rs":"cab5b9f23d68a7e3d557b2ee82f41b76ca45d725eefe42f0de7866cc3cf47a17","benches/mat4.rs":"7173961ae3abc98a10b87d05132c35615936838f70951a2dda9e3bab98b472ea","benches/quat.rs":"df5ad38e88f13459654e40d56f94fb08bd813648756db19c8fc6a0f3514a5291","benches/support.rs":"282ab869c8e066884a6d32b1762c30b9533e1c873a59cffe9ba77d76ac1092d8","benches/support/macros.rs":"a5a4ff16b792c1857db9f1db4ea5c0a5c52a208d62334111726bb14b685d8fb4","benches/vec2.rs":"fab318070b1259354cb762c99d3755f6a00ec6b42b734b7a555be6de4c10af0f","benches/vec3.rs":"e8d7d3d74100bc1843eb61d71567d7d6e0478afcaae152f9587241e0a371b61c","benches/vec3a.rs":"6b0ddec0d723d9030bbe04f60082819b6d201a33808ea2615c5ff6974fb3d618","benches/vec4.rs":"247ccd8f584edf26e9b8a495493b6060e7415fe47ce19b82a8012779fdc92201","build_all_msrv.sh":"27b5fe7fe1fa47ee75dc892542d9153057e9feaae843ee720cbfbd71726241e0","build_and_test_features.sh":"c109f5faaad65e2ebfe7cae313a56238ace8d0089eb1a41c42553a2379e5a1ba","build_and_test_wasm32_chrome.sh":"ee529572839b5e48171da9a6224d8f18804339974b53866bd08d732b096a55e6","build_and_test_wasm32_firefox.sh":"1a17c0878c478ce04dcf3083c4268cc747076962bdc82e1b86d9187cc9826723","cargo_embargo.json":"69896e04a983576d21031c0dcf61c27c7e9b109f6704a4867de9b318c318822c","clippy.toml":"40ef87c643ca926e60249ae779d096c5a11b05c52ffb1cfb4dfebb534f2c9314","codegen.json":"a262bb6d42bed9508c9a983b40cfb152f6cdeca19d3130ba184999576e71a5b7","deny.toml":"9db0956606ceb22e4514cfd1155c6e1aa82598c3b724c4a0c7c9ae7d3d268971","src/align16.rs":"2e14d45f1c2bffc3c17ae0d08a78474c83dbee23236d1d3d2bcc54cb40aee6b8","src/bool.rs":"e7341a7aabfbca192ffb0d30e4e059fa516312fb2f5c5d493995ae7ae40763cc","src/bool/bvec2.rs":"cf05efd88ee72b82e7f88fa2cec609add4178f156d5f57312549ee5dd9e9b8e7","src/bool/bvec3.rs":"e44b37a7a72f9222e66c5fe5437fcf8b2650437bd2709d846506c4fdbb5c2718","src/bool/bvec4.rs":"9837f2a36ccb8c149d4bed034c8b180ed43d396cdb2320d54454df129e22fcec","src/bool/coresimd.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/coresimd/bvec3a.rs":"c4b069f13b2f5bab266a86ba9ab31e439b3d48019f94ae1fd064b0ad3a8a29c0","src/bool/coresimd/bvec4a.rs":"5b376388ce294dd857fc2ceb61111647d2b4720f8d1ff61b08aa8dec3444d7de","src/bool/neon.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/neon/bvec3a.rs":"8a08c13f893936643e39e61207fd7d9737d85b51a9670523204d9907f01cabc3","src/bool/neon/bvec4a.rs":"8ab07d9a92fbc59b55c223c7c4b07ed44ad80b303484220eb97910865b7e953d","src/bool/scalar.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/scalar/bvec3a.rs":"12437ad3845207561bd3332dcde18eac95867ff8852c9db1aebf41b4097929a9","src/bool/scalar/bvec4a.rs":"b3fa0b56b697baa2cf5f437cc1455da820e13bc0202959291657117603f34887","src/bool/sse2.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/sse2/bvec3a.rs":"cd3a449c408bfbd592a21639fbc1fa1ecf946a276868c96b2d3915d6703d3e5e","src/bool/sse2/bvec4a.rs":"dacf2a8405fd98043538857c52998a535996442ac96f45f7fe4e6e9771b4acd2","src/bool/wasm32.rs":"d6cd7887778deabcaddf4479a6b2bf5bf47143b0726459f4a67cc6ff038aa2a0","src/bool/wasm32/bvec3a.rs":"e989d5b6060d611c05b13a3e4d930853e4d379bed325d77ba3a6194fa9c16968","src/bool/wasm32/bvec4a.rs":"00019b746abe31aa2c336420a64a6b57db43b524407037f744d1285f47f3d2b4","src/coresimd.rs":"cb848dbbd30ea3ea6766311ac18587cf2549830e09304d3828ef883ed2a3e198","src/deref.rs":"d0f569375c4621f6a8b0ba38a2e9fb29e6aeca50efd7247d226f1b1ae6d0f766","src/euler.rs":"663daa28c7e76ae8a692916ee8f31d93e60ccd19e0954ea689f64b3aa06f8ffe","src/f32.rs":"969ac5ed16361b01df5f9b62707d5c9e7eaa4bf99409a80824dbd93ee353ae2c","src/f32/affine2.rs":"1676e06e1ddc50433e365bdae17a97040f9430e93c638cd39059b110d22419d5","src/f32/affine3a.rs":"8d15fc62415b8a9ed29e40cf8e90b1062829c5812b39ca79b0a353db39928501","src/f32/coresimd.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/coresimd/mat2.rs":"ac8e71788c067c3bb4d6dc328d202bd772023b61f26a30088d413ba59553be77","src/f32/coresimd/mat3a.rs":"8ff96feb07e9737b53819f8b54f994ee1105458d2fb1146d5b30ea361f5875c8","src/f32/coresimd/mat4.rs":"add8a9301bf2d81c345262ae7834ce025dbb80e8bf9b39b834486cb526941c76","src/f32/coresimd/quat.rs":"4d261ce4cb80152abe5a0a8722cc829835d965a96996f4fe8d62a960da9f1fe7","src/f32/coresimd/vec3a.rs":"9d6085739b68ea4df7db99c734b63e2f58735480c4491118742e206ff65768e7","src/f32/coresimd/vec4.rs":"32cb5e5164d73ef3fdf6ee69470ac97d3b890b245380da90c4c4a57659106f43","src/f32/float.rs":"bf57e6e766268eed53c19c539caf7da4565c7ad60938b0bddc37b1f019e87f55","src/f32/mat3.rs":"3d9d7ca6ec30f8b658235314740fbd9057a075303cc51a603d7ffa64b8e62373","src/f32/math.rs":"532d687bb7bc20ccc2f3f1493fc682a9f59d67d0fee1e9a469414e5000fe598a","src/f32/neon.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/neon/mat2.rs":"9e0fae6b7a987149bade42e23b0379f2dfd930b7fe170befce517838534cd173","src/f32/neon/mat3a.rs":"1a885e8bb75e7f09bfaf69eca461bba35a11bd453aca2b36ab15cfccb86dabe4","src/f32/neon/mat4.rs":"e8bafb5952314c37a16259c6f3edfd8cbb0b9f01113a91d906539ff3f2537a16","src/f32/neon/quat.rs":"92474490b684fd58f62f33c7010a28011e0363a1a07ae88c67bd690d8d440f17","src/f32/neon/vec3a.rs":"0dd91b0eef9d3143a94480a4bb63958b826b563467e56d5f524748f71bf61666","src/f32/neon/vec4.rs":"d7de95b71781dec61d207279fecbadd95e95d5e9d8454e1835d1aa5cb53da6c8","src/f32/scalar.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/scalar/mat2.rs":"83dae4c0232098736a2cfbe6665631a795f08734b44f7ed5055f322bb44116e3","src/f32/scalar/mat3a.rs":"cca330ae208dc48a0eb0cdcf3d2005362331a08421f6859bd01313411d63dd08","src/f32/scalar/mat4.rs":"92abda4399d5e837fa2ba3a3eb068ada54b2f6a61a1fc58bc722845d0bd2f7ef","src/f32/scalar/quat.rs":"0115a7f1e72db7ffc1b0dd91e1d0a0f31b1bd5550ce125afe0606f1a6eb2256d","src/f32/scalar/vec3a.rs":"d1e77f85b4104e4a797a5c6b22332e218c6c3f46709369f5543932cde80a6ba4","src/f32/scalar/vec4.rs":"150d931589228fad0b3004a4f8b7fe8db8ebd0a8c1b2f774913470428ddedaf8","src/f32/sse2.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/sse2/mat2.rs":"f95b501c277720fb1d5011cd5bc58b9eb3bc3df157d3dd357ffa8b3b5495d8a0","src/f32/sse2/mat3a.rs":"152cdf0d21ea5c48abf72a68d0b9f749587c350ae0ebd143f1280d4c10cf2b7a","src/f32/sse2/mat4.rs":"3bb2d873d3652949221348244820da0d8084aac1d00fe8c77c16199a753fc99f","src/f32/sse2/quat.rs":"495f22d62e9f82ee7d7b6a8e244e0749203291254b295784118382adf72a092b","src/f32/sse2/vec3a.rs":"d3f72bda8714b52765667fa039facda59adbe9b7d2a06d2fc3b56eb8c77dce56","src/f32/sse2/vec4.rs":"ca6e287742354439253b6612a64dad6af35bc6de21597e2a6d53a33eb7a7cc05","src/f32/vec2.rs":"71310e66934e3d6403946248843ce082c6e77832db0b5af13c58c80541adbd68","src/f32/vec3.rs":"c9cea6a3e1a477b94f95630a39d18a6297245d6784c405b5489270154bd7e614","src/f32/wasm32.rs":"c5b4c408788c9a557811e4e3e8d66aa4ffe73014025a7a7ba49351de39b4d856","src/f32/wasm32/mat2.rs":"e1f181bcaea4c9f8111e29d0843258d518c831ec36f89434108fffc72a3cc62f","src/f32/wasm32/mat3a.rs":"5046b0d1474615b4b51d7a4d3a89595b62373f46fbf87472ab949e1d2a030c52","src/f32/wasm32/mat4.rs":"16a2397f77066f972ecfb28d3f111e1b621298cb32fd24234058f985b2d4ed4e","src/f32/wasm32/quat.rs":"1a91cccca257ca8307294c9cdff08641a272f4762e7d9a8dfc3ab03d78e1009e","src/f32/wasm32/vec3a.rs":"0162e964da6b9d0db8b0ad6d12aecc1392473d54b01149b14805275116bd0e7c","src/f32/wasm32/vec4.rs":"d2f1d1df82831ee508011a6a93d7920dbb14f4c2133744c15715ed05358e2bc9","src/f64.rs":"8bba8e3435de1b4d049e4e81046eb9ba7fc155de73a0349721124ccf947bf24b","src/f64/daffine2.rs":"16b0747b7791b731268b3758672031aee4efadfa01aa14f408de90ca42eda8ba","src/f64/daffine3.rs":"8f214dc33a4a3296cba2242fc75ce44e4a2d6d1f4e1449bc46aa71d3aaf6fb15","src/f64/dmat2.rs":"1f548fedf8ff06da3277253d82505f95f62b02255fbd379400a82618127a9825","src/f64/dmat3.rs":"d8b45d56992596459b7b05eb0e60f26574463257e96305137249b597864088f4","src/f64/dmat4.rs":"b7a2e17a3c8d1a2ce8fb5998cc7cf033efb2ba3025bde9088c825dd0bcd4e88b","src/f64/dquat.rs":"62dc887b49bf7955adbd77022a96cd4fa7aa0385777bfdc3d9fb317b74265383","src/f64/dvec2.rs":"b5c69d01b402c9b4be9d7ce43a0d9d90b7bdf3770ebdebac36931e0d13d05eaf","src/f64/dvec3.rs":"d1a81def8333d19944512b14a43c66ab098cbd833c19f2bf326c274d93aef911","src/f64/dvec4.rs":"57c225c746a998bb8b1a3f1056766d115cf7a0473cd16036c1e82c6211d5d064","src/f64/float.rs":"102fa6518a6063b0e459157cae7986f8db37c51701a0513c23300568ef182019","src/f64/math.rs":"0bc65d82cbbddf0c4862f135dae04d457ee00a14652c81145ad42c6a8db11fba","src/features.rs":"5061c1c37d9477b7b0453b9b3f45ef0fe23187f1348b0143607818b9adc20515","src/features/impl_approx.rs":"74ddf0465fcf62b8764e2e98b8b4c06ffd8f34e1e52e644f40509a9361855f6e","src/features/impl_bytemuck.rs":"efc477603319e39318cbe74dec2839f992eda49446cb6100c7ac67b9425b63aa","src/features/impl_mint.rs":"8b332154ae0e3897635e31cc14c39b5bca76521516c5b757e9fe5f0151ad9ad5","src/features/impl_rand.rs":"f3a4c6388f8ff9d312a22300dd245773c8f5f8803490f03fe6378fa6169c4f7a","src/features/impl_rkyv.rs":"dffe601afbc9a4e966678a172014bd5cb391a23ff967bd495307716dd0f1c2a3","src/features/impl_serde.rs":"3b4ba052a96fb147575186160486f7988316f5848e25af17957ce8c1dad8bb69","src/features/impl_speedy.rs":"41af30c30229d50579739297f44fff0f9f4add2f97026cb6f8e9d607f2b8e276","src/float.rs":"d3abce9be482305ee00f0688343aa0dcceb8d5505017093d704267dc54202e32","src/i16.rs":"22bf65b210b7e60ee8233a891924920e5b6604acbd245c81e7e645af522cbdcb","src/i16/i16vec2.rs":"0e446a4a9fae557136c7da942871533c08957c1f9c4452c4e08284519eab3e77","src/i16/i16vec3.rs":"218b0b4ce896bfa403e7df9dea39fee3ffc539e5aa8168a79be86b7f6f4909c5","src/i16/i16vec4.rs":"1952acc53c7764affdbb33cb53da5d51f8799fc8e465714580e34a624780de83","src/i32.rs":"77f8a832de656ca5b7c19f6814320d283c84323e774a9ebc415b4ad87e028569","src/i32/ivec2.rs":"afd025ce6fdfc8f2c2e43d51d4d68a4acd3000675efa7cf67566b086a34e2437","src/i32/ivec3.rs":"57b6def6d4c448b3919bf504defc90925b35ac84a1a200433a3051fe25294917","src/i32/ivec4.rs":"d75e347d32941fad693470cee293dba8445be668cf819711e93bfa96689e24f1","src/i64.rs":"1c71d9921ee0246800beeeadf49a322da5bf85f2832ffa1934688e242e735626","src/i64/i64vec2.rs":"c4e608db1d856c4c9637ee77da763f41f066da7c68381d937aa3d773acf9f7a5","src/i64/i64vec3.rs":"6fbfe58affc0b6b1228299acec0488aee6d189c136d71bd973bcd616f9f5efb8","src/i64/i64vec4.rs":"88ba43dec86502f8114ccdca171de323ed214d15944543e2db1dc4e3d28b3849","src/i8.rs":"2c09d6e947b9924a8eb3f9ef4dbf80f906a68bfd0905be3fdb7a6d6a030b9be1","src/i8/i8vec2.rs":"3ea0bf82643d42a38d4053d99c6498b24588c58037ad3058ed64e676e25ecc92","src/i8/i8vec3.rs":"bf6a9430fc7f8c7791260fa46301086c1767f6e1d5a942754e57a70b885643eb","src/i8/i8vec4.rs":"e79169ceb87793369f0eb1e3566869140c843bc5c512d9ec7458995767ee69a6","src/lib.rs":"3ebaba7a51f5311600abba8ce1e920eea1352622619b640ad5c06c488c622d4c","src/macros.rs":"3954a434a61e1ad20da04b807dd6fdfa8015558da845c7ddb307f303402ccbe8","src/neon.rs":"4d3e1e3b311101913cc7e31e1a4e7413bf1a21cfcceee4145217a3d4aaba6fc9","src/spirv.rs":"9be963696fc3a6c5c75bdebcbd90cefcdb89d65b84e138b4540cf71c5f0a5502","src/sse2.rs":"82be3f657293e41f7177ea16d8d2dabe67bd6d83f51df9a9174121616231b464","src/swizzles.rs":"39b0993ca0436e70a908dca1c1c3c60e6487bf700e1535a81c0667811ad2e7b2","src/swizzles/coresimd.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/coresimd/vec3a_impl.rs":"4544ee41787327f3360f80956285fd19d42ec00dbcd025057fea0023c3caba04","src/swizzles/coresimd/vec4_impl.rs":"20bfd6c0f8a81aaf0e396c098a9c511b216a69ab62aee4102cff1a5e368d1cc2","src/swizzles/dvec2_impl.rs":"dd539c36406e44c4fc8301bf03a19ac043edf6338b31738d2f1e14ee8382daf5","src/swizzles/dvec3_impl.rs":"60dc0ae4018a4781f424a44a2ea158894f1a04d9b47026c68644464fe885548c","src/swizzles/dvec4_impl.rs":"fcb8ec3aa4e1f6ec48bf4bffaa350d55c10ed6dfd7325453cdcf44afb09ce46e","src/swizzles/i16vec2_impl.rs":"79c6a7a3fa4404e0a71e8138671e65f2dd890e6086f48411de774834780e602b","src/swizzles/i16vec3_impl.rs":"d0a5827614a5b8b1895b4e920f8052b6f713b210b929575632cb2aebf535af30","src/swizzles/i16vec4_impl.rs":"0f2dd605750ea107ac9400573883fbd243541ef1828ba0caebaaaeabb1528450","src/swizzles/i64vec2_impl.rs":"67c4d74ce7cc77b69f4830994e800876fc168965df1dbb78f22b17a38869f1bf","src/swizzles/i64vec3_impl.rs":"799275bc35e108f954c4ef2e32b31dd43d7e9c043958a4c7eec30f5e3d07c175","src/swizzles/i64vec4_impl.rs":"075dc5611ffde4be94e5731b4111e7725fb4a13d7c5a24a7df34e437caf02941","src/swizzles/i8vec2_impl.rs":"1a1611c2b3cba70e639f6a7e148c1fa516bd9c10ccaff1f669b142ddd4d28730","src/swizzles/i8vec3_impl.rs":"663b2a900ceb6aec22ef923d565636107a4e16018ef22ae2b1a06bbc73029775","src/swizzles/i8vec4_impl.rs":"4ce637189d512c23374916d55c43b0117f72faea83adc285086981420e4555d6","src/swizzles/ivec2_impl.rs":"568c017269a2d1a1dfc24dc7e75541e5bbe6c85620f0ce57fd06986e8e3f836c","src/swizzles/ivec3_impl.rs":"3c519aa5a39a8ceb6911a7ef1dffbd0d0f1f171cf4b2b9c7f08bcba2b773e342","src/swizzles/ivec4_impl.rs":"2d42d45d5b0f345137f723af47ef16b8b6dab4eb7acc6e8dadd50063a97cfdd6","src/swizzles/neon.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/neon/vec3a_impl.rs":"94c772ee8294cefea15a442e57e3b2d54a1040e8263a89bf9d80a4f93b280f32","src/swizzles/neon/vec4_impl.rs":"bd034d14c99d3d50220035a993d458eaf8a91bac58f8e5958eba9e7b51c83b17","src/swizzles/scalar.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/scalar/vec3a_impl.rs":"94c772ee8294cefea15a442e57e3b2d54a1040e8263a89bf9d80a4f93b280f32","src/swizzles/scalar/vec4_impl.rs":"bd034d14c99d3d50220035a993d458eaf8a91bac58f8e5958eba9e7b51c83b17","src/swizzles/sse2.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/sse2/vec3a_impl.rs":"4231c635ffe52a578a98cea187a35db107eee44345bbb3f9188d23a2979f7978","src/swizzles/sse2/vec4_impl.rs":"70a41fe6f7f798303656f9e847255088659aa8c9ee7bec2e1c9504ad2cb3c5fe","src/swizzles/u16vec2_impl.rs":"cfb372424db6dfbe44ed339b088c233f324826bc5084e823ef142de7eb74ba10","src/swizzles/u16vec3_impl.rs":"3ccb71f3cc1863a6b64b8c261e060e4856b69f8067f631a3d22523aa663c1a63","src/swizzles/u16vec4_impl.rs":"ec80e7ef63802b628511a56e1f0de7683a9c3076034747c0683129cf1f76264e","src/swizzles/u64vec2_impl.rs":"968a51e7982b682f820c16690f67b36509b7a82c8b197ec360e9bd3f4d488ff5","src/swizzles/u64vec3_impl.rs":"449cc55b21be47506f49877397bc58e84dda826d8734f8f1d014078d9ac55b61","src/swizzles/u64vec4_impl.rs":"1516dcc3d73500eb9f235887bea55d092bd7fc2b9c7fda65c7ef36691e2fa3e5","src/swizzles/u8vec2_impl.rs":"c2e404df61fc523a0196ddf1e5eea9692f1456e50333159a9c6c4e33d3d97dbe","src/swizzles/u8vec3_impl.rs":"caa7b046ae7c4ee5708aa645c8f8c0e8a960ab431b547162d7c3cc672267eba8","src/swizzles/u8vec4_impl.rs":"c31d42758273a97af85dc8c989f76081ba952896c7342a3b3c11d37a046eda32","src/swizzles/usizevec2_impl.rs":"2948b305afcd533b298a6bf1092610932bdc909d31002692fcbb6f2a7fa41c94","src/swizzles/usizevec3_impl.rs":"4a3cb9b9ee5826caa11994c4bb06d3e47ce1444f6624614ea542a382bd5354d4","src/swizzles/usizevec4_impl.rs":"4a62fc603dce6ecd60f1661c6d187009c39075519999b0edef906376990a2a46","src/swizzles/uvec2_impl.rs":"8c62861b22c217278af6401883250f500d6f4ef093440d9b1e2f91c4388f72d0","src/swizzles/uvec3_impl.rs":"825a84d8d0a5083446c37450e089468f19ad0aeb2bdf14f6458faf8c2c9c2e93","src/swizzles/uvec4_impl.rs":"186dbab13336275c1aca8f4af2015da70ee7a8b3aff3bd9921f318c2b81d3ad0","src/swizzles/vec2_impl.rs":"866b7f6b5004d0da8031fab663f0b0608af08cf60e40bbea600728bcfc51d486","src/swizzles/vec3_impl.rs":"723f4ecdbdcffecece71398b604f29fc19a6dc299888835e9bdb299919c1a5e8","src/swizzles/vec_traits.rs":"0333c2204fa2fcf8ceb70cfacf75567010b8b81b4731aafab1e54c3df03d1fc9","src/swizzles/wasm32.rs":"b2d62479dd699c08098a1400beb7653a38f64ff61bda3ce6fdc8dd9c7588ca93","src/swizzles/wasm32/vec3a_impl.rs":"237d54f2db58546fe6a0d4c876bb6f995027d701b042f604c23c187decdcb01b","src/swizzles/wasm32/vec4_impl.rs":"2843a7685f72f143045bbcdd3965f3898b09dc7d59bf5c1d07f558f6e13150d2","src/u16.rs":"8c7f16036cc69a45f4a3388c0c3b2bda0bbfd9b393c6f77f1aa6fd30049f42a5","src/u16/u16vec2.rs":"dbda764c85029290781d5142f627fb8dc02ad871b95deec290c664fc96ebdd67","src/u16/u16vec3.rs":"028067f96ccb129bb2da7853fcf0ba4123ad041d883349dbd08d15c74e76886f","src/u16/u16vec4.rs":"60a5737106da45c41177b6841eb28f8c2b177c761bf8ba14cc85c435cb814409","src/u32.rs":"0f3bc0a26144df8c25928b5aade55423ed219399d0adbb6ca0ef9a8a8477e389","src/u32/uvec2.rs":"5cefa33bfc76691ce27f3d5e0086870750ff29a4a5023d0fe894a394af8444c1","src/u32/uvec3.rs":"145dbd280c23c9ab165bdf65cc115054f0a9d89c25cb6adbd4ee177b27a5073c","src/u32/uvec4.rs":"035c33029542d1638a9b402207d4a302dc16cd3ab116f036f5bca75455003a6a","src/u64.rs":"666b677ecc47fca6406f7ff2c1e89898989a56fe755f9b92acd6a7ddf4ade22e","src/u64/u64vec2.rs":"8ad57d782d36dac93fb196e4322c941a13edfc9bceae085e18c84a7e61bca910","src/u64/u64vec3.rs":"54514867936edd05c8fc6bdd93ba91681795bcfb9f634d5601092c0a5d70eca6","src/u64/u64vec4.rs":"a94d0a23f7b15e8ae6e7be95993ab13d4d16acc8afff52bc053a17b3e16a1496","src/u8.rs":"26b2f5a08aa5e7cd09c34d030295398eee37765a5cbb140b7eaff543a3f23a0e","src/u8/u8vec2.rs":"13f8d0a6b7a61fc378d54662e662e8fafc11c7cbc574c8a4de7f7a28619b553a","src/u8/u8vec3.rs":"36cbc8693e528f8ea262c9e0e09d9492c48b4813111d172409c2c189afdf663e","src/u8/u8vec4.rs":"ee6ac9bac532f09288f69d94ef75e0b08ed347d9460da6d772c5a2128fc5b14c","src/usize.rs":"78d27775d78b34a7c6ce6d03947e74a1d7756bb567128f24e130d3383dd6c978","src/usize/usizevec2.rs":"2d3ecb71f86879c3ca81c9579f67263367393255d54c1ac19da2b312ff3beba0","src/usize/usizevec3.rs":"81f4264ca4c8b8a45a528fcb1b01455d8ec96636ceb73e4ccdb86b371018cf33","src/usize/usizevec4.rs":"b4fdb47748db7545d7f99d27d7662115177ec42a8a43d50c6b711afb604791c7","src/wasm32.rs":"a5cc46a676281d7267644d5759ba13eba7c84ea471b5617571f6c11dce6a832c","templates/affine.rs.tera":"935e9e8c30c10a256d1bfdd70225eddc831cfe277456f8ef907aec1721c2d53b","templates/coresimd.rs.tera":"cd8fad2b8617ad3f59edd03ca771ed3ad7939218850e25b66fbd66f493dc0a34","templates/float.rs.tera":"4a3afe673f74059094394faa830e2c353781e1e37d41c98112eae4696812ff79","templates/macros.rs.tera":"108ae5f9ae4a5f0b49d5783acbf706560162aa3c95cf87185d07e2e2a80e389c","templates/mat.rs.tera":"132541915a3553529e59f0e7520a8bd731819d305c31ae02bf9439cc5c564a00","templates/neon.rs.tera":"51f9cdc8bb93476d8e4cb042f0e5820fbf9dc963ff2f8a0154a24f4971ce8e82","templates/quat.rs.tera":"d3528fa053887f9b776220078879cea1710cb5def5aa7348d2f9c7604e859435","templates/sse2.rs.tera":"173524b420903db23878bdd5404bb404e751db9f10c430a3021f91d507b5f448","templates/swizzle_impl.rs.tera":"77ee1ab36f8e180a12ff7fe4c2408360e3bcbd5dab3cd9e758bcd712bd27489e","templates/swizzle_traits.rs.tera":"875a8b259cf9e0412e726c10f38dfb5087f167849d56ee12500b788d6f465a15","templates/vec.rs.tera":"6b5daad3a44a76c7748930856a2331e1e04349944ae1c3394db28be2ccd582c5","templates/vec_mask.rs.tera":"f78333cb3ab849cc142593c282df3eb903a06f01b1c15314a1a5eaafb65c5ad4","templates/wasm32.rs.tera":"9ad4ff592b7452fc13c07804fead05a626b048b1882cef9f72961e82635e18a4","tests/affine2.rs":"7fd8488e96ea851946096b4243d2f78ee9c5d3166386c231f14d6ed549260869","tests/affine3.rs":"e52d43892f617c3bc50e267c33d2c77a221b0d1d3dc2c10b8dee60a267e5c94f","tests/euler.rs":"98dd5c10bbec80ffb20f311b81358513b85bf8f079793db6a015cfefe1726fe1","tests/float.rs":"7c4176fa6b4ef70408370366f8ca5c3ace3e22294f03f8cfa2a64ef250d701aa","tests/mat2.rs":"665e3adc47a869fa618b977cbd627bdfc2367a4ee26bcfd698b5afdf3bdc86cb","tests/mat3.rs":"8301d3d0cca9bdd2da745f39b58c75a9bb314b699f8e4793a7efc79f197a07bd","tests/mat4.rs":"2dc0ca0163437c119f3f33e313d3dea8cab2f684bbaeebf06535964923ed3d6b","tests/quat.rs":"5eae47fc9d184ff83f2eedf7fe81095f98c4cfff1998283161d5f2e49612c3f5","tests/support.rs":"f502a6c788bb669de5b39bdc71cda88a7ce1dccd0768c0fda582f1d499e983e2","tests/support/macros.rs":"be414cf81ad962f287ec980fb5290b0e8db6d12fa0eea8362750fdb158708e84","tests/swizzles_f32.rs":"4fdc5b79dc81d56cb16208ddc886c8a87a5785f471fa2dedc24cf9fba347acf1","tests/swizzles_f64.rs":"a9a915bc6fd885a3b2a0175c2cd66f5bcc58c87f744a644a9f77d7a4916d0963","tests/swizzles_i16.rs":"1e85f9d2d8a47bb458b12504aa054d901e4947b7e24ae110cb7b35aa920988ab","tests/swizzles_i32.rs":"e564b482459145c6646a186966e7de7c9a3878d5ef01f09793f973fe94e58d49","tests/swizzles_i64.rs":"4da58dddbdb04fc43d07efe1ad55a3fe7d510cfdf5118f2b34a6adb9dc4f6805","tests/swizzles_i8.rs":"dd5baa4c0432941a26dd98ff667d8c5ae0589978f154b635c3bb6d607cc954d4","tests/swizzles_u16.rs":"b36548dfff33914ac1127b310207742fe7fc491c556755ac0a66ea22119cfb45","tests/swizzles_u32.rs":"46497be5e3b56a16c7a3fe54573d006fd346dab42733df3bc1b9291e5f078c11","tests/swizzles_u64.rs":"575b26771cfabbf93f41d14ef6ca932019ac330d216711f0d6401c09f3859757","tests/swizzles_u8.rs":"073f55ed4ed876674f8abedd38971df3da0fea5a3b9f1ebdb5e4a01e758aec6c","tests/swizzles_usize.rs":"94d3020fc34e4adfad1d186cc46781a66c32ec2363be87c9a865b94fa27b4a4f","tests/vec2.rs":"09b30e4e0ef1d131105d2ac34ba70d0ecdeef7f03420c9d6c838e8968daa230d","tests/vec3.rs":"56872146edb9de659f10298e8768782bbd6798d3d65ac9f60ef8a68f085ffa50","tests/vec4.rs":"bb0a373cc53657ed64f566fde7459ffd78b5794ab28ba6146bfc469082544b16"}}
\ No newline at end of file
diff --git a/crates/glam/.cargo-checksum.json b/crates/glam/.cargo-checksum.json
index 41399c5..2635eff 100644
--- a/crates/glam/.cargo-checksum.json
+++ b/crates/glam/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"ARCHITECTURE.md":"a96ed48f5d407355624d7b74facf4a1bb04c15aaec38045f4dca68092198518b","ATTRIBUTION.md":"9f0738ead3dcc72bac87afc652c2466e1bc130d235db7798f98da4d4ef013639","CHANGELOG.md":"569cb3f6e6e738278e2c9f7cf2ffaed5993d8004128a492cfac8eccb1dcf876d","CODE_OF_CONDUCT.md":"88504558eb3470566208af69870487d373e6687575e8c9b9863f517f16309d81","CONTRIBUTING.md":"868a8e28e6fef5c1f050f9395b3366ecc8452f285a911beedd8753bedcb21501","Cargo.lock":"9415bbb4f77bf1bdafa582e6f041c2e8ced390a4b338627724c483dc8878e70c","Cargo.toml":"9bd5c1c640062818af32ef31d0411af07f72e08c9cc799225f52fbab3bd2b28b","LICENSE-APACHE":"be33ddb87a30fd321ab100e2d922cba512e50ec7a63d8e62e5bfc0798dd4b585","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"ec75a055f064fa34836baba31d70d7549705ed9850378ec4952b3e3e9a43de65","benches/affine2.rs":"4ba9257aa4abad4d3c81fe25829df128c3fe0ba756a976f1cae7aac9ec433589","benches/affine3.rs":"0a1d764c5cc5eddafd8512f062b2bfa90535b8cc5d9d27d7908726a880269294","benches/iai.rs":"a6c962866706e325c108c810b263b2c148db0667508948f95a59f92076041b39","benches/mat2.rs":"7341b2ad178ddb497a359a49b542af09a7ce4b77f6680170f1f621dd3aa8a729","benches/mat3.rs":"4ca689ed8a6f6de61e65e276f422dc83e35801d582f747ac5fbedbecc353d623","benches/mat3a.rs":"c0314337fda316640402de961a7423da2a59c6bc570c96826ea2338438595538","benches/mat4.rs":"a26a609364f648d287d672f467929c75f0786e2fe25e7fccd5b05493ddda3e17","benches/quat.rs":"5dfb6021b0284b1f3fa09b4671358c4af8cdc2a206d36e87656cba527638857e","benches/support.rs":"370b4e19c81726fb6adb61e20f3451510656aa819190c811257edc2399f040e8","benches/support/macros.rs":"c05454927c2ff3e846d2d3dcd2605feb5293bdbba4767d7f352dc538ab369fc8","benches/vec2.rs":"ed4a4bdc22404beb00406484c0d60c240da6c276ecee9b48bf0e002469cf7fde","benches/vec3.rs":"dcce3a50add4bd5a823b18f34907562150f4e426aff56292a5f2447e8f74e7bc","benches/vec3a.rs":"b0aebc7e3ce053428944ab0365d6343a8dadba1b3e815b48caf16cd6cd208294","benches/vec4.rs":"07633a80e81e566c9f411be8b0669f8479f06084c541492e1b50e91e118b5c7a","build_all_msrv.sh":"35fb2d91849e4d461a35975017dae223ce55dc9b06a89f59f3a418a71ba99861","build_and_test_features.sh":"1043f30dc0dc61b9679f97e9f3914c4d41f630a3d22e51fdcfc6f39639330543","build_and_test_wasm32_chrome.sh":"503dc45a409348c02365bae3e67b4148874a69ff8bd7e0747702f8cb3d981cdb","build_and_test_wasm32_firefox.sh":"02effae982554c4e12449c5920706afface32e35b86e7cd654788dafe58e0a20","clippy.toml":"07e0a01b7edd3ca1d49010353642068329f66a4da5d1020ef20f336552e94831","codegen.json":"d67358c4454f67fc4af6e7a2a5dd8a496c4c2c7eda2e0e0364253462683cf9e0","deny.toml":"233beb334f03465ce25cc8935d718aff35608b9e1f1a3637c22cbde37f1a0bd7","src/align16.rs":"41e75bd6cb6d96769dfcd8c3a5bcaaee3fc41da4bf36c2e893b939776d357050","src/bool.rs":"a6f074bf78d24728c07539edcfc8d50429eb6bc97b9cb7d32ab1af550a4b14a4","src/bool/bvec2.rs":"655ce38d619f591059d61dd581441a9f99646bec0e8cf15c655d5f1ad4976482","src/bool/bvec3.rs":"08e4f7e701f2a8dc7b78fc7120f3387adde619b2bbf623fdde6a14efe1e1ed1a","src/bool/bvec4.rs":"281ace0fd568f1336ad9f07864eaf83d2c75f892bd5817407775a2454dd01528","src/bool/coresimd.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/coresimd/bvec3a.rs":"2c44d70cf7be1a906e2b98c2d0a8da56df1ddb5b9b6834082dd216497c048d51","src/bool/coresimd/bvec4a.rs":"77691b592b1bcd41bdb7d16e732ac90fb84a287835eeef3851c089b9d8b6043f","src/bool/neon.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/neon/bvec3a.rs":"b2c2aaf47022ce787c370e36f9d040658ad4ed5e0eae049fd0efc06a8ea3624d","src/bool/neon/bvec4a.rs":"fda60780fbf4fc968f5905c4157ddf471df4e13dc148c51e8083ca9c5e11f931","src/bool/scalar.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/scalar/bvec3a.rs":"3604894ba5f9f58520ca5f96f53af3e2955537a69ce7ffa9de9d8aa4e615f2d4","src/bool/scalar/bvec4a.rs":"2d7de833a12ee8db0ff8a5c4eb8cfc08b81edbd9995214c835a4a017f362a35f","src/bool/sse2.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/sse2/bvec3a.rs":"e63e4e579bebdd8044dabc97033d8e1cd252e815b9c64034b768e2bcf7f6edc9","src/bool/sse2/bvec4a.rs":"14ff13b525f0af5932bd803d312b64d34195c26e49d055300e917eabd7326e54","src/bool/wasm32.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/wasm32/bvec3a.rs":"c598f68d530896e3f491167cd48910b992765df4786ac138a6895e3b514fb27c","src/bool/wasm32/bvec4a.rs":"6004524859e1cbd4082a5ced61db0f862f3d28406bc2107c3f95287b30fdf4bf","src/coresimd.rs":"ccd524501c85ea0d882221000096335fda1ab325cfb2ebfa37d0c60f927c975b","src/deref.rs":"bea56fc27cabc3f7fdcd6a95bfee5c445419e83fbe4356b8c0979894556aa253","src/euler.rs":"ff47d3aecc4e10e76a7d9f9a0c94954d7c16ab898348bf7efb6d8d3d178380cd","src/f32.rs":"b6885829e99db3b3dd5e8245e856f5e8079e19b91bdebbcca398e6dee94a3231","src/f32/affine2.rs":"d364776f518be8e99cbcbb8bdd350d5c28fb0e44fa95f8160f9ecb7d365efe66","src/f32/affine3a.rs":"6b150a4fd37eb9f2068e65a282b6e017ee84b56b27b16f93219cae84c46ec663","src/f32/coresimd.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/coresimd/mat2.rs":"e4ea9ab8185b687f9cd62bb7130e30517e7fede75d5aab55ef033ebfcd28457d","src/f32/coresimd/mat3a.rs":"9414b8e00f88e5ecee400d2061426b906370dc556fcd85134474559c2ec56556","src/f32/coresimd/mat4.rs":"f9b250460b18ce2d7c54ab831069978f2a897b1e66ef7a134679786e9d030990","src/f32/coresimd/quat.rs":"d8ece951af16481ab64f28078d90a389d2596da9c5bc8af42d02a14bbebbde10","src/f32/coresimd/vec3a.rs":"b03c8621ce73d62bcac5c94edfb4afbde6146d27fc3ea47ce7ad76254e53b5ed","src/f32/coresimd/vec4.rs":"01f6ceea6197e3532b1ec704a0df35427f10277e3459c83973f8e5c0eb45d464","src/f32/float.rs":"094664c3af17597a6ba9b4cb28768d263e8d67fc321bdea176a605c54136e8da","src/f32/mat3.rs":"9b1c27272fe35631c5be0f4fdd75135edb76bac6996c2b2b446913e84f29cab8","src/f32/math.rs":"eca6c43834afb5fcfa67a449508fb84b0d51d3207ce0fb53d1ec74d15f3e63a5","src/f32/neon.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/neon/mat2.rs":"1789f6f89408d3fab821befba3bbfa8cf975388d5d120b5ab77b47fff27af917","src/f32/neon/mat3a.rs":"b21ebc86a054ec531af4b227ee8955a77881d4bdc6fc50311fb81a0f469a6405","src/f32/neon/mat4.rs":"388f172ac028e04f8d985afb07d7c008c62cb7d4dfa594e42620900740a05a41","src/f32/neon/quat.rs":"f1a012a9b2aa83a2fbf2c8267d46d7f3f37d0f22a96e88d79738c5412291557f","src/f32/neon/vec3a.rs":"55fc5a5c7ce218c3c5fc225ac0f8c8130abfa7b3797fe8b7fe10feba64f695e5","src/f32/neon/vec4.rs":"88f0a603ad7efd74ced9cbd514a3eb6d8877d36030b80add94496fdf8413c7fb","src/f32/scalar.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/scalar/mat2.rs":"0420999d22c73de55996753249aad9f5dbfe5f9cd5899eeea2c5bd0d150aaa87","src/f32/scalar/mat3a.rs":"2bf29fecabf8a1ed35ae2bb36c7dfdc7c4ccb8f618949644f899980d077b9a0c","src/f32/scalar/mat4.rs":"5f14bca99ece648b11ed930111771be880ba480292cf52b87bf77c879eaed760","src/f32/scalar/quat.rs":"6babb7bc4088e9fefbcb8e1265dd7539f0d2b944a9f0ed44824af63720bbc2e7","src/f32/scalar/vec3a.rs":"bd9f5875fea11741e097ec06ce5f704f18b150aa94f05bca8e3104133f792fad","src/f32/scalar/vec4.rs":"4117d66d5d37181fc720e5954f7b34e2062581880970f0e1596b62031d275b67","src/f32/sse2.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/sse2/mat2.rs":"e2371d296152a6bbb9cfe92c1956c08f7e54dfdfaae28d6e1528b36d41037be6","src/f32/sse2/mat3a.rs":"3478dbc089fc2b6b7a9da2dcd5f9a9c224ffbd4421d19a1d7fa45b58dd47fc5f","src/f32/sse2/mat4.rs":"b04ae264723e34d44a472e0503bf99a3431de03d8626f2c7badc2dbbb9f909f2","src/f32/sse2/quat.rs":"7c788f852b8407482fef41ba1600eba7e0e229f6d2792e400a26c4474cf1a1d3","src/f32/sse2/vec3a.rs":"2e36e683141115dcb1cefa3590fedca13fe2788153c8902292efa7eb783b7463","src/f32/sse2/vec4.rs":"481c1862b41e1d3bfa5a0632e61b50a84357a7a323db8c3245b54a0c5f0a3b5d","src/f32/vec2.rs":"a5b0fe6ee25e0389858a3641e2d0fd93b1a2779903fbaccab26809036b51bbb8","src/f32/vec3.rs":"57b7a8f3acb7d5ab14127e8db93e47fc7f5037bbda63f9dd6ee534017dc76f15","src/f32/wasm32.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/wasm32/mat2.rs":"bd1fea0081d93455c909dddb3d1eab7b7fc3e963ef32c92c9275248cf53327d0","src/f32/wasm32/mat3a.rs":"b30b0836efb0a3b736f2890d3807d042dda59695afcb6377869d808d8581a29f","src/f32/wasm32/mat4.rs":"1572b3d013b68bdb89aaa0a6a049e636fb8f93227b9a0455f7f836ab4679fd6a","src/f32/wasm32/quat.rs":"246df2bc51f8fcc14ba52dfd7f60d5c5d72c45b8f2b3303aabedee61a9cc1a38","src/f32/wasm32/vec3a.rs":"3a195ba43eca9eef71239720b6b65357cb2dafac0e005eec76cef40a1c7258ad","src/f32/wasm32/vec4.rs":"15c20db8daa5b76fa2c975d97bb41912abe24a9c6b60353e51f782ae4e3df1ed","src/f64.rs":"e15e434181625610ddc8ba517d9078f58b2c5ccc7beab8890110918e34a5672c","src/f64/daffine2.rs":"69e56740c95bba6cb900e5b7f308b54838c36faae7e3c614a9ea886e608da473","src/f64/daffine3.rs":"3c597088a751b11041ae43c4d7a22fec34b19423801152c13c814387d5d3df6e","src/f64/dmat2.rs":"760d9c98978d81d82c86c8dcadb78d783932ee2f7af5e98d5457af6161264836","src/f64/dmat3.rs":"94be0f6d8968c4296d1095a5e1c0b5a3acf82a16e422d3aafc1de56ec94e495c","src/f64/dmat4.rs":"39d670e6a585994fb0ae12dd322456ecb03de94d0b6650b6f975b03a1fc468d1","src/f64/dquat.rs":"b81d732cf45f1a16fb37f0e3885834ef3984909a07267cca4ba3bb1614ebb42a","src/f64/dvec2.rs":"ab506df7998658ec5b2f2ec746ed5f76f4f7699cc477b5c89279c6c61cff7b0c","src/f64/dvec3.rs":"826939394a84276f57397355edc8b98e438cf080b460e64cf883b7e5528fd837","src/f64/dvec4.rs":"043462adc32e3763fc5a9a1c2bd025be943662a3bece6f81223e2d98ae66dc0b","src/f64/float.rs":"ccb5202740d25f212bfc43ad0888f188cc7c2e3a5cd58eed7d3260ba40c6f9c0","src/f64/math.rs":"d1e482b65952d28a043f28e835240559ae729ba45d9865b62ab9d78733e93b38","src/features.rs":"ccfa0be9c9c724cb2f75f578c0b33cbd9271636880184eec8b183bebe1ca6264","src/features/impl_approx.rs":"16ebd943808898e0b74a9bd0d4a58c09c3ea46e2fd33b9c47db528871f0a8b96","src/features/impl_bytemuck.rs":"2ac7f6352e4875fa16cf57a8172ee5eb898aa8f4ba31f72ce2f600524753a14c","src/features/impl_mint.rs":"cfb397567d4375908b2db4480d446d568f64e212c37a53344bbffbec65df50d3","src/features/impl_rand.rs":"5c85a2e0526153c55ad27955588956ce55554f117bfc5ad5130b4574c9056bf7","src/features/impl_rkyv.rs":"93ac9e9d1d30cf8b267fa824b22c3268a98743a9418a081a109c969e8a3df946","src/features/impl_serde.rs":"5b3f51bdfbf0e2a8ca2ba350847cd4dde6ec78dc77fa88d79cfcfc63239b7c70","src/features/impl_speedy.rs":"36582668d45efe84a0560caaf31b14b8319f84ada7a354479eec7d222bf91b0e","src/float.rs":"bd8ebb1e67544f822c2dbc7d3249019de96cd976fd1954f836e803d15935ed46","src/i16.rs":"ca28e7f10f6b099c3ac26c40bf9b4fae758486a5c2372a22060fdaedc8fdb21e","src/i16/i16vec2.rs":"df7651a84cdc05559d477fee2a4eefc17d39f0bdcf019a7d5c7391b82b8da0ca","src/i16/i16vec3.rs":"327c5fb903d04f0c1bf8a2636a20efb6eb5f3780d472fc20da14f4b834ed074b","src/i16/i16vec4.rs":"6ea4f06e639697293aed089371421923c3766c26e778d7d71ee04601f083fe44","src/i32.rs":"837ae56757baa4b9ca5d9b176b1c310dc38c612bb62541ec82db4556266fee49","src/i32/ivec2.rs":"d5dbe7be8de479e58e954e762ab39b3e3edfd3fb6a89bf21e78b9225d536be3f","src/i32/ivec3.rs":"d5aae139e4ce1607ca93bdb381cb0929b541d38f4d1442b5250dddeb24eaf348","src/i32/ivec4.rs":"022a152e52f7895401f7f9bc275653ae2f185ecb9ee59519ed9dd158de1be74b","src/i64.rs":"cf9b09767f124ea71f6f47aa572f0b1114759fa098d997de2cc166c21840f6a0","src/i64/i64vec2.rs":"d8cb1382216a4481c77372ab66bb93895b54699f997ea640cdd4a68b5c3963b5","src/i64/i64vec3.rs":"f4b53b62fa2a8232bf90b8f2ab3199d40badba05f691287b8df36f2062c5c240","src/i64/i64vec4.rs":"13887524a5ebe34376f65c91b17a7d6e920e143deaa0c0343f9a6ccd24500c95","src/i8.rs":"752f3f7a211e383fedab23f0058483b78caf44a8c9ebe3f6b59a2b63dddb8aa9","src/i8/i8vec2.rs":"df496473cf6d83f871bf78c32abc4a97a21e80865b4fd54614c66e16a9377d45","src/i8/i8vec3.rs":"916b7588540b13b38a896f35523f7046d27ba5f9c7703b2dc2e7df1a377b6c53","src/i8/i8vec4.rs":"5438e8d45a9bee039f1456321292443b7c45ee7214c5e16a5a93bbf6b1edfdc1","src/lib.rs":"c85520fe71bf21f2bea3f4a15889a24eada56a318d48b51cc70d1a30ab233959","src/macros.rs":"4926c68286db038d1ea7601be8b518cbfe7ca2777eb219531f395b74f7d34d3a","src/neon.rs":"37fdfee5ef3ef12a831b0290d3205c36c36c3a78dccc39bdee0f04963cb8f864","src/spirv.rs":"dc115904475c251b9143f0741e35ea1f025975313a81a5ea433098e8eedcf3a9","src/sse2.rs":"dc668462edb09ee6cd154a7616e0b7ab5f3ac66f9cee7ae1ba25f8a0c07d907d","src/swizzles.rs":"b833ae944a2cf0875e54cb5b2be2d8224ba42a7adc978f4322923e341fff133f","src/swizzles/coresimd.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/coresimd/vec3a_impl.rs":"c51ef034d6b3f33b96085b105014308622f5a1f4a30d59765654d84d45fdf47a","src/swizzles/coresimd/vec4_impl.rs":"9c514f8a44edcfe7bb39e02b1b0ef9a73cbd551e5d2bdea8f3c6a8b838580437","src/swizzles/dvec2_impl.rs":"9c53f2bfa78333dd2734d50b4d5fe24e083817d8b919f8c968c42a43d1db633f","src/swizzles/dvec3_impl.rs":"f71e433492d7cb7f54a416384997c1d971982e1add05a6e7c058714af28a638b","src/swizzles/dvec4_impl.rs":"7969d03562c3ac4c3872c2393aacb145cd886196897d036dcee0c2ee2ec8b81f","src/swizzles/i16vec2_impl.rs":"117a8776bdaff8801f87df37fc1ed803755c93552abc57968a5aed8b8eb16c6a","src/swizzles/i16vec3_impl.rs":"deffb21f6932bcf23e7961e176c4544bca36c9a8c23387ff72e21e8ec93ccb2e","src/swizzles/i16vec4_impl.rs":"f30cd1fdee254c40369eca9d1b428b4480370ce6511f8d809d9fd90819d8ce08","src/swizzles/i64vec2_impl.rs":"3c3f8eb3608ffd15ffc610779b5f7b784804ddc7b2695ab42bbaca090b9ab0eb","src/swizzles/i64vec3_impl.rs":"175c2c67c43e31361f803dcf5be1afd5492edf694c16f48082a6a5d86008f403","src/swizzles/i64vec4_impl.rs":"cbe69e6e1269d36853c6c1e6dbe6691b1fd54484ba834f36f36819bc12661b16","src/swizzles/i8vec2_impl.rs":"07eca77c614f46abae71ecdeb3a22f0fbccebc9b10c4900bd12147c80124beca","src/swizzles/i8vec3_impl.rs":"c5159bf4bd9d8744376e2f0377f9905055023d675d4a0116a00426b516828689","src/swizzles/i8vec4_impl.rs":"f7a786cfaad3eebdc66ca907107b783008254b398781640d3b4a51d8535e7642","src/swizzles/ivec2_impl.rs":"ccc54ffec36244729be5fa1b3669daa4e7ec595864b69319dee43a2c9e30bfc2","src/swizzles/ivec3_impl.rs":"34afa51081a995cab8337808306a385d7cb10b4c5ff425176706f2d14003227b","src/swizzles/ivec4_impl.rs":"1d88e838606d8aaadcd0e770e78f7360c259cc93820f66eae1d2513211c87eb3","src/swizzles/neon.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/neon/vec3a_impl.rs":"b003e596a94aa4c2bcd8192c8fdc978b8c78e8a78a977d0b8232bfc87683d3f3","src/swizzles/neon/vec4_impl.rs":"ef5cc30225a5984ae49b96865241be76c89808e0776b124db349413cdd797b42","src/swizzles/scalar.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/scalar/vec3a_impl.rs":"b003e596a94aa4c2bcd8192c8fdc978b8c78e8a78a977d0b8232bfc87683d3f3","src/swizzles/scalar/vec4_impl.rs":"ef5cc30225a5984ae49b96865241be76c89808e0776b124db349413cdd797b42","src/swizzles/sse2.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/sse2/vec3a_impl.rs":"a1601486041a75e4617fc76a17a75bd40df5276c205ffe9c598dc6736501b891","src/swizzles/sse2/vec4_impl.rs":"11946eb2b316de49bbff86269b82d6268cd146ac2d94efaaee3ae76fb25876ab","src/swizzles/u16vec2_impl.rs":"377194262b3be45da9553d3ea6678949d2c5c11e728cc22581fff77109b239c5","src/swizzles/u16vec3_impl.rs":"36b559c6d377aedaf58b32efbb31f8e02d4ee1f79cceb4a46bf3369547a07a02","src/swizzles/u16vec4_impl.rs":"0342ca1ed2874683500b952eed136fa958fff23de989c8cba7a1a9fffb5e0837","src/swizzles/u64vec2_impl.rs":"03751f084a31b842eadfac4a767a126877d4767a2efb3c510fdd8abe19dae700","src/swizzles/u64vec3_impl.rs":"1cb01047b2597d1a6be12370d7e3cc853afed70ef09e43c2a5366af9d149d9b9","src/swizzles/u64vec4_impl.rs":"eaba75bcd653cc166193a87397410571094531dd08a759f7728488ac675034c6","src/swizzles/u8vec2_impl.rs":"0e79ff62ab204a0b52bf6313b830e21764848742cdb7015fce23ae9bf8b3160c","src/swizzles/u8vec3_impl.rs":"41088038149ea715403651d7ff2ad8f187314aaf90282e7f5a97b84a8cbcbbbc","src/swizzles/u8vec4_impl.rs":"0f903ac512ad1ddc256812bfefeb11fb46dd5b9c72131bf0f4b3c861f04749ce","src/swizzles/usizevec2_impl.rs":"c1431e5e3a1a151a54bd96684bf9415cd55b42087f9ed76c390b9556fa3bf303","src/swizzles/usizevec3_impl.rs":"12327c32c3efb31a4920f15926e85bbc78bc709739beeeb93ca8b18f9ba55754","src/swizzles/usizevec4_impl.rs":"6e261aae58798a7919223c4a6e6fb1394c3529237e38f1fde413b2279ee09ba8","src/swizzles/uvec2_impl.rs":"ea32367409f58ebfbade53b7a4e47d08900377593198cbf991eab49796c98e28","src/swizzles/uvec3_impl.rs":"80716137704f5f13b1ccc20fa54eaa9571ad9e09b7e583a56c33417992eabcbc","src/swizzles/uvec4_impl.rs":"8e3280f9b35f353a34c841abf5ee0f0cd5f0dd94109bba05064e102f7aea3284","src/swizzles/vec2_impl.rs":"611c1e4a65a1608b18ca1258485232fbb24a069e0e4e028ad69e6de812d5be0c","src/swizzles/vec3_impl.rs":"f26c9a579b48527e579383b73c7796fcf72de2e41fcfd045d9a99fb634788a02","src/swizzles/vec_traits.rs":"8069119829e8c6dc63130cb1bf41d169eeed982cff056a2e8fd1b15bb43c1015","src/swizzles/wasm32.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/wasm32/vec3a_impl.rs":"d82683a7be728c4ff0b2528c4d164bc431811c90f0a155957dd4712e87f5cfc0","src/swizzles/wasm32/vec4_impl.rs":"df80760dd64c054b3ecf8d3d365306d48066f949694b589dc93475e9d8acf7ca","src/u16.rs":"7cc7a1c89d1163fd1a61965bdbe5bd61360acb0606a3957b571f148f98380882","src/u16/u16vec2.rs":"a98b4834de8f4bb6ec3b7b99fa1e8452e1e05f51f7457ad37b8f800b56b823ae","src/u16/u16vec3.rs":"04ea41ea9c3633af387a5ff732c9028c20449ed28e4785e867e5b9898fea0d38","src/u16/u16vec4.rs":"79970a79c57e5c768a1e33673818f43fd6c3c867a40f0252456e3c96de7f5c37","src/u32.rs":"efc99a6ef496e73d810014654fd2c3e37ed0cbfcdec82987d1454328ef6ddfbc","src/u32/uvec2.rs":"81e0a5eff609359d762f4a31b16f3107b0a20ec2018c20931c6b073cbd5d46e5","src/u32/uvec3.rs":"5ca9e3af257e7e7e7af36ce151661f229df0a65aac1bfe4750d72996c6b8dbfd","src/u32/uvec4.rs":"f52093f6a0195e24c20dbe4dd1b5c8fa483751b922d7d1007ba28af6d9d4a1df","src/u64.rs":"f12ebe1fdd0ce33f459306678f1b90b34614923b3713451b4bcdb0dc1261f830","src/u64/u64vec2.rs":"7b1c700317b9df68eade38fd0bfa3772f56e34974210617c7c2f3512cea0c950","src/u64/u64vec3.rs":"2bf71b069beb3718eb5c86e7e0b43626b6c2fd9fd5378e07da42516f3f74a619","src/u64/u64vec4.rs":"1e0893159d48188ace5d208dd994f79239860d85f9e986acd9b18e90956db3a0","src/u8.rs":"ee728b2a572e767fc29a910b01e5b5933f2615392bffac0e45dae8cab5dbee95","src/u8/u8vec2.rs":"3ac35a8e703d5c93d5f43e1b9dcc0d3408e17a6561c4d61ecfa490adc0ea4d78","src/u8/u8vec3.rs":"78c45b42e822d6bea82da3e8a43a7670864787adde3b1c20e6d33ad7364acadc","src/u8/u8vec4.rs":"8eb079f0a3692236f50adaf35dd98c7c4ae49cfce2860474130fe0450b819b3d","src/usize.rs":"2c4dd33a3d7b1274742c7311f797faffa3da512b5920d280e7d85af3aee21834","src/usize/usizevec2.rs":"b3c482a50dbe72aab2db6d5c7eeb99e826107037de3e282297b58aaa5f7e200c","src/usize/usizevec3.rs":"8305d6738ffccd0edc39d2b5f566950270e92bf93b18b1e7efedc51f7510392e","src/usize/usizevec4.rs":"4950887066057f7a6c7cc6249068ce9845b2f0e5667f74f0e53bc5efc58edbe6","src/wasm32.rs":"5ac6177e5c468e86644be2c02c4f4caacfffe45a6a7b3958246f1c7c73790b30","templates/affine.rs.tera":"2603ea850c57b9e0c2191c3c8d8d8e3606e07b2d99f264a0671bc59b26d3407a","templates/coresimd.rs.tera":"4f99c22bca88550efbe5116ceb18802280db32709b5573a521e098fcc6d9118a","templates/float.rs.tera":"9105e4ab3dc7d6639dd99018b1b7b298d230db534476f6fe2896c9f00f86d5f9","templates/macros.rs.tera":"1040810af128cdad79eabbf1a02ad60ebdb1a8b9c24b8dd97c8db8a06c3ab8ff","templates/mat.rs.tera":"62e943c40036a59c585abb94eede66b1d761851f8734c3dce1db9741fe91570f","templates/neon.rs.tera":"ba57f4c70e9e423a719186b7614320e706820ee54da58a5736faa75528c067ee","templates/quat.rs.tera":"adc877cedf5ea865c60a9b2834b22e0373209f577e022049e20f4ceeb9736d2c","templates/sse2.rs.tera":"e2d7349726f823ebfb77cabb720f0f0cb5105ae307bc9889f55175f910eb2bfc","templates/swizzle_impl.rs.tera":"aa7bab78a1fda7d43d77f9fe24cd1e684162ca453fcc575109f602ba6bb3d52e","templates/swizzle_traits.rs.tera":"4d175ec35c4896a969a6b2afb44609892a9112a33e65c6791120f39ff9a63d3d","templates/vec.rs.tera":"f45943a95ae7b901ac131caea093769d1cf863a06ae41e6b76855dbf746d531c","templates/vec_mask.rs.tera":"121a66e8bad73780935d4ed1e97e6846eaf750feb8689663036e3ad1c414df93","templates/wasm32.rs.tera":"2bf296dc75cc6d9455f1910ecfa8d52be81c37a78365f96fa1eeb79c55a8f67f","tests/affine2.rs":"a0dc7dd2a20b6c52075382a595f057352e6bec5bd77f3c2aa9e57c509396ee73","tests/affine3.rs":"f37c4b23c51495e4488289c63c00702d99d63f6ca228dac91f832b0c9d917f69","tests/euler.rs":"041fe3caf19aba6e2729203a4eb824b90215adb621cb09bef1a3d2e3b1269da2","tests/float.rs":"0e5b66cc4d1d873d0aebe996118857a731356866e8aaee094cc774cc6cc6d230","tests/mat2.rs":"fe66761e4341fae287f63b8b4ebdc0cd2c1f873d64e833baa8c31bc013ff44ed","tests/mat3.rs":"09db08eab185347996ede5dc5b09daf0e2f9d39d23ae4dcc87966d59e51028fb","tests/mat4.rs":"9d8373dbf0df0a75e281facb7726efd80543792a7a2fab73ba3776ab166e808f","tests/quat.rs":"8d34de054516961eb2037e06b5398f4380b91f8eeaf3cc62452232b7b884a1d3","tests/support.rs":"3d93056060d9155f8950df199c19db1313fa2e8ed80526f593bedea441f7ecb2","tests/support/macros.rs":"ed5e9447e18afa31b1715f35a5d3f7edda9b2a4db2c433f00915a9250bebaecb","tests/swizzles_f32.rs":"c38adc3b1c6142f3664f31915395884526174930865f8cbf41f97f88401bb6e2","tests/swizzles_f64.rs":"e57fbe464b2178f6708717c1690c4b7974e6dfe1f7a0418059c1f0dea63538a2","tests/swizzles_i16.rs":"ec8d8b1710104976284b07d2e98c1fb93790f463d6d62c9645ae35ecbcadcaf9","tests/swizzles_i32.rs":"0c5032118edd8985cdf05daa30d4e54cf7c16c97a7c196214a6bdd4ece837349","tests/swizzles_i64.rs":"b5ffc2e7ef43c5905be8ca6b3f6b28ef0ab1a6dbbe5913c46159c43ea12ff972","tests/swizzles_i8.rs":"6e1e99dc969a047b79d20f36b16149767c418e03af036e4940699579b66d3b62","tests/swizzles_u16.rs":"9fb75f804cdefb7ccb11b14c852fcb4c2a506687eb5b0311748e558aede1ad9d","tests/swizzles_u32.rs":"33901a699d7fc30bf67a120c2ca798328ebf36f3cf1b945aba0c4f15a48ab708","tests/swizzles_u64.rs":"2e2ad515f4ed168174b357095c4beac225795410de375148df3d3f5f2b70fd43","tests/swizzles_u8.rs":"5174ae9cf7fdd98c502238d6f9fb606c31acac78ede9bb8fbc974b31518972e1","tests/swizzles_usize.rs":"77778b80cb81f6f5d6589c16a077f7139519dbaf2f582f707345b573f1ddbb26","tests/vec2.rs":"5bd1f32c0be380f3af80553e245617d5095f3a8adf8c3d5bc425f288ea155974","tests/vec3.rs":"66c9f4994fdf18384c4faab927ec34a9f6556b06f941463dcf4bf044d17b8502","tests/vec4.rs":"74e91b2203589fb03ab5366ba340ed2b9a715af686a38a7f2e7bc3eb92a69ab3"},"package":"6b46b9ca4690308844c644e7c634d68792467260e051c8543e0c7871662b3ba7"}
\ No newline at end of file
+{"files":{"ARCHITECTURE.md":"a96ed48f5d407355624d7b74facf4a1bb04c15aaec38045f4dca68092198518b","ATTRIBUTION.md":"9f0738ead3dcc72bac87afc652c2466e1bc130d235db7798f98da4d4ef013639","CHANGELOG.md":"cd4f2edf1f26f6b307f47c4420e70bcf9b1c2dc5e5bf9e55e744c8b31def981d","CODE_OF_CONDUCT.md":"88504558eb3470566208af69870487d373e6687575e8c9b9863f517f16309d81","CONTRIBUTING.md":"868a8e28e6fef5c1f050f9395b3366ecc8452f285a911beedd8753bedcb21501","Cargo.lock":"059e1624fe3c2bd3801711556da73a1f5551c6d35644e52fb6bdd7527329bb4d","Cargo.toml":"2d1a7e0b8197723560ca1fbe6d7ec0465a9871e5526ddbcfa56a1098fb4909b8","LICENSE-APACHE":"be33ddb87a30fd321ab100e2d922cba512e50ec7a63d8e62e5bfc0798dd4b585","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"ab5728fdfb73f8cc20e04e24aafc39a4c4b8178bea4bd4dfb17108c8c5bfac66","benches/affine2.rs":"4ba9257aa4abad4d3c81fe25829df128c3fe0ba756a976f1cae7aac9ec433589","benches/affine3.rs":"0a1d764c5cc5eddafd8512f062b2bfa90535b8cc5d9d27d7908726a880269294","benches/iai.rs":"84dcc3cb4feca777e4ff65a84e3e4cdb7ece7069e4ca05c2ef8c582260d3ac7c","benches/mat2.rs":"7341b2ad178ddb497a359a49b542af09a7ce4b77f6680170f1f621dd3aa8a729","benches/mat3.rs":"4ca689ed8a6f6de61e65e276f422dc83e35801d582f747ac5fbedbecc353d623","benches/mat3a.rs":"c0314337fda316640402de961a7423da2a59c6bc570c96826ea2338438595538","benches/mat4.rs":"a26a609364f648d287d672f467929c75f0786e2fe25e7fccd5b05493ddda3e17","benches/quat.rs":"5dfb6021b0284b1f3fa09b4671358c4af8cdc2a206d36e87656cba527638857e","benches/support.rs":"370b4e19c81726fb6adb61e20f3451510656aa819190c811257edc2399f040e8","benches/support/macros.rs":"c05454927c2ff3e846d2d3dcd2605feb5293bdbba4767d7f352dc538ab369fc8","benches/vec2.rs":"ed4a4bdc22404beb00406484c0d60c240da6c276ecee9b48bf0e002469cf7fde","benches/vec3.rs":"dcce3a50add4bd5a823b18f34907562150f4e426aff56292a5f2447e8f74e7bc","benches/vec3a.rs":"b0aebc7e3ce053428944ab0365d6343a8dadba1b3e815b48caf16cd6cd208294","benches/vec4.rs":"07633a80e81e566c9f411be8b0669f8479f06084c541492e1b50e91e118b5c7a","build_all_msrv.sh":"35fb2d91849e4d461a35975017dae223ce55dc9b06a89f59f3a418a71ba99861","build_and_test_features.sh":"1043f30dc0dc61b9679f97e9f3914c4d41f630a3d22e51fdcfc6f39639330543","build_and_test_wasm32_chrome.sh":"503dc45a409348c02365bae3e67b4148874a69ff8bd7e0747702f8cb3d981cdb","build_and_test_wasm32_firefox.sh":"02effae982554c4e12449c5920706afface32e35b86e7cd654788dafe58e0a20","clippy.toml":"07e0a01b7edd3ca1d49010353642068329f66a4da5d1020ef20f336552e94831","codegen.json":"d67358c4454f67fc4af6e7a2a5dd8a496c4c2c7eda2e0e0364253462683cf9e0","deny.toml":"233beb334f03465ce25cc8935d718aff35608b9e1f1a3637c22cbde37f1a0bd7","src/align16.rs":"41e75bd6cb6d96769dfcd8c3a5bcaaee3fc41da4bf36c2e893b939776d357050","src/bool.rs":"a6f074bf78d24728c07539edcfc8d50429eb6bc97b9cb7d32ab1af550a4b14a4","src/bool/bvec2.rs":"84aff02cc2ae6c4b0134108b802b60199a84132a670dd090530efe7afc0b1999","src/bool/bvec3.rs":"dde3575a089f8a325d18d96d5e742df5a762f34111fe24ac2569dadd60dac838","src/bool/bvec4.rs":"7a641a9330507b9d8c2007842ddb28123f96803e1ca6ee9116a5ec629bc711a5","src/bool/coresimd.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/coresimd/bvec3a.rs":"46e6fdb7e99c2bb7a925f38bf8642e9be595568a0c80811c4596c40327b7ad6a","src/bool/coresimd/bvec4a.rs":"627b09a8e1318ddc1ded20934e66f3c5638f2bababaeed3a25093fecf2ca51a4","src/bool/neon.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/neon/bvec3a.rs":"631d8e1bf71581de6b71a1035baf98aa0b9009708d536e832027af782c90c5c2","src/bool/neon/bvec4a.rs":"7203ad2b71137e8e7c6636f73f4665c546ed3d588461817456c3c7f1d2c44893","src/bool/scalar.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/scalar/bvec3a.rs":"d6192ef4da3ecc3f95ca061f8a89be2c18b4358a6853d45aa3abced4bf12820c","src/bool/scalar/bvec4a.rs":"39bc78711e33d28ac2f87f1f07d14b83d48064ebbcc14e266bd6624f75c867a4","src/bool/sse2.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/sse2/bvec3a.rs":"ba787f60dec78a693b07cea2921f2fc59e7cbd144012a597de0bcf485a5cc34e","src/bool/sse2/bvec4a.rs":"bf547c3d6467ce3013b7c5c2324f59f19748a117d1a6d3a047bb74d69bbc9c10","src/bool/wasm32.rs":"38925753b3d6867bc63d2efa9133f04afa1590865add60192e0caadef14a7cda","src/bool/wasm32/bvec3a.rs":"66cb9621962de229d5a772678b94e070487e2479f52d39fbd9ebc2f236d0fd16","src/bool/wasm32/bvec4a.rs":"888d1f13d6635242fae43ebe4f2b7f78cc33ae5d11de89a3d3e65cf80cae8097","src/coresimd.rs":"ccd524501c85ea0d882221000096335fda1ab325cfb2ebfa37d0c60f927c975b","src/deref.rs":"bea56fc27cabc3f7fdcd6a95bfee5c445419e83fbe4356b8c0979894556aa253","src/euler.rs":"cb02b034f120c1ecb38cddff159ad8e4fed4cadf10a69bc06c986d0d7ae48648","src/f32.rs":"b6885829e99db3b3dd5e8245e856f5e8079e19b91bdebbcca398e6dee94a3231","src/f32/affine2.rs":"3ca9d418fc624f0a40d63b33ecc1320dbbffd9f34702c9b77b6f91c416dd6371","src/f32/affine3a.rs":"1cc35b188ac121ef78d5b4766bd31c2ba7bf8bea43011012b957b99f7fbc39bb","src/f32/coresimd.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/coresimd/mat2.rs":"f96dbed1ce6d1402d5e46e0afd316a639b2d6854274ef60632ca1249f12c0d27","src/f32/coresimd/mat3a.rs":"759f1c0dc57f478145a0faea5f3b9e845600f41806262f6fff44ee409e87787d","src/f32/coresimd/mat4.rs":"5410aefbb498a281bcbd74a61581d3424a7e17e394529b93a2cb8a536256adc8","src/f32/coresimd/quat.rs":"2bd593a63674e0b34acebabcd6bbf5e4e8ae9d7c51871c017e383b72950d495f","src/f32/coresimd/vec3a.rs":"da683d0f74711fe78cd8299c59264994de766c24068b1375bf12f31470a235bb","src/f32/coresimd/vec4.rs":"eaa1990f5c075c163be17a442817266cfaadc89670822f96765b4178626926c4","src/f32/float.rs":"9a51eb6a3c270cc02d34e746fdc01b94bcb34f0b867043b8606c9f779678a9c6","src/f32/mat3.rs":"454215cf696d44b931519a5b2b8190f79c90220f273d1b62973a99ea3d316b55","src/f32/math.rs":"eca6c43834afb5fcfa67a449508fb84b0d51d3207ce0fb53d1ec74d15f3e63a5","src/f32/neon.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/neon/mat2.rs":"ea647c3229840fa9cab13cbeef36c67c60fb4823cedc80affa3826bf00668ee0","src/f32/neon/mat3a.rs":"f8e0901d9685be52606f9dfce75fd8254252ce7ca2ea588af27bac84523583ea","src/f32/neon/mat4.rs":"710d7696ddb9d1b6e122610aefb388ef2b6f5b5001bf834c809dfd02c786a849","src/f32/neon/quat.rs":"c8ee7c11607d28383f91158c630f6f1d4cc74fca87517e3d0f6890301df1fec9","src/f32/neon/vec3a.rs":"0e815859f15d07e6f6d6874126a8ea0177c351b4e5553cc4c5502931cd3c816a","src/f32/neon/vec4.rs":"acd7cf9eef5f61ea9fbcdb6edb9bb428a07ef9a32a09832b676ccb4b285fecd1","src/f32/scalar.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/scalar/mat2.rs":"baca51e06db7d32e3eb40e7b3eb0278da0d2a7ad85f249ae5b2c786f0fb384a8","src/f32/scalar/mat3a.rs":"e0de915d37227517b4f06f8ca0c3028dd17f35f6edde1ce38c8d50e38dad2d1d","src/f32/scalar/mat4.rs":"af16f98d05cad855a7d25e51886bbf7c86a9ba1f9ee4134f7a67a49805b069fc","src/f32/scalar/quat.rs":"7760a74026a04ed67b739f87f9d01891c9b303fd44fb881412126c49bb79c276","src/f32/scalar/vec3a.rs":"63506c960455b7db2483f62260e8c7d08c7526fab04605a0fa2d57f96a475796","src/f32/scalar/vec4.rs":"8ccda4f02731642e26bf545d2d346ed53b30d3daf791eff14f360c75e34e72f4","src/f32/sse2.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/sse2/mat2.rs":"50230a372216a0e61afcff90f10d74f8c3855f51395e9dd6d7e03de692e0f02f","src/f32/sse2/mat3a.rs":"88524fa853d10a22ab83762238098ee37dfe4c8c4009162dde068d8523e7192d","src/f32/sse2/mat4.rs":"70db6d74e0c304f230b832b89457d4d1d8269cee427631e7b21d6754a2d52166","src/f32/sse2/quat.rs":"e519613a19fd070fa92319da6468291b1b1c599c5561bc6037151e7ddff11747","src/f32/sse2/vec3a.rs":"115b76adbb0b461434afc2f132ad2fc65c969a16380009eef5934fabd1f12579","src/f32/sse2/vec4.rs":"62cff684ebe4aa418e4147792b5cdb7efad89257370304e9da94c144fca10fa7","src/f32/vec2.rs":"8f95046ae51ca98b953a62e15a3bd22dfa610ec91d6b00238fb823ea5745a921","src/f32/vec3.rs":"f8969aa7abbb053cec1c8dff33ef1df3512ffdc74ea4aec1987c6d13695363cb","src/f32/wasm32.rs":"6b5035deec82e95168da54e8ab90da683e05c503763af85084d3af855b74baed","src/f32/wasm32/mat2.rs":"aa77a5a000fedb724f1fa474c5333639e0c2a239b49c3fea4d7a9793701717df","src/f32/wasm32/mat3a.rs":"92664cdf5ca0e67167ecc7dc41e8190f2fe23357f1617c3e8d84b046d090de94","src/f32/wasm32/mat4.rs":"f6c6d727cda7aa5bc5780ee2cc2fe3868dd4bca9f1abd93e948158b296d152ee","src/f32/wasm32/quat.rs":"8b75d90665e60451e2630074b4933c17c8a1facfc1541049aee50f72616f005f","src/f32/wasm32/vec3a.rs":"8c68287bdd967130f892d12bcb41ec6df349ec0385658d8d3ceef8129f09a80c","src/f32/wasm32/vec4.rs":"57d275dc096bf6dd2aca8ca7cb87d669257013c83d6c9d5d27c757a8914b17dc","src/f64.rs":"e15e434181625610ddc8ba517d9078f58b2c5ccc7beab8890110918e34a5672c","src/f64/daffine2.rs":"06b334e00675b73465aff7fe1e47fa9349250ed7325bc8e74143167e8d659d2f","src/f64/daffine3.rs":"19ef00275372b83e7fc1c658104028a1ce0186912bda914eb07ef7075d90a0d4","src/f64/dmat2.rs":"86ae0c310af8305d99f030d2679f0613e95ce74e3c4c5460dffa48bde7ffd7ae","src/f64/dmat3.rs":"33bc509f85b859adb2633944e4a12942ae7f709de0c827d7b95e530bf8d94308","src/f64/dmat4.rs":"be1bf62e912a240b4a392cc393b748f6f489a9d6c3ae0005e70ef3dad88f3714","src/f64/dquat.rs":"033e70f40342fa2b0de91e3997421b7076edf7befa69903f36b09652e41ccdbc","src/f64/dvec2.rs":"cb2393ae563ee142d6e2fb1a8468d07dfce76a47ab4c34af4cc039e4057cfec1","src/f64/dvec3.rs":"9369498c7b0e3ac935f116a09afeba6bf3cc517cd6d83af5f29fc009ab8c7151","src/f64/dvec4.rs":"64710f06b71c7a79c980a6f33c8ee6327bdbfa14f8bcd0f05e73762e9a72199a","src/f64/float.rs":"572c8c4083eb8fdc1c40e02e6e1ee7c22a4802b2f37b2e04b94ed19d6266c295","src/f64/math.rs":"d1e482b65952d28a043f28e835240559ae729ba45d9865b62ab9d78733e93b38","src/features.rs":"ccfa0be9c9c724cb2f75f578c0b33cbd9271636880184eec8b183bebe1ca6264","src/features/impl_approx.rs":"16ebd943808898e0b74a9bd0d4a58c09c3ea46e2fd33b9c47db528871f0a8b96","src/features/impl_bytemuck.rs":"7b64c4e1e940a5d0d013e2ad9a86b72f03971fba6776376215730261c33815ee","src/features/impl_mint.rs":"cfb397567d4375908b2db4480d446d568f64e212c37a53344bbffbec65df50d3","src/features/impl_rand.rs":"5c85a2e0526153c55ad27955588956ce55554f117bfc5ad5130b4574c9056bf7","src/features/impl_rkyv.rs":"93ac9e9d1d30cf8b267fa824b22c3268a98743a9418a081a109c969e8a3df946","src/features/impl_serde.rs":"5b3f51bdfbf0e2a8ca2ba350847cd4dde6ec78dc77fa88d79cfcfc63239b7c70","src/features/impl_speedy.rs":"36582668d45efe84a0560caaf31b14b8319f84ada7a354479eec7d222bf91b0e","src/float.rs":"bd8ebb1e67544f822c2dbc7d3249019de96cd976fd1954f836e803d15935ed46","src/i16.rs":"ca28e7f10f6b099c3ac26c40bf9b4fae758486a5c2372a22060fdaedc8fdb21e","src/i16/i16vec2.rs":"c765fd67a20d9906dc38e1f440851acb6e97828816a73e65a585f2cdf1c6acce","src/i16/i16vec3.rs":"90d36ffbb4db7c9360bdc8ac17fc994cd4493096e6973ea883f7a139a57463d5","src/i16/i16vec4.rs":"3c3c84eaa0dcb77ccdf51c4b2a9190c9afdff2221d56bb0420357a905ce16453","src/i32.rs":"837ae56757baa4b9ca5d9b176b1c310dc38c612bb62541ec82db4556266fee49","src/i32/ivec2.rs":"92a5594ed9fe50bc43ff35ab1f7e3b83efc59da7b4a76426836ea422631702b4","src/i32/ivec3.rs":"c1104eff4cd113c6116d7095b038f38b0f0c27ae29f224ccafb129ca6529d1c2","src/i32/ivec4.rs":"cb5ea754fb741df6732cd69a60d4b3454bf109f8a9bbcb321c4b99edcccc0ed6","src/i64.rs":"cf9b09767f124ea71f6f47aa572f0b1114759fa098d997de2cc166c21840f6a0","src/i64/i64vec2.rs":"51c66d2b4e08de22c37f2d968c18564b14bd07d9080502ae8ab1d4cdbf077dee","src/i64/i64vec3.rs":"080e093a49d4e8e5597dcdb04cdde50c8c1abd53368e232b45b57cf35e353c0f","src/i64/i64vec4.rs":"1b2fc04dc24517efe2ab96301f353f16836e6aab9bf9731e7d5748523b2fd0c6","src/i8.rs":"752f3f7a211e383fedab23f0058483b78caf44a8c9ebe3f6b59a2b63dddb8aa9","src/i8/i8vec2.rs":"8742b541e5af99447fb47cf43b868c27442cb9f87dd4626885f72570910bfd7d","src/i8/i8vec3.rs":"60e70ca3c2fa8ca935cc1f3b8e1605a6262e404cea5902413d9e72506725e168","src/i8/i8vec4.rs":"ab6bdd79fecd61eb3ca9405c53d121386b7e3f5729b86406ff964c98ec1de173","src/lib.rs":"7479281c5fcd79094c4203b8129b58a0bc5b02a2423aff39c0830b401bc830a3","src/macros.rs":"4926c68286db038d1ea7601be8b518cbfe7ca2777eb219531f395b74f7d34d3a","src/neon.rs":"37fdfee5ef3ef12a831b0290d3205c36c36c3a78dccc39bdee0f04963cb8f864","src/spirv.rs":"dc115904475c251b9143f0741e35ea1f025975313a81a5ea433098e8eedcf3a9","src/sse2.rs":"dc668462edb09ee6cd154a7616e0b7ab5f3ac66f9cee7ae1ba25f8a0c07d907d","src/swizzles.rs":"b833ae944a2cf0875e54cb5b2be2d8224ba42a7adc978f4322923e341fff133f","src/swizzles/coresimd.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/coresimd/vec3a_impl.rs":"3df4f1b689e315e671f06f069016260c1f67c87a863337c662dbd0b29368191b","src/swizzles/coresimd/vec4_impl.rs":"d16c67160c54f9c01e71d84c3d82ae409fc12d288af2a06755621ded9d5e7116","src/swizzles/dvec2_impl.rs":"3eebf6580505295cb3b87264fcd927da65368ce2082e5f55d597031d07cabd0a","src/swizzles/dvec3_impl.rs":"168c311742904b87b3e0bdd6edfd9b30eaff0da9dfb578095407401e20f38034","src/swizzles/dvec4_impl.rs":"9b751b1b6aaae96205dbdb7df7bab2a9d101e8e25df09c818f2b4093a2662d56","src/swizzles/i16vec2_impl.rs":"a8c91b432484d82c086891f1066966c412e8f454dce63adab7ec433b27291c62","src/swizzles/i16vec3_impl.rs":"0ec42f7718ba2610598cf1a30f4a6cfb5cb57af853d287ecaeca9c893817a5e1","src/swizzles/i16vec4_impl.rs":"7d6d226c9e7ee1feb341831b7b3f4adba432e72e4a6a3e2ed8454095bff2d1d6","src/swizzles/i64vec2_impl.rs":"5a58aa7b09db1fd8937d75c1a74a4393419e335652dbcad7047fc0dbac28e7e8","src/swizzles/i64vec3_impl.rs":"72b33cdaa8faca69f251a88971c74f5962f8e01590b88b740f5b62f98eb79f84","src/swizzles/i64vec4_impl.rs":"af4397932bfc201c53c50c41cd5f5600334754cb7233dd736ef69f61c55f194b","src/swizzles/i8vec2_impl.rs":"a68c1e78020f82af960ac7658782688f890fd77bbb6a607454b3da9e53d64c37","src/swizzles/i8vec3_impl.rs":"fa3708ec3595365ad5a0635309f8785da1e0ec90569e6b8fcf458c8e881b5171","src/swizzles/i8vec4_impl.rs":"3f552a3aed6d351d8928c3e7ddccb68214a8be977456b1f2fb0ca982f0f8b44d","src/swizzles/ivec2_impl.rs":"ff468bf1b0904b449dfb7470f0336ebe636501e99d19e297d745bb38937ad622","src/swizzles/ivec3_impl.rs":"01896614b45db5247a7826bcb095d86675bd651e094df88cde90a6daf6f247ac","src/swizzles/ivec4_impl.rs":"cd2429e1c3bfd71b0b73afa1dee56d6468ba1ede14fb9825b6d4f8b5128164c1","src/swizzles/neon.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/neon/vec3a_impl.rs":"fb31cef71270d5a7200f3ff8082b931b263c17b07f07ed1f2ac7a5b16737cec0","src/swizzles/neon/vec4_impl.rs":"3df4ff23efc8f91a6a2d18fe43986b084fd6a774edb9841d9ea101588965d2b9","src/swizzles/scalar.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/scalar/vec3a_impl.rs":"fb31cef71270d5a7200f3ff8082b931b263c17b07f07ed1f2ac7a5b16737cec0","src/swizzles/scalar/vec4_impl.rs":"3df4ff23efc8f91a6a2d18fe43986b084fd6a774edb9841d9ea101588965d2b9","src/swizzles/sse2.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/sse2/vec3a_impl.rs":"0328aed772af06638b2e0ea9c18b8e5a540e4312f7fc89dd0db0e2f507e37c93","src/swizzles/sse2/vec4_impl.rs":"35322c9ecbbc373225f84e3a4744cea60e59b9b94852231a4d749e92c39e9256","src/swizzles/u16vec2_impl.rs":"9d17fc02091532522b32b1f2107bb65cd5017309c0a3d676a8ba34bac486104b","src/swizzles/u16vec3_impl.rs":"3a541abe06cb6ea37ee4eab605031c5d01a55e60baeb0f8983340ec5140e9047","src/swizzles/u16vec4_impl.rs":"017931848b4b08fdd8cd51ae05862e5b8d5accb80260fc86b723ce70bed26a64","src/swizzles/u64vec2_impl.rs":"97a12fee86dae8fa0358303f19bbfa3fc3ce53022dcb120b35948855c1eb496f","src/swizzles/u64vec3_impl.rs":"c2b4d42fddfe4e4594ef8339ee3b059603110f3434557e7a021514d6fdface10","src/swizzles/u64vec4_impl.rs":"d1dc5425852752a9e611ded3b62f67308cdf7819e6e2794d9bc66199bd499aa3","src/swizzles/u8vec2_impl.rs":"c3110a2e31770fbde8c661c227127fbc19dfd60348eb6cb87587805e352f695c","src/swizzles/u8vec3_impl.rs":"36494ca58d4f361205becd528b63943f9ccc51642659d1721d6461d2dda4d4c7","src/swizzles/u8vec4_impl.rs":"1345dfccd8c56da67e9bd8f156f9b74840f50fbafaa071fb3fcf5695575b46e9","src/swizzles/usizevec2_impl.rs":"69652e752dc501dd509f3d1757c16916e970b979e6cd2ca6fc7d7fcbaf86e2ba","src/swizzles/usizevec3_impl.rs":"92598fefacd8b6be22c4a4c409117872f9675390d0d4d6a2a3338f5b6626fc63","src/swizzles/usizevec4_impl.rs":"36417fa7850be2b58b2a43a53a7b0bca0123436091310f215060ad1de8375ef6","src/swizzles/uvec2_impl.rs":"910dd804517b40aaa3f1512b462d9050bb3b196379d05403090cee5a04f5c0aa","src/swizzles/uvec3_impl.rs":"2be9d82bd4d85b06e454a1005db78e31c30a6bff9ea79eae763d8ad2ef94d58e","src/swizzles/uvec4_impl.rs":"eed0a049a05960f8670e644710ca7dbd5b628394a87e6e591b65317b69874272","src/swizzles/vec2_impl.rs":"2625d07272ee205fbef702fa1b49de5b66b5e1fc02b80f3043de04663b4adf55","src/swizzles/vec3_impl.rs":"2a477dff9e1a3d370ce17b5c56cd179889e189058dee4036d68ea50cc923129d","src/swizzles/vec_traits.rs":"8069119829e8c6dc63130cb1bf41d169eeed982cff056a2e8fd1b15bb43c1015","src/swizzles/wasm32.rs":"045925888e131cbef29ed7988f07f349e0fce2f76760289cd2ba8ad035ef124e","src/swizzles/wasm32/vec3a_impl.rs":"29b9ba6f7eccb3bae4028b3e53242cdba83d98ecc74353b0c06f87f30f62405d","src/swizzles/wasm32/vec4_impl.rs":"64a135a2aae79b558bf2f1bb501208bc8584aa1a699408e41d0a570e20c072a7","src/u16.rs":"7cc7a1c89d1163fd1a61965bdbe5bd61360acb0606a3957b571f148f98380882","src/u16/u16vec2.rs":"141f7cd512dc9436886dd3ae0aa7e6039384ea282d9cb1e5d3e3aac1ca06e81d","src/u16/u16vec3.rs":"adc7e99ec1e642adf6e1ccffb0e6904cf6d9a92a57726b346ee4bf53969202a4","src/u16/u16vec4.rs":"4c09165f7871cd1cae9f63c9c5eb5403b55c63359b8c6cb8a631ba1e7db4c1dd","src/u32.rs":"efc99a6ef496e73d810014654fd2c3e37ed0cbfcdec82987d1454328ef6ddfbc","src/u32/uvec2.rs":"aa71a28472e16fbfc3e4c6bb4bd5771559e492631363302a6a1a186901aa3bbf","src/u32/uvec3.rs":"3712a4406367e60347f7cba1b8dbe79215ece9f44942509f9911f7a384f49e24","src/u32/uvec4.rs":"cb413adbd8ff2766d34bcb0cf5b2860c5adc03401d8a345d167aa532d7085190","src/u64.rs":"f12ebe1fdd0ce33f459306678f1b90b34614923b3713451b4bcdb0dc1261f830","src/u64/u64vec2.rs":"565c03367b45f5ea42e0410c1424459070c85798b6d3159ff91cf3dff80b3bf6","src/u64/u64vec3.rs":"85450e9f1760728bfc7907b69b456a2287061b16f02fba45e9dd9f3731418357","src/u64/u64vec4.rs":"f86dbb444d6883ab0aaf44d1822ad77d93caa973ae124cfcf3e52d8b2c954181","src/u8.rs":"ee728b2a572e767fc29a910b01e5b5933f2615392bffac0e45dae8cab5dbee95","src/u8/u8vec2.rs":"941d43fb6162cd5520fdc37ea0321daae8770c6f0eaa0ecd914be720bba8449a","src/u8/u8vec3.rs":"8f34fd997363e0a4ea8257fdec2fe6e37094fc70457b86d55511e5229173327d","src/u8/u8vec4.rs":"780d67a2bc0da88c4fb359e1698c29ba8c5d457d3257fcec230b37b37d947fce","src/usize.rs":"2c4dd33a3d7b1274742c7311f797faffa3da512b5920d280e7d85af3aee21834","src/usize/usizevec2.rs":"47e465238adb721772c00cb4f56fabaa922b61f6795819c899d5da3cce559bc2","src/usize/usizevec3.rs":"12dd51663e95806de407fc6ea7439b11841712c23b1ab06f18eedccd31934582","src/usize/usizevec4.rs":"b733747a05dcd29d7ac5e4082bedf517453684c3f5fa39eff5995d8708e23881","src/wasm32.rs":"5ac6177e5c468e86644be2c02c4f4caacfffe45a6a7b3958246f1c7c73790b30","templates/affine.rs.tera":"a780960a6403cab3541306fa1d12396d29cb7068d76790b49bd68cc4a9795479","templates/coresimd.rs.tera":"4f99c22bca88550efbe5116ceb18802280db32709b5573a521e098fcc6d9118a","templates/float.rs.tera":"44d06cb63edcd1cb56ae59a67afef49929c16aea8c61cf4edfff7a6254840754","templates/macros.rs.tera":"99a6fa2b0bf0de6930629f91780c584a2b48d95ead80a3f3e0151f24183d41cb","templates/mat.rs.tera":"fa7e7506c284c2ecc3b3f7b995f97eec88c132ec171355b133d831084fb46dfe","templates/neon.rs.tera":"ba57f4c70e9e423a719186b7614320e706820ee54da58a5736faa75528c067ee","templates/quat.rs.tera":"44bef85330c8f1664979fb218f3ee856e460b166a81f3fa8962ae48ecac0c516","templates/sse2.rs.tera":"e2d7349726f823ebfb77cabb720f0f0cb5105ae307bc9889f55175f910eb2bfc","templates/swizzle_impl.rs.tera":"b293745e55811109adc2471f59491f309cfd4ba06a52bc35b99af27bfafc36f6","templates/swizzle_traits.rs.tera":"4d175ec35c4896a969a6b2afb44609892a9112a33e65c6791120f39ff9a63d3d","templates/vec.rs.tera":"7a549939f019bb64f4b478c9c17e7eeb4208bf834ae5a5a7428db3fe13d71aac","templates/vec_mask.rs.tera":"cde554a0eba5734e372e8cc1fbcb3a8a64b21219e89d4e0f69b448916ff7e392","templates/wasm32.rs.tera":"2bf296dc75cc6d9455f1910ecfa8d52be81c37a78365f96fa1eeb79c55a8f67f","tests/affine2.rs":"cf1c550e9eef0409a1b69adc321834c097152d3d0c682989fcd916458ae98c8f","tests/affine3.rs":"9f1f42898cde105aea4bd1bd47d3f8ea179e3e0d62aecbb215e8381fcb4f509f","tests/euler.rs":"041fe3caf19aba6e2729203a4eb824b90215adb621cb09bef1a3d2e3b1269da2","tests/float.rs":"0e5b66cc4d1d873d0aebe996118857a731356866e8aaee094cc774cc6cc6d230","tests/mat2.rs":"c280001f24f646c166fc1a7a647ac8101a2b1b9f4476d616d5f7e343c3f45b22","tests/mat3.rs":"05814a467407c1c21e4d6541f7d497c6dccb377ddc28b6d34278786c93c50af0","tests/mat4.rs":"0b704139cddc8e912fcafd59afe7dc856f769dfe1b4241f4804974da13fd9c65","tests/quat.rs":"e2ab6fc7cb4a33abea2c0da84514656316eb356d278103dd0b15de6679388d08","tests/support.rs":"3d93056060d9155f8950df199c19db1313fa2e8ed80526f593bedea441f7ecb2","tests/support/macros.rs":"ed5e9447e18afa31b1715f35a5d3f7edda9b2a4db2c433f00915a9250bebaecb","tests/swizzles_f32.rs":"c38adc3b1c6142f3664f31915395884526174930865f8cbf41f97f88401bb6e2","tests/swizzles_f64.rs":"e57fbe464b2178f6708717c1690c4b7974e6dfe1f7a0418059c1f0dea63538a2","tests/swizzles_i16.rs":"ec8d8b1710104976284b07d2e98c1fb93790f463d6d62c9645ae35ecbcadcaf9","tests/swizzles_i32.rs":"0c5032118edd8985cdf05daa30d4e54cf7c16c97a7c196214a6bdd4ece837349","tests/swizzles_i64.rs":"b5ffc2e7ef43c5905be8ca6b3f6b28ef0ab1a6dbbe5913c46159c43ea12ff972","tests/swizzles_i8.rs":"6e1e99dc969a047b79d20f36b16149767c418e03af036e4940699579b66d3b62","tests/swizzles_u16.rs":"9fb75f804cdefb7ccb11b14c852fcb4c2a506687eb5b0311748e558aede1ad9d","tests/swizzles_u32.rs":"33901a699d7fc30bf67a120c2ca798328ebf36f3cf1b945aba0c4f15a48ab708","tests/swizzles_u64.rs":"2e2ad515f4ed168174b357095c4beac225795410de375148df3d3f5f2b70fd43","tests/swizzles_u8.rs":"5174ae9cf7fdd98c502238d6f9fb606c31acac78ede9bb8fbc974b31518972e1","tests/swizzles_usize.rs":"77778b80cb81f6f5d6589c16a077f7139519dbaf2f582f707345b573f1ddbb26","tests/vec2.rs":"811d23f23b36baffea6dcad992350a58e116ff13ae021b979bc721bacec02d2b","tests/vec3.rs":"92074bfa07fbdf810088d4932cd9340575085e32e4b9b490d838142e76446a23","tests/vec4.rs":"29162d0908a3caa5cb34e341f95d5520d5396684bc2c4a1f4f126c9337a58fde"},"package":"50a99dbe56b72736564cfa4b85bf9a33079f16ae8b74983ab06af3b1a3696b11"}
\ No newline at end of file
diff --git a/crates/glam/Android.bp b/crates/glam/Android.bp
index 9e17d99..54f2f30 100644
--- a/crates/glam/Android.bp
+++ b/crates/glam/Android.bp
@@ -17,7 +17,7 @@
name: "libglam",
crate_name: "glam",
cargo_env_compat: true,
- cargo_pkg_version: "0.30.3",
+ cargo_pkg_version: "0.30.4",
crate_root: "src/lib.rs",
edition: "2021",
features: [
diff --git a/crates/glam/CHANGELOG.md b/crates/glam/CHANGELOG.md
index a60ea8f..95e2d9a 100644
--- a/crates/glam/CHANGELOG.md
+++ b/crates/glam/CHANGELOG.md
@@ -5,6 +5,30 @@
The format is based on [Keep a Changelog], and this project adheres to
[Semantic Versioning].
+## [0.30.4] - 2025-06-12
+
+### Added
+
+* Added 4x4 matrix `frustum_lh`, `frustum_rh` and `frustum_rh_gl` methods.
+
+* Added assign methods for all corresponding op trait impls (e.g. `add_assign`,
+ `div_assign`, `mul_assign`, `sub_assign` etc.)
+
+* Added by reference implementations for all op trait impls.
+
+### Changed
+
+* `bytemuck` trait implementations now use derive macros to catch potentially
+ misuse.
+
+### Fixed
+
+* Fixed unsoundness in core-simd implementation of `Vec3A` to `[f32;3]` array
+ and `Vec3A` to `Vec3` conversion.
+
+* Fixed potential unsoundness in conversion from `Vec4` to
+ `(f32, f32, f32, f32)` tuple conversion.
+
## [0.30.3] - 2025-05-01
### Added
@@ -1232,7 +1256,8 @@
[Keep a Changelog]: https://keepachangelog.com/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
-[Unreleased]: https://github.com/bitshifter/glam-rs/compare/0.30.3...HEAD
+[Unreleased]: https://github.com/bitshifter/glam-rs/compare/0.30.4...HEAD
+[0.30.4]: https://github.com/bitshifter/glam-rs/compare/0.30.3...0.30.4
[0.30.3]: https://github.com/bitshifter/glam-rs/compare/0.30.2...0.30.3
[0.30.2]: https://github.com/bitshifter/glam-rs/compare/0.30.1...0.30.2
[0.30.1]: https://github.com/bitshifter/glam-rs/compare/0.30.0...0.30.1
diff --git a/crates/glam/Cargo.lock b/crates/glam/Cargo.lock
index e978d41..97ce389 100644
--- a/crates/glam/Cargo.lock
+++ b/crates/glam/Cargo.lock
@@ -81,6 +81,20 @@
version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
+dependencies = [
+ "bytemuck_derive",
+]
+
+[[package]]
+name = "bytemuck_derive"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
[[package]]
name = "cast"
@@ -250,7 +264,7 @@
[[package]]
name = "glam"
-version = "0.30.3"
+version = "0.30.4"
dependencies = [
"approx",
"bytemuck",
diff --git a/crates/glam/Cargo.toml b/crates/glam/Cargo.toml
index 69221ca..b537757 100644
--- a/crates/glam/Cargo.toml
+++ b/crates/glam/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.68.2"
name = "glam"
-version = "0.30.3"
+version = "0.30.4"
authors = ["Cameron Hart <cameron.hart@gmail.com>"]
build = false
autolib = false
@@ -42,7 +42,7 @@
[features]
bytecheck = ["rkyv/bytecheck"]
-core-simd = []
+core-simd = ["bytemuck?/nightly_portable_simd"]
cuda = []
debug-glam-assert = []
default = ["std"]
@@ -222,6 +222,11 @@
[dependencies.bytemuck]
version = "1.9"
+features = [
+ "derive",
+ "aarch64_simd",
+ "wasm_simd",
+]
optional = true
default-features = false
diff --git a/crates/glam/METADATA b/crates/glam/METADATA
index b9e7a36..f11d9a5 100644
--- a/crates/glam/METADATA
+++ b/crates/glam/METADATA
@@ -1,17 +1,17 @@
name: "glam"
description: "A simple and fast 3D math library for games and graphics"
third_party {
- version: "0.30.3"
+ version: "0.30.4"
license_type: NOTICE
last_upgrade_date {
year: 2025
- month: 5
- day: 28
+ month: 6
+ day: 13
}
homepage: "https://crates.io/crates/glam"
identifier {
type: "Archive"
- value: "https://static.crates.io/crates/glam/glam-0.30.3.crate"
- version: "0.30.3"
+ value: "https://static.crates.io/crates/glam/glam-0.30.4.crate"
+ version: "0.30.4"
}
}
diff --git a/crates/glam/README.md b/crates/glam/README.md
index f5c9855..d0dddbe 100644
--- a/crates/glam/README.md
+++ b/crates/glam/README.md
@@ -86,7 +86,7 @@
```toml
[dependencies]
-glam = { version = "0.30.3", default-features = false, features = ["libm"] }
+glam = { version = "0.30.4", default-features = false, features = ["libm"] }
```
To support both `std` and `no_std` builds in project, you can use the following
@@ -100,7 +100,7 @@
libm = ["glam/libm"]
[dependencies]
-glam = { version = "0.30.3", default-features = false }
+glam = { version = "0.30.4", default-features = false }
```
Alternatively, you can use the `nostd-libm` feature. This will always include a
@@ -116,7 +116,7 @@
libm = ["glam/libm"]
[dependencies]
-glam = { version = "0.30.3", default-features = false, features = ["nostd-libm"] }
+glam = { version = "0.30.4", default-features = false, features = ["nostd-libm"] }
```
### Optional features
diff --git a/crates/glam/benches/iai.rs b/crates/glam/benches/iai.rs
index d24a16d..505487e 100644
--- a/crates/glam/benches/iai.rs
+++ b/crates/glam/benches/iai.rs
@@ -12,6 +12,11 @@
use glam::BVec4A;
#[inline]
+fn bb_f32() -> f32 {
+ black_box(0.5)
+}
+
+#[inline]
fn mat2() -> Mat2 {
black_box(Mat2::from_cols_array(&[1.0, 2.0, 3.0, 4.0]))
}
@@ -193,6 +198,12 @@
}
#[library_benchmark]
+#[bench::args(vec3a(), vec3a(), bb_f32())]
+fn vec3a_slerp(v1: Vec3A, v2: Vec3A, t: f32) -> Vec3A {
+ black_box(v1.slerp(v2, t))
+}
+
+#[library_benchmark]
#[bench::args(vec4(), vec4())]
fn vec4_dot(v1: Vec4, v2: Vec4) -> f32 {
black_box(v1.dot(v2))
@@ -260,6 +271,7 @@
vec3a_cross,
vec3a_length,
vec3a_normalize,
+ vec3a_slerp,
vec3a_select,
);
diff --git a/crates/glam/src/bool/bvec2.rs b/crates/glam/src/bool/bvec2.rs
index 0af57cc..432b885 100644
--- a/crates/glam/src/bool/bvec2.rs
+++ b/crates/glam/src/bool/bvec2.rs
@@ -128,6 +128,30 @@
}
}
+impl BitAnd<&Self> for BVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec2> for &BVec2 {
+ type Output = BVec2;
+ #[inline]
+ fn bitand(self, rhs: &BVec2) -> BVec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec2> for &BVec2 {
+ type Output = BVec2;
+ #[inline]
+ fn bitand(self, rhs: BVec2) -> BVec2 {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec2 {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -135,6 +159,13 @@
}
}
+impl BitAndAssign<&Self> for BVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec2 {
type Output = Self;
#[inline]
@@ -146,6 +177,30 @@
}
}
+impl BitOr<&Self> for BVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec2> for &BVec2 {
+ type Output = BVec2;
+ #[inline]
+ fn bitor(self, rhs: &BVec2) -> BVec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec2> for &BVec2 {
+ type Output = BVec2;
+ #[inline]
+ fn bitor(self, rhs: BVec2) -> BVec2 {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec2 {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -153,6 +208,13 @@
}
}
+impl BitOrAssign<&Self> for BVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec2 {
type Output = Self;
#[inline]
@@ -164,6 +226,30 @@
}
}
+impl BitXor<&Self> for BVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec2> for &BVec2 {
+ type Output = BVec2;
+ #[inline]
+ fn bitxor(self, rhs: &BVec2) -> BVec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec2> for &BVec2 {
+ type Output = BVec2;
+ #[inline]
+ fn bitxor(self, rhs: BVec2) -> BVec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec2 {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -171,6 +257,13 @@
}
}
+impl BitXorAssign<&Self> for BVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec2 {
type Output = Self;
#[inline]
@@ -182,6 +275,14 @@
}
}
+impl Not for &BVec2 {
+ type Output = BVec2;
+ #[inline]
+ fn not(self) -> BVec2 {
+ (*self).not()
+ }
+}
+
impl fmt::Debug for BVec2 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let arr = self.into_u32_array();
diff --git a/crates/glam/src/bool/bvec3.rs b/crates/glam/src/bool/bvec3.rs
index ea20675..ad32f25 100644
--- a/crates/glam/src/bool/bvec3.rs
+++ b/crates/glam/src/bool/bvec3.rs
@@ -136,6 +136,30 @@
}
}
+impl BitAnd<&Self> for BVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec3> for &BVec3 {
+ type Output = BVec3;
+ #[inline]
+ fn bitand(self, rhs: &BVec3) -> BVec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec3> for &BVec3 {
+ type Output = BVec3;
+ #[inline]
+ fn bitand(self, rhs: BVec3) -> BVec3 {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec3 {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -143,6 +167,13 @@
}
}
+impl BitAndAssign<&Self> for BVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec3 {
type Output = Self;
#[inline]
@@ -155,6 +186,30 @@
}
}
+impl BitOr<&Self> for BVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec3> for &BVec3 {
+ type Output = BVec3;
+ #[inline]
+ fn bitor(self, rhs: &BVec3) -> BVec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec3> for &BVec3 {
+ type Output = BVec3;
+ #[inline]
+ fn bitor(self, rhs: BVec3) -> BVec3 {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec3 {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -162,6 +217,13 @@
}
}
+impl BitOrAssign<&Self> for BVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec3 {
type Output = Self;
#[inline]
@@ -174,6 +236,30 @@
}
}
+impl BitXor<&Self> for BVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec3> for &BVec3 {
+ type Output = BVec3;
+ #[inline]
+ fn bitxor(self, rhs: &BVec3) -> BVec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec3> for &BVec3 {
+ type Output = BVec3;
+ #[inline]
+ fn bitxor(self, rhs: BVec3) -> BVec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec3 {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -181,6 +267,13 @@
}
}
+impl BitXorAssign<&Self> for BVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec3 {
type Output = Self;
#[inline]
@@ -193,6 +286,14 @@
}
}
+impl Not for &BVec3 {
+ type Output = BVec3;
+ #[inline]
+ fn not(self) -> BVec3 {
+ (*self).not()
+ }
+}
+
impl fmt::Debug for BVec3 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let arr = self.into_u32_array();
diff --git a/crates/glam/src/bool/bvec4.rs b/crates/glam/src/bool/bvec4.rs
index 4593f2e..4889086 100644
--- a/crates/glam/src/bool/bvec4.rs
+++ b/crates/glam/src/bool/bvec4.rs
@@ -141,6 +141,30 @@
}
}
+impl BitAnd<&Self> for BVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec4> for &BVec4 {
+ type Output = BVec4;
+ #[inline]
+ fn bitand(self, rhs: &BVec4) -> BVec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec4> for &BVec4 {
+ type Output = BVec4;
+ #[inline]
+ fn bitand(self, rhs: BVec4) -> BVec4 {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec4 {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -148,6 +172,13 @@
}
}
+impl BitAndAssign<&Self> for BVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec4 {
type Output = Self;
#[inline]
@@ -161,6 +192,30 @@
}
}
+impl BitOr<&Self> for BVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec4> for &BVec4 {
+ type Output = BVec4;
+ #[inline]
+ fn bitor(self, rhs: &BVec4) -> BVec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec4> for &BVec4 {
+ type Output = BVec4;
+ #[inline]
+ fn bitor(self, rhs: BVec4) -> BVec4 {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec4 {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -168,6 +223,13 @@
}
}
+impl BitOrAssign<&Self> for BVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec4 {
type Output = Self;
#[inline]
@@ -181,6 +243,30 @@
}
}
+impl BitXor<&Self> for BVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec4> for &BVec4 {
+ type Output = BVec4;
+ #[inline]
+ fn bitxor(self, rhs: &BVec4) -> BVec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec4> for &BVec4 {
+ type Output = BVec4;
+ #[inline]
+ fn bitxor(self, rhs: BVec4) -> BVec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec4 {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -188,6 +274,13 @@
}
}
+impl BitXorAssign<&Self> for BVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec4 {
type Output = Self;
#[inline]
@@ -201,6 +294,14 @@
}
}
+impl Not for &BVec4 {
+ type Output = BVec4;
+ #[inline]
+ fn not(self) -> BVec4 {
+ (*self).not()
+ }
+}
+
impl fmt::Debug for BVec4 {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let arr = self.into_u32_array();
diff --git a/crates/glam/src/bool/coresimd/bvec3a.rs b/crates/glam/src/bool/coresimd/bvec3a.rs
index 8347ec8..dcf5f73 100644
--- a/crates/glam/src/bool/coresimd/bvec3a.rs
+++ b/crates/glam/src/bool/coresimd/bvec3a.rs
@@ -151,6 +151,30 @@
}
}
+impl BitAnd<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec3A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -158,6 +182,13 @@
}
}
+impl BitAndAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec3A {
type Output = Self;
#[inline]
@@ -166,6 +197,30 @@
}
}
+impl BitOr<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec3A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -173,6 +228,13 @@
}
}
+impl BitOrAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec3A {
type Output = Self;
#[inline]
@@ -181,6 +243,30 @@
}
}
+impl BitXor<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec3A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -188,6 +274,13 @@
}
}
+impl BitXorAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec3A {
type Output = Self;
#[inline]
@@ -196,6 +289,14 @@
}
}
+impl Not for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn not(self) -> BVec3A {
+ (*self).not()
+ }
+}
+
impl From<BVec3A> for mask32x4 {
#[inline]
fn from(t: BVec3A) -> Self {
diff --git a/crates/glam/src/bool/coresimd/bvec4a.rs b/crates/glam/src/bool/coresimd/bvec4a.rs
index 42bff3e..62d14d5 100644
--- a/crates/glam/src/bool/coresimd/bvec4a.rs
+++ b/crates/glam/src/bool/coresimd/bvec4a.rs
@@ -162,6 +162,30 @@
}
}
+impl BitAnd<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec4A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -169,6 +193,13 @@
}
}
+impl BitAndAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec4A {
type Output = Self;
#[inline]
@@ -177,6 +208,30 @@
}
}
+impl BitOr<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec4A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -184,6 +239,13 @@
}
}
+impl BitOrAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec4A {
type Output = Self;
#[inline]
@@ -192,6 +254,30 @@
}
}
+impl BitXor<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec4A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -199,6 +285,13 @@
}
}
+impl BitXorAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec4A {
type Output = Self;
#[inline]
@@ -207,6 +300,14 @@
}
}
+impl Not for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn not(self) -> BVec4A {
+ (*self).not()
+ }
+}
+
impl From<BVec4A> for mask32x4 {
#[inline]
fn from(t: BVec4A) -> Self {
diff --git a/crates/glam/src/bool/neon/bvec3a.rs b/crates/glam/src/bool/neon/bvec3a.rs
index 7a7bdbf..28ef41b 100644
--- a/crates/glam/src/bool/neon/bvec3a.rs
+++ b/crates/glam/src/bool/neon/bvec3a.rs
@@ -170,6 +170,30 @@
}
}
+impl BitAnd<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec3A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -177,6 +201,13 @@
}
}
+impl BitAndAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec3A {
type Output = Self;
#[inline]
@@ -185,6 +216,30 @@
}
}
+impl BitOr<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec3A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -192,6 +247,13 @@
}
}
+impl BitOrAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec3A {
type Output = Self;
#[inline]
@@ -200,6 +262,30 @@
}
}
+impl BitXor<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec3A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -207,6 +293,13 @@
}
}
+impl BitXorAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec3A {
type Output = Self;
#[inline]
@@ -215,6 +308,14 @@
}
}
+impl Not for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn not(self) -> BVec3A {
+ (*self).not()
+ }
+}
+
impl From<BVec3A> for uint32x4_t {
#[inline]
fn from(t: BVec3A) -> Self {
diff --git a/crates/glam/src/bool/neon/bvec4a.rs b/crates/glam/src/bool/neon/bvec4a.rs
index 2b2f40a..24ce5bf 100644
--- a/crates/glam/src/bool/neon/bvec4a.rs
+++ b/crates/glam/src/bool/neon/bvec4a.rs
@@ -181,6 +181,30 @@
}
}
+impl BitAnd<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec4A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -188,6 +212,13 @@
}
}
+impl BitAndAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec4A {
type Output = Self;
#[inline]
@@ -196,6 +227,30 @@
}
}
+impl BitOr<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec4A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -203,6 +258,13 @@
}
}
+impl BitOrAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec4A {
type Output = Self;
#[inline]
@@ -211,6 +273,30 @@
}
}
+impl BitXor<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec4A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -218,6 +304,13 @@
}
}
+impl BitXorAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec4A {
type Output = Self;
#[inline]
@@ -226,6 +319,14 @@
}
}
+impl Not for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn not(self) -> BVec4A {
+ (*self).not()
+ }
+}
+
impl From<BVec4A> for uint32x4_t {
#[inline]
fn from(t: BVec4A) -> Self {
diff --git a/crates/glam/src/bool/scalar/bvec3a.rs b/crates/glam/src/bool/scalar/bvec3a.rs
index 18f9317..b00723f 100644
--- a/crates/glam/src/bool/scalar/bvec3a.rs
+++ b/crates/glam/src/bool/scalar/bvec3a.rs
@@ -140,6 +140,30 @@
}
}
+impl BitAnd<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec3A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -147,6 +171,13 @@
}
}
+impl BitAndAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec3A {
type Output = Self;
#[inline]
@@ -159,6 +190,30 @@
}
}
+impl BitOr<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec3A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -166,6 +221,13 @@
}
}
+impl BitOrAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec3A {
type Output = Self;
#[inline]
@@ -178,6 +240,30 @@
}
}
+impl BitXor<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec3A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -185,6 +271,13 @@
}
}
+impl BitXorAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec3A {
type Output = Self;
#[inline]
@@ -197,6 +290,14 @@
}
}
+impl Not for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn not(self) -> BVec3A {
+ (*self).not()
+ }
+}
+
impl fmt::Debug for BVec3A {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let arr = self.into_u32_array();
diff --git a/crates/glam/src/bool/scalar/bvec4a.rs b/crates/glam/src/bool/scalar/bvec4a.rs
index 588f7ec..edd48dc 100644
--- a/crates/glam/src/bool/scalar/bvec4a.rs
+++ b/crates/glam/src/bool/scalar/bvec4a.rs
@@ -146,6 +146,30 @@
}
}
+impl BitAnd<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec4A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -153,6 +177,13 @@
}
}
+impl BitAndAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec4A {
type Output = Self;
#[inline]
@@ -166,6 +197,30 @@
}
}
+impl BitOr<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec4A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -173,6 +228,13 @@
}
}
+impl BitOrAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec4A {
type Output = Self;
#[inline]
@@ -186,6 +248,30 @@
}
}
+impl BitXor<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec4A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -193,6 +279,13 @@
}
}
+impl BitXorAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec4A {
type Output = Self;
#[inline]
@@ -206,6 +299,14 @@
}
}
+impl Not for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn not(self) -> BVec4A {
+ (*self).not()
+ }
+}
+
impl fmt::Debug for BVec4A {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let arr = self.into_u32_array();
diff --git a/crates/glam/src/bool/sse2/bvec3a.rs b/crates/glam/src/bool/sse2/bvec3a.rs
index 8883f8f..d78a741 100644
--- a/crates/glam/src/bool/sse2/bvec3a.rs
+++ b/crates/glam/src/bool/sse2/bvec3a.rs
@@ -162,6 +162,30 @@
}
}
+impl BitAnd<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec3A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -169,6 +193,13 @@
}
}
+impl BitAndAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec3A {
type Output = Self;
#[inline]
@@ -177,6 +208,30 @@
}
}
+impl BitOr<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec3A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -184,6 +239,13 @@
}
}
+impl BitOrAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec3A {
type Output = Self;
#[inline]
@@ -192,6 +254,30 @@
}
}
+impl BitXor<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec3A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -199,6 +285,13 @@
}
}
+impl BitXorAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec3A {
type Output = Self;
#[inline]
@@ -207,6 +300,14 @@
}
}
+impl Not for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn not(self) -> BVec3A {
+ (*self).not()
+ }
+}
+
impl From<BVec3A> for __m128 {
#[inline]
fn from(t: BVec3A) -> Self {
diff --git a/crates/glam/src/bool/sse2/bvec4a.rs b/crates/glam/src/bool/sse2/bvec4a.rs
index c12d0f8..d5948ca 100644
--- a/crates/glam/src/bool/sse2/bvec4a.rs
+++ b/crates/glam/src/bool/sse2/bvec4a.rs
@@ -174,6 +174,30 @@
}
}
+impl BitAnd<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec4A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -181,6 +205,13 @@
}
}
+impl BitAndAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec4A {
type Output = Self;
#[inline]
@@ -189,6 +220,30 @@
}
}
+impl BitOr<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec4A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -196,6 +251,13 @@
}
}
+impl BitOrAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec4A {
type Output = Self;
#[inline]
@@ -204,6 +266,30 @@
}
}
+impl BitXor<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec4A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -211,6 +297,13 @@
}
}
+impl BitXorAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec4A {
type Output = Self;
#[inline]
@@ -219,6 +312,14 @@
}
}
+impl Not for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn not(self) -> BVec4A {
+ (*self).not()
+ }
+}
+
impl From<BVec4A> for __m128 {
#[inline]
fn from(t: BVec4A) -> Self {
diff --git a/crates/glam/src/bool/wasm32/bvec3a.rs b/crates/glam/src/bool/wasm32/bvec3a.rs
index cfeedf8..dcc19ee 100644
--- a/crates/glam/src/bool/wasm32/bvec3a.rs
+++ b/crates/glam/src/bool/wasm32/bvec3a.rs
@@ -153,6 +153,30 @@
}
}
+impl BitAnd<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitand(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec3A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -160,6 +184,13 @@
}
}
+impl BitAndAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec3A {
type Output = Self;
#[inline]
@@ -168,6 +199,30 @@
}
}
+impl BitOr<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec3A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -175,6 +230,13 @@
}
}
+impl BitOrAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec3A {
type Output = Self;
#[inline]
@@ -183,6 +245,30 @@
}
}
+impl BitXor<&Self> for BVec3A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec3A) -> BVec3A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec3A> for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn bitxor(self, rhs: BVec3A) -> BVec3A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec3A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -190,6 +276,13 @@
}
}
+impl BitXorAssign<&Self> for BVec3A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec3A {
type Output = Self;
#[inline]
@@ -198,6 +291,14 @@
}
}
+impl Not for &BVec3A {
+ type Output = BVec3A;
+ #[inline]
+ fn not(self) -> BVec3A {
+ (*self).not()
+ }
+}
+
impl From<BVec3A> for v128 {
#[inline]
fn from(t: BVec3A) -> Self {
diff --git a/crates/glam/src/bool/wasm32/bvec4a.rs b/crates/glam/src/bool/wasm32/bvec4a.rs
index 792c5fb..0daef98 100644
--- a/crates/glam/src/bool/wasm32/bvec4a.rs
+++ b/crates/glam/src/bool/wasm32/bvec4a.rs
@@ -160,6 +160,30 @@
}
}
+impl BitAnd<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitand(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitand(rhs)
+ }
+}
+
impl BitAndAssign for BVec4A {
#[inline]
fn bitand_assign(&mut self, rhs: Self) {
@@ -167,6 +191,13 @@
}
}
+impl BitAndAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for BVec4A {
type Output = Self;
#[inline]
@@ -175,6 +206,30 @@
}
}
+impl BitOr<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitor(rhs)
+ }
+}
+
impl BitOrAssign for BVec4A {
#[inline]
fn bitor_assign(&mut self, rhs: Self) {
@@ -182,6 +237,13 @@
}
}
+impl BitOrAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for BVec4A {
type Output = Self;
#[inline]
@@ -190,6 +252,30 @@
}
}
+impl BitXor<&Self> for BVec4A {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: &BVec4A) -> BVec4A {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<BVec4A> for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn bitxor(self, rhs: BVec4A) -> BVec4A {
+ (*self).bitxor(rhs)
+ }
+}
+
impl BitXorAssign for BVec4A {
#[inline]
fn bitxor_assign(&mut self, rhs: Self) {
@@ -197,6 +283,13 @@
}
}
+impl BitXorAssign<&Self> for BVec4A {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Not for BVec4A {
type Output = Self;
#[inline]
@@ -205,6 +298,14 @@
}
}
+impl Not for &BVec4A {
+ type Output = BVec4A;
+ #[inline]
+ fn not(self) -> BVec4A {
+ (*self).not()
+ }
+}
+
impl From<BVec4A> for v128 {
#[inline]
fn from(t: BVec4A) -> Self {
diff --git a/crates/glam/src/euler.rs b/crates/glam/src/euler.rs
index fba11a7..3f01020 100644
--- a/crates/glam/src/euler.rs
+++ b/crates/glam/src/euler.rs
@@ -5,7 +5,7 @@
/// Euler rotation sequences.
///
/// The three elemental rotations may be extrinsic (rotations about the axes xyz of the original
-/// coordinate system, which is assumed to remain motionless), or intrinsic(rotations about the
+/// coordinate system, which is assumed to remain motionless), or intrinsic (rotations about the
/// axes of the rotating coordinate system XYZ, solidary with the moving body, which changes its
/// orientation after each elemental rotation).
///
@@ -192,14 +192,14 @@
const fn angle_order(self) -> (usize, usize, usize) {
let i = self.initial_axis as usize;
let j = if self.parity_even {
- Order::next_axis(i)
+ Self::next_axis(i)
} else {
- Order::prev_axis(i)
+ Self::prev_axis(i)
};
let k = if self.parity_even {
- Order::prev_axis(i)
+ Self::prev_axis(i)
} else {
- Order::next_axis(i)
+ Self::next_axis(i)
};
(i, j, k)
}
diff --git a/crates/glam/src/f32/affine2.rs b/crates/glam/src/f32/affine2.rs
index 658eae8..cbb9374 100644
--- a/crates/glam/src/f32/affine2.rs
+++ b/crates/glam/src/f32/affine2.rs
@@ -5,6 +5,14 @@
/// A 2D affine transform, which can represent translation, rotation, scaling and shear.
#[derive(Copy, Clone)]
+#[cfg_attr(
+ all(feature = "bytemuck", not(feature = "scalar-math")),
+ derive(bytemuck::AnyBitPattern)
+)]
+#[cfg_attr(
+ all(feature = "bytemuck", feature = "scalar-math"),
+ derive(bytemuck::Pod, bytemuck::Zeroable)
+)]
#[repr(C)]
pub struct Affine2 {
pub matrix2: Mat2,
@@ -388,10 +396,10 @@
}
impl Mul for Affine2 {
- type Output = Affine2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: Affine2) -> Self::Output {
+ fn mul(self, rhs: Self) -> Self {
Self {
matrix2: self.matrix2 * rhs.matrix2,
translation: self.matrix2 * rhs.translation + self.translation,
@@ -399,16 +407,47 @@
}
}
+impl Mul<&Self> for Affine2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Affine2> for &Affine2 {
+ type Output = Affine2;
+ #[inline]
+ fn mul(self, rhs: &Affine2) -> Affine2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Affine2> for &Affine2 {
+ type Output = Affine2;
+ #[inline]
+ fn mul(self, rhs: Affine2) -> Affine2 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign for Affine2 {
#[inline]
- fn mul_assign(&mut self, rhs: Affine2) {
+ fn mul_assign(&mut self, rhs: Self) {
*self = self.mul(rhs);
}
}
+impl MulAssign<&Self> for Affine2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
+ }
+}
+
impl From<Affine2> for Mat3 {
#[inline]
- fn from(m: Affine2) -> Mat3 {
+ fn from(m: Affine2) -> Self {
Self::from_cols(
m.matrix2.x_axis.extend(0.0),
m.matrix2.y_axis.extend(0.0),
@@ -426,23 +465,74 @@
}
}
-impl Mul<Affine2> for Mat3 {
+impl Mul<&Mat3> for Affine2 {
type Output = Mat3;
-
#[inline]
- fn mul(self, rhs: Affine2) -> Self::Output {
- self * Mat3::from(rhs)
+ fn mul(self, rhs: &Mat3) -> Mat3 {
+ self.mul(*rhs)
}
}
-impl From<Affine2> for Mat3A {
+impl Mul<&Mat3> for &Affine2 {
+ type Output = Mat3;
#[inline]
- fn from(m: Affine2) -> Mat3A {
- Self::from_cols(
- Vec3A::from((m.matrix2.x_axis, 0.0)),
- Vec3A::from((m.matrix2.y_axis, 0.0)),
- Vec3A::from((m.translation, 1.0)),
- )
+ fn mul(self, rhs: &Mat3) -> Mat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3> for &Affine2 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: Mat3) -> Mat3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<Affine2> for Mat3 {
+ type Output = Self;
+
+ #[inline]
+ fn mul(self, rhs: Affine2) -> Self {
+ self * Self::from(rhs)
+ }
+}
+
+impl Mul<&Affine2> for Mat3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Affine2) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Affine2> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: &Affine2) -> Mat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Affine2> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: Affine2) -> Mat3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<Affine2> for Mat3 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: Affine2) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Affine2> for Mat3 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Affine2) {
+ self.mul_assign(*rhs);
}
}
@@ -455,11 +545,84 @@
}
}
-impl Mul<Affine2> for Mat3A {
+impl Mul<&Mat3A> for Affine2 {
type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &Affine2 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &Affine2 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<Affine2> for Mat3A {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: Affine2) -> Self::Output {
- self * Mat3A::from(rhs)
+ fn mul(self, rhs: Affine2) -> Self {
+ self * Self::from(rhs)
+ }
+}
+
+impl Mul<&Affine2> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Affine2) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Affine2> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Affine2) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Affine2> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Affine2) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<Affine2> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: Affine2) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Affine2> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Affine2) {
+ self.mul_assign(*rhs);
+ }
+}
+
+impl From<Affine2> for Mat3A {
+ #[inline]
+ fn from(m: Affine2) -> Self {
+ Self::from_cols(
+ Vec3A::from((m.matrix2.x_axis, 0.0)),
+ Vec3A::from((m.matrix2.y_axis, 0.0)),
+ Vec3A::from((m.translation, 1.0)),
+ )
}
}
diff --git a/crates/glam/src/f32/affine3a.rs b/crates/glam/src/f32/affine3a.rs
index 0d30de1..6946e7c 100644
--- a/crates/glam/src/f32/affine3a.rs
+++ b/crates/glam/src/f32/affine3a.rs
@@ -7,6 +7,7 @@
///
/// This type is 16 byte aligned.
#[derive(Copy, Clone)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::AnyBitPattern))]
#[repr(C)]
pub struct Affine3A {
pub matrix3: Mat3A,
@@ -539,10 +540,10 @@
}
impl Mul for Affine3A {
- type Output = Affine3A;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: Affine3A) -> Self::Output {
+ fn mul(self, rhs: Self) -> Self {
Self {
matrix3: self.matrix3 * rhs.matrix3,
translation: self.matrix3 * rhs.translation + self.translation,
@@ -550,22 +551,41 @@
}
}
+impl Mul<&Self> for Affine3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Affine3A> for &Affine3A {
+ type Output = Affine3A;
+ #[inline]
+ fn mul(self, rhs: &Affine3A) -> Affine3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Affine3A> for &Affine3A {
+ type Output = Affine3A;
+ #[inline]
+ fn mul(self, rhs: Affine3A) -> Affine3A {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign for Affine3A {
#[inline]
- fn mul_assign(&mut self, rhs: Affine3A) {
+ fn mul_assign(&mut self, rhs: Self) {
*self = self.mul(rhs);
}
}
-impl From<Affine3A> for Mat4 {
+impl MulAssign<&Self> for Affine3A {
#[inline]
- fn from(m: Affine3A) -> Mat4 {
- Mat4::from_cols(
- m.matrix3.x_axis.extend(0.0),
- m.matrix3.y_axis.extend(0.0),
- m.matrix3.z_axis.extend(0.0),
- m.translation.extend(1.0),
- )
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -578,11 +598,85 @@
}
}
-impl Mul<Affine3A> for Mat4 {
+impl Mul<&Mat4> for Affine3A {
type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &Affine3A {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &Affine3A {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<Affine3A> for Mat4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: Affine3A) -> Self::Output {
- self * Mat4::from(rhs)
+ fn mul(self, rhs: Affine3A) -> Self {
+ self * Self::from(rhs)
+ }
+}
+
+impl Mul<&Affine3A> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Affine3A) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Affine3A> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Affine3A) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Affine3A> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Affine3A) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<Affine3A> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: Affine3A) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Affine3A> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Affine3A) {
+ self.mul_assign(*rhs);
+ }
+}
+
+impl From<Affine3A> for Mat4 {
+ #[inline]
+ fn from(m: Affine3A) -> Self {
+ Self::from_cols(
+ m.matrix3.x_axis.extend(0.0),
+ m.matrix3.y_axis.extend(0.0),
+ m.matrix3.z_axis.extend(0.0),
+ m.translation.extend(1.0),
+ )
}
}
diff --git a/crates/glam/src/f32/coresimd/mat2.rs b/crates/glam/src/f32/coresimd/mat2.rs
index 440b722..4942fa5 100644
--- a/crates/glam/src/f32/coresimd/mat2.rs
+++ b/crates/glam/src/f32/coresimd/mat2.rs
@@ -20,6 +20,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Mat2(pub(crate) f32x4);
@@ -305,30 +306,21 @@
#[inline]
#[must_use]
pub fn mul_mat2(&self, rhs: &Self) -> Self {
- let abcd = self.0;
- let xxyy0 = simd_swizzle!(rhs.0, [0, 0, 1, 1]);
- let xxyy1 = simd_swizzle!(rhs.0, [2, 2, 3, 3]);
- let axbxcydy0 = abcd * xxyy0;
- let axbxcydy1 = abcd * xxyy1;
- let cydyaxbx0 = simd_swizzle!(axbxcydy0, [2, 3, 0, 1]);
- let cydyaxbx1 = simd_swizzle!(axbxcydy1, [2, 3, 0, 1]);
- let result0 = axbxcydy0 + cydyaxbx0;
- let result1 = axbxcydy1 + cydyaxbx1;
- Self(simd_swizzle!(result0, result1, [0, 1, 4, 5]))
+ self.mul(rhs)
}
/// Adds two 2x2 matrices.
#[inline]
#[must_use]
pub fn add_mat2(&self, rhs: &Self) -> Self {
- Self(self.0 + rhs.0)
+ self.add(rhs)
}
/// Subtracts two 2x2 matrices.
#[inline]
#[must_use]
pub fn sub_mat2(&self, rhs: &Self) -> Self {
- Self(self.0 - rhs.0)
+ self.sub(rhs)
}
/// Multiplies a 2x2 matrix by a scalar.
@@ -381,33 +373,95 @@
}
}
-impl Add<Mat2> for Mat2 {
+impl Add for Mat2 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat2(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self(self.0 + rhs.0)
}
}
-impl AddAssign<Mat2> for Mat2 {
+impl Add<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: &Mat2) -> Mat2 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: Mat2) -> Mat2 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat2(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat2> for Mat2 {
+impl AddAssign<&Self> for Mat2 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat2 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat2(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self(self.0 - rhs.0)
}
}
-impl SubAssign<Mat2> for Mat2 {
+impl Sub<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: &Mat2) -> Mat2 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: Mat2) -> Mat2 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat2 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat2(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat2 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -419,18 +473,66 @@
}
}
-impl Mul<Mat2> for Mat2 {
- type Output = Self;
+impl Neg for &Mat2 {
+ type Output = Mat2;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat2(&rhs)
+ fn neg(self) -> Mat2 {
+ (*self).neg()
}
}
-impl MulAssign<Mat2> for Mat2 {
+impl Mul for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ let abcd = self.0;
+ let xxyy0 = simd_swizzle!(rhs.0, [0, 0, 1, 1]);
+ let xxyy1 = simd_swizzle!(rhs.0, [2, 2, 3, 3]);
+ let axbxcydy0 = abcd * xxyy0;
+ let axbxcydy1 = abcd * xxyy1;
+ let cydyaxbx0 = simd_swizzle!(axbxcydy0, [2, 3, 0, 1]);
+ let cydyaxbx1 = simd_swizzle!(axbxcydy1, [2, 3, 0, 1]);
+ let result0 = axbxcydy0 + cydyaxbx0;
+ let result1 = axbxcydy1 + cydyaxbx1;
+ Self(simd_swizzle!(result0, result1, [0, 1, 4, 5]))
+ }
+}
+
+impl Mul<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat2(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -442,6 +544,30 @@
}
}
+impl Mul<&Vec2> for Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: Vec2) -> Vec2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat2> for f32 {
type Output = Mat2;
#[inline]
@@ -450,18 +576,73 @@
}
}
+impl Mul<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat2 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -473,18 +654,73 @@
}
}
+impl Div<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: Mat2) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat2 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat2 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat2 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/coresimd/mat3a.rs b/crates/glam/src/f32/coresimd/mat3a.rs
index 9b46745..3b405e4 100644
--- a/crates/glam/src/f32/coresimd/mat3a.rs
+++ b/crates/glam/src/f32/coresimd/mat3a.rs
@@ -44,6 +44,7 @@
/// vectors respectively. These methods assume that `Self` contains a valid affine
/// transform.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat3A {
pub x_axis: Vec3A,
@@ -702,33 +703,21 @@
#[inline]
#[must_use]
pub fn mul_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- )
+ self.mul(rhs)
}
/// Adds two 3x3 matrices.
#[inline]
#[must_use]
pub fn add_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 3x3 matrices.
#[inline]
#[must_use]
pub fn sub_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 3x3 matrix by a scalar.
@@ -795,33 +784,103 @@
}
}
-impl Add<Mat3A> for Mat3A {
+impl Add for Mat3A {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat3(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ )
}
}
-impl AddAssign<Mat3A> for Mat3A {
+impl Add<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: &Mat3A) -> Mat3A {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: Mat3A) -> Mat3A {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat3(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat3A> for Mat3A {
+impl AddAssign<&Self> for Mat3A {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat3A {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat3(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ )
}
}
-impl SubAssign<Mat3A> for Mat3A {
+impl Sub<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: &Mat3A) -> Mat3A {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: Mat3A) -> Mat3A {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat3A {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat3(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat3A {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -833,18 +892,61 @@
}
}
-impl Mul<Mat3A> for Mat3A {
- type Output = Self;
+impl Neg for &Mat3A {
+ type Output = Mat3A;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat3(&rhs)
+ fn neg(self) -> Mat3A {
+ (*self).neg()
}
}
-impl MulAssign<Mat3A> for Mat3A {
+impl Mul for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat3(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -856,6 +958,30 @@
}
}
+impl Mul<&Vec3A> for Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat3A> for f32 {
type Output = Mat3A;
#[inline]
@@ -864,18 +990,73 @@
}
}
+impl Mul<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat3A {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -887,18 +1068,73 @@
}
}
+impl Div<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: Mat3A) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat3A {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat3A {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat3A {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
@@ -910,6 +1146,30 @@
}
}
+impl Mul<&Vec3> for Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
impl From<Mat3> for Mat3A {
#[inline]
fn from(m: Mat3) -> Self {
diff --git a/crates/glam/src/f32/coresimd/mat4.rs b/crates/glam/src/f32/coresimd/mat4.rs
index a063997..29f42c2 100644
--- a/crates/glam/src/f32/coresimd/mat4.rs
+++ b/crates/glam/src/f32/coresimd/mat4.rs
@@ -50,6 +50,7 @@
/// The resulting perspective project can be use to transform 3D vectors as points with
/// perspective correction using the [`Self::project_point3()`] convenience method.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat4 {
pub x_axis: Vec4,
@@ -873,6 +874,103 @@
Self::look_to_rh(eye, center.sub(eye).normalize(), up)
}
+ /// Creates a right-handed perspective projection matrix with [-1,1] depth range.
+ ///
+ /// This is the same as the OpenGL `glFurstum` function.
+ ///
+ /// See <https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml>
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh_gl(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -(z_far + z_near) * inv_depth;
+ let d = -(2.0 * z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a left-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_lh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, 1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a right-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
/// Creates a right-handed perspective projection matrix with `[-1,1]` depth range.
///
/// Useful to map the standard right-handed coordinate system into what OpenGL expects.
@@ -1252,36 +1350,21 @@
#[inline]
#[must_use]
pub fn mul_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- self.mul(rhs.w_axis),
- )
+ self.mul(rhs)
}
/// Adds two 4x4 matrices.
#[inline]
#[must_use]
pub fn add_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- self.w_axis.add(rhs.w_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 4x4 matrices.
#[inline]
#[must_use]
pub fn sub_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- self.w_axis.sub(rhs.w_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 4x4 matrix by a scalar.
@@ -1357,33 +1440,105 @@
}
}
-impl Add<Mat4> for Mat4 {
+impl Add for Mat4 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat4(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ self.w_axis.add(rhs.w_axis),
+ )
}
}
-impl AddAssign<Mat4> for Mat4 {
+impl Add<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: &Mat4) -> Mat4 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: Mat4) -> Mat4 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat4(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat4> for Mat4 {
+impl AddAssign<&Self> for Mat4 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat4 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat4(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ self.w_axis.sub(rhs.w_axis),
+ )
}
}
-impl SubAssign<Mat4> for Mat4 {
+impl Sub<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: &Mat4) -> Mat4 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: Mat4) -> Mat4 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat4 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat4(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat4 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1400,18 +1555,62 @@
}
}
-impl Mul<Mat4> for Mat4 {
- type Output = Self;
+impl Neg for &Mat4 {
+ type Output = Mat4;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat4(&rhs)
+ fn neg(self) -> Mat4 {
+ (*self).neg()
}
}
-impl MulAssign<Mat4> for Mat4 {
+impl Mul for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ self.mul(rhs.w_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat4(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1423,6 +1622,30 @@
}
}
+impl Mul<&Vec4> for Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: Vec4) -> Vec4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat4> for f32 {
type Output = Mat4;
#[inline]
@@ -1431,18 +1654,73 @@
}
}
+impl Mul<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat4 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -1454,18 +1732,73 @@
}
}
+impl Div<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: Mat4) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat4 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat4 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat4 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/coresimd/quat.rs b/crates/glam/src/f32/coresimd/quat.rs
index 2917b7b..8525ae8 100644
--- a/crates/glam/src/f32/coresimd/quat.rs
+++ b/crates/glam/src/f32/coresimd/quat.rs
@@ -11,7 +11,9 @@
use core::fmt;
use core::iter::{Product, Sum};
-use core::ops::{Add, Deref, DerefMut, Div, Mul, MulAssign, Neg, Sub};
+use core::ops::{
+ Add, AddAssign, Deref, DerefMut, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign,
+};
/// Creates a quaternion from `x`, `y`, `z` and `w` values.
///
@@ -33,6 +35,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Quat(pub(crate) f32x4);
@@ -447,6 +450,7 @@
///
/// Will panic if `up` is not normalized when `glam_assert` is enabled.
#[inline]
+ #[must_use]
pub fn look_at_rh(eye: Vec3, center: Vec3, up: Vec3) -> Self {
Self::look_to_rh(center.sub(eye).normalize(), up)
}
@@ -866,7 +870,7 @@
}
}
-impl Add<Quat> for Quat {
+impl Add for Quat {
type Output = Self;
/// Adds two quaternions.
///
@@ -880,7 +884,45 @@
}
}
-impl Sub<Quat> for Quat {
+impl Add<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: &Quat) -> Quat {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: Quat) -> Quat {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: Self) {
+ *self = self.add(rhs);
+ }
+}
+
+impl AddAssign<&Self> for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Quat {
type Output = Self;
/// Subtracts the `rhs` quaternion from `self`.
///
@@ -891,6 +933,44 @@
}
}
+impl Sub<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: &Quat) -> Quat {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: Quat) -> Quat {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: Self) {
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
+ }
+}
+
impl Mul<f32> for Quat {
type Output = Self;
/// Multiplies a quaternion by a scalar value.
@@ -902,6 +982,44 @@
}
}
+impl Mul<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: f32) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: f32) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
+ }
+}
+
impl Div<f32> for Quat {
type Output = Self;
/// Divides a quaternion by a scalar value.
@@ -912,7 +1030,45 @@
}
}
-impl Mul<Quat> for Quat {
+impl Div<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: &f32) -> Quat {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: f32) -> Quat {
+ (*self).div(rhs)
+ }
+}
+
+impl DivAssign<f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: f32) {
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
+ }
+}
+
+impl Mul for Quat {
type Output = Self;
/// Multiplies two quaternions. If they each represent a rotation, the result will
/// represent the combined rotation.
@@ -929,19 +1085,41 @@
}
}
-impl MulAssign<Quat> for Quat {
- /// Multiplies two quaternions. If they each represent a rotation, the result will
- /// represent the combined rotation.
- ///
- /// Note that due to floating point rounding the result may not be perfectly
- /// normalized.
- ///
- /// # Panics
- ///
- /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.
+impl Mul<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &Quat) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: Quat) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Quat {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_quat(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -958,6 +1136,62 @@
}
}
+impl Mul<&Vec3> for Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Self::Output {
+ self.mul_vec3a(rhs)
+ }
+}
+
+impl Mul<&Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Neg for Quat {
type Output = Self;
#[inline]
@@ -966,6 +1200,14 @@
}
}
+impl Neg for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn neg(self) -> Quat {
+ (*self).neg()
+ }
+}
+
impl Default for Quat {
#[inline]
fn default() -> Self {
@@ -1024,14 +1266,6 @@
}
}
-impl Mul<Vec3A> for Quat {
- type Output = Vec3A;
- #[inline]
- fn mul(self, rhs: Vec3A) -> Self::Output {
- self.mul_vec3a(rhs)
- }
-}
-
impl From<Quat> for Vec4 {
#[inline]
fn from(q: Quat) -> Self {
diff --git a/crates/glam/src/f32/coresimd/vec3a.rs b/crates/glam/src/f32/coresimd/vec3a.rs
index 2d113a7..1636183 100644
--- a/crates/glam/src/f32/coresimd/vec3a.rs
+++ b/crates/glam/src/f32/coresimd/vec3a.rs
@@ -26,6 +26,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Vec3A(pub(crate) f32x4);
@@ -132,7 +133,7 @@
#[inline]
#[must_use]
pub const fn to_array(&self) -> [f32; 3] {
- unsafe { *(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { *(self as *const Self as *const [f32; 3]) }
}
/// Creates a vector from the first 3 values in `slice`.
@@ -473,6 +474,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec3A {
BVec3A(f32x4::is_finite(self.0))
}
@@ -1165,7 +1168,7 @@
}
}
-impl Div<Vec3A> for Vec3A {
+impl Div for Vec3A {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1173,10 +1176,10 @@
}
}
-impl Div<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Div<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec3A) -> Vec3A {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1197,17 +1200,17 @@
}
}
-impl DivAssign<Vec3A> for Vec3A {
+impl DivAssign for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.0 /= rhs.0;
}
}
-impl DivAssign<&Vec3A> for Vec3A {
+impl DivAssign<&Self> for Vec3A {
#[inline]
- fn div_assign(&mut self, rhs: &Vec3A) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1220,9 +1223,9 @@
}
impl Div<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec3A {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1253,7 +1256,7 @@
impl DivAssign<&f32> for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1289,7 +1292,7 @@
}
}
-impl Mul<Vec3A> for Vec3A {
+impl Mul for Vec3A {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1297,10 +1300,10 @@
}
}
-impl Mul<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Mul<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec3A) -> Vec3A {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1321,17 +1324,17 @@
}
}
-impl MulAssign<Vec3A> for Vec3A {
+impl MulAssign for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.0 *= rhs.0;
}
}
-impl MulAssign<&Vec3A> for Vec3A {
+impl MulAssign<&Self> for Vec3A {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec3A) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1344,9 +1347,9 @@
}
impl Mul<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec3A {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1377,7 +1380,7 @@
impl MulAssign<&f32> for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1413,7 +1416,7 @@
}
}
-impl Add<Vec3A> for Vec3A {
+impl Add for Vec3A {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1421,10 +1424,10 @@
}
}
-impl Add<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Add<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec3A) -> Vec3A {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1445,17 +1448,17 @@
}
}
-impl AddAssign<Vec3A> for Vec3A {
+impl AddAssign for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.0 += rhs.0;
}
}
-impl AddAssign<&Vec3A> for Vec3A {
+impl AddAssign<&Self> for Vec3A {
#[inline]
- fn add_assign(&mut self, rhs: &Vec3A) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1468,9 +1471,9 @@
}
impl Add<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec3A {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1501,7 +1504,7 @@
impl AddAssign<&f32> for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1537,7 +1540,7 @@
}
}
-impl Sub<Vec3A> for Vec3A {
+impl Sub for Vec3A {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1545,10 +1548,10 @@
}
}
-impl Sub<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Sub<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec3A) -> Vec3A {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1569,17 +1572,17 @@
}
}
-impl SubAssign<Vec3A> for Vec3A {
+impl SubAssign for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: Vec3A) {
+ fn sub_assign(&mut self, rhs: Self) {
self.0 -= rhs.0;
}
}
-impl SubAssign<&Vec3A> for Vec3A {
+impl SubAssign<&Self> for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec3A) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1592,9 +1595,9 @@
}
impl Sub<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec3A {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1625,7 +1628,7 @@
impl SubAssign<&f32> for Vec3A {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1661,7 +1664,7 @@
}
}
-impl Rem<Vec3A> for Vec3A {
+impl Rem for Vec3A {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1669,10 +1672,10 @@
}
}
-impl Rem<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Rem<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec3A) -> Vec3A {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1693,17 +1696,17 @@
}
}
-impl RemAssign<Vec3A> for Vec3A {
+impl RemAssign for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.0 %= rhs.0;
}
}
-impl RemAssign<&Vec3A> for Vec3A {
+impl RemAssign<&Self> for Vec3A {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec3A) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1716,9 +1719,9 @@
}
impl Rem<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec3A {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1749,7 +1752,7 @@
impl RemAssign<&f32> for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1789,7 +1792,7 @@
impl AsRef<[f32; 3]> for Vec3A {
#[inline]
fn as_ref(&self) -> &[f32; 3] {
- unsafe { &*(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { &*(self as *const Self as *const [f32; 3]) }
}
}
@@ -1797,7 +1800,7 @@
impl AsMut<[f32; 3]> for Vec3A {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 3] {
- unsafe { &mut *(self as *mut Vec3A as *mut [f32; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 3]) }
}
}
@@ -1916,7 +1919,7 @@
impl From<Vec3A> for [f32; 3] {
#[inline]
fn from(v: Vec3A) -> Self {
- unsafe { *(v.0.to_array().as_ptr() as *const Self) }
+ unsafe { *(v.0.as_array().as_ptr() as *const Self) }
}
}
@@ -1930,7 +1933,7 @@
impl From<Vec3A> for (f32, f32, f32) {
#[inline]
fn from(v: Vec3A) -> Self {
- unsafe { *(v.0.to_array().as_ptr() as *const Self) }
+ (v.x, v.y, v.z)
}
}
@@ -1944,7 +1947,7 @@
impl From<Vec3A> for Vec3 {
#[inline]
fn from(v: Vec3A) -> Self {
- unsafe { *(v.0.to_array().as_ptr() as *const Self) }
+ unsafe { *(v.0.as_array().as_ptr() as *const Self) }
}
}
diff --git a/crates/glam/src/f32/coresimd/vec4.rs b/crates/glam/src/f32/coresimd/vec4.rs
index 4560238..156cb7a 100644
--- a/crates/glam/src/f32/coresimd/vec4.rs
+++ b/crates/glam/src/f32/coresimd/vec4.rs
@@ -22,6 +22,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Vec4(pub(crate) f32x4);
@@ -134,7 +135,7 @@
#[inline]
#[must_use]
pub const fn to_array(&self) -> [f32; 4] {
- unsafe { *(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { *(self as *const Self as *const [f32; 4]) }
}
/// Creates a vector from the first 4 values in `slice`.
@@ -465,6 +466,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec4A {
BVec4A(f32x4::is_finite(self.0))
}
@@ -1042,7 +1045,7 @@
}
}
-impl Div<Vec4> for Vec4 {
+impl Div for Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1050,10 +1053,10 @@
}
}
-impl Div<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Div<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec4) -> Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1074,17 +1077,17 @@
}
}
-impl DivAssign<Vec4> for Vec4 {
+impl DivAssign for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.0 /= rhs.0;
}
}
-impl DivAssign<&Vec4> for Vec4 {
+impl DivAssign<&Self> for Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1097,9 +1100,9 @@
}
impl Div<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec4 {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1130,7 +1133,7 @@
impl DivAssign<&f32> for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1166,7 +1169,7 @@
}
}
-impl Mul<Vec4> for Vec4 {
+impl Mul for Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1174,10 +1177,10 @@
}
}
-impl Mul<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Mul<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec4) -> Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1198,17 +1201,17 @@
}
}
-impl MulAssign<Vec4> for Vec4 {
+impl MulAssign for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.0 *= rhs.0;
}
}
-impl MulAssign<&Vec4> for Vec4 {
+impl MulAssign<&Self> for Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1221,9 +1224,9 @@
}
impl Mul<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec4 {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1254,7 +1257,7 @@
impl MulAssign<&f32> for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1290,7 +1293,7 @@
}
}
-impl Add<Vec4> for Vec4 {
+impl Add for Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1298,10 +1301,10 @@
}
}
-impl Add<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Add<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec4) -> Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1322,17 +1325,17 @@
}
}
-impl AddAssign<Vec4> for Vec4 {
+impl AddAssign for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.0 += rhs.0;
}
}
-impl AddAssign<&Vec4> for Vec4 {
+impl AddAssign<&Self> for Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1345,9 +1348,9 @@
}
impl Add<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec4 {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1378,7 +1381,7 @@
impl AddAssign<&f32> for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1414,7 +1417,7 @@
}
}
-impl Sub<Vec4> for Vec4 {
+impl Sub for Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1422,10 +1425,10 @@
}
}
-impl Sub<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Sub<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec4) -> Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1446,17 +1449,17 @@
}
}
-impl SubAssign<Vec4> for Vec4 {
+impl SubAssign for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.0 -= rhs.0;
}
}
-impl SubAssign<&Vec4> for Vec4 {
+impl SubAssign<&Self> for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1469,9 +1472,9 @@
}
impl Sub<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec4 {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1502,7 +1505,7 @@
impl SubAssign<&f32> for Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1538,7 +1541,7 @@
}
}
-impl Rem<Vec4> for Vec4 {
+impl Rem for Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1546,10 +1549,10 @@
}
}
-impl Rem<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Rem<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec4) -> Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1570,17 +1573,17 @@
}
}
-impl RemAssign<Vec4> for Vec4 {
+impl RemAssign for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.0 %= rhs.0;
}
}
-impl RemAssign<&Vec4> for Vec4 {
+impl RemAssign<&Self> for Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1593,9 +1596,9 @@
}
impl Rem<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec4 {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1626,7 +1629,7 @@
impl RemAssign<&f32> for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1666,7 +1669,7 @@
impl AsRef<[f32; 4]> for Vec4 {
#[inline]
fn as_ref(&self) -> &[f32; 4] {
- unsafe { &*(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { &*(self as *const Self as *const [f32; 4]) }
}
}
@@ -1674,7 +1677,7 @@
impl AsMut<[f32; 4]> for Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 4] {
- unsafe { &mut *(self as *mut Vec4 as *mut [f32; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 4]) }
}
}
@@ -1812,7 +1815,7 @@
impl From<Vec4> for (f32, f32, f32, f32) {
#[inline]
fn from(v: Vec4) -> Self {
- unsafe { *(v.0.to_array().as_ptr() as *const Self) }
+ (v.x, v.y, v.z, v.w)
}
}
diff --git a/crates/glam/src/f32/float.rs b/crates/glam/src/f32/float.rs
index 4e88218..275d01a 100644
--- a/crates/glam/src/f32/float.rs
+++ b/crates/glam/src/f32/float.rs
@@ -4,23 +4,23 @@
impl FloatExt for f32 {
#[inline]
- fn lerp(self, rhs: f32, t: f32) -> f32 {
+ fn lerp(self, rhs: Self, t: Self) -> Self {
self + (rhs - self) * t
}
#[inline]
- fn inverse_lerp(a: f32, b: f32, v: f32) -> f32 {
+ fn inverse_lerp(a: Self, b: Self, v: Self) -> Self {
(v - a) / (b - a)
}
#[inline]
- fn remap(self, in_start: f32, in_end: f32, out_start: f32, out_end: f32) -> f32 {
- let t = f32::inverse_lerp(in_start, in_end, self);
- f32::lerp(out_start, out_end, t)
+ fn remap(self, in_start: Self, in_end: Self, out_start: Self, out_end: Self) -> Self {
+ let t = Self::inverse_lerp(in_start, in_end, self);
+ Self::lerp(out_start, out_end, t)
}
#[inline]
- fn fract_gl(self) -> f32 {
+ fn fract_gl(self) -> Self {
self - crate::f32::math::floor(self)
}
}
diff --git a/crates/glam/src/f32/mat3.rs b/crates/glam/src/f32/mat3.rs
index c694858..7dc7d7b 100644
--- a/crates/glam/src/f32/mat3.rs
+++ b/crates/glam/src/f32/mat3.rs
@@ -42,6 +42,7 @@
/// vectors respectively. These methods assume that `Self` contains a valid affine
/// transform.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat3 {
pub x_axis: Vec3,
@@ -632,33 +633,21 @@
#[inline]
#[must_use]
pub fn mul_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- )
+ self.mul(rhs)
}
/// Adds two 3x3 matrices.
#[inline]
#[must_use]
pub fn add_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 3x3 matrices.
#[inline]
#[must_use]
pub fn sub_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 3x3 matrix by a scalar.
@@ -725,33 +714,103 @@
}
}
-impl Add<Mat3> for Mat3 {
+impl Add for Mat3 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat3(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ )
}
}
-impl AddAssign<Mat3> for Mat3 {
+impl Add<&Self> for Mat3 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat3> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn add(self, rhs: &Mat3) -> Mat3 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat3> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn add(self, rhs: Mat3) -> Mat3 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat3(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat3> for Mat3 {
+impl AddAssign<&Self> for Mat3 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat3 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat3(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ )
}
}
-impl SubAssign<Mat3> for Mat3 {
+impl Sub<&Self> for Mat3 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat3> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn sub(self, rhs: &Mat3) -> Mat3 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat3> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn sub(self, rhs: Mat3) -> Mat3 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat3 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat3(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat3 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -763,18 +822,61 @@
}
}
-impl Mul<Mat3> for Mat3 {
- type Output = Self;
+impl Neg for &Mat3 {
+ type Output = Mat3;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat3(&rhs)
+ fn neg(self) -> Mat3 {
+ (*self).neg()
}
}
-impl MulAssign<Mat3> for Mat3 {
+impl Mul for Mat3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: &Mat3) -> Mat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: Mat3) -> Mat3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat3(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat3 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -786,6 +888,30 @@
}
}
+impl Mul<&Vec3> for Mat3 {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Mat3 {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Mat3 {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat3> for f32 {
type Output = Mat3;
#[inline]
@@ -794,18 +920,73 @@
}
}
+impl Mul<&Mat3> for f32 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: &Mat3) -> Mat3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3> for &f32 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: &Mat3) -> Mat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3> for &f32 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: Mat3) -> Mat3 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat3 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat3 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat3 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat3 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -817,18 +998,73 @@
}
}
+impl Div<&Mat3> for f32 {
+ type Output = Mat3;
+ #[inline]
+ fn div(self, rhs: &Mat3) -> Mat3 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat3> for &f32 {
+ type Output = Mat3;
+ #[inline]
+ fn div(self, rhs: &Mat3) -> Mat3 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat3> for &f32 {
+ type Output = Mat3;
+ #[inline]
+ fn div(self, rhs: Mat3) -> Mat3 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat3 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat3 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat3 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat3 {
+ type Output = Mat3;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat3 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat3 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat3 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
@@ -840,6 +1076,30 @@
}
}
+impl Mul<&Vec3A> for Mat3 {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Mat3 {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Mat3 {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl From<Mat3A> for Mat3 {
#[inline]
fn from(m: Mat3A) -> Self {
diff --git a/crates/glam/src/f32/neon/mat2.rs b/crates/glam/src/f32/neon/mat2.rs
index ed3140c..c678493 100644
--- a/crates/glam/src/f32/neon/mat2.rs
+++ b/crates/glam/src/f32/neon/mat2.rs
@@ -26,6 +26,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Mat2(pub(crate) float32x4_t);
@@ -341,36 +342,21 @@
#[inline]
#[must_use]
pub fn mul_mat2(&self, rhs: &Self) -> Self {
- unsafe {
- let abcd = self.0;
- let xxyy0 = vzip1q_f32(rhs.0, rhs.0);
- let xxyy1 = vzip2q_f32(rhs.0, rhs.0);
- let axbxcydy0 = vmulq_f32(abcd, xxyy0);
- let axbxcydy1 = vmulq_f32(abcd, xxyy1);
- let cydyaxbx0 = vextq_f32(axbxcydy0, axbxcydy0, 2);
- let cydyaxbx1 = vextq_f32(axbxcydy1, axbxcydy1, 2);
- let result0 = vaddq_f32(axbxcydy0, cydyaxbx0);
- let result1 = vaddq_f32(axbxcydy1, cydyaxbx1);
- Self(vreinterpretq_f32_u64(vsetq_lane_u64(
- vgetq_lane_u64(vreinterpretq_u64_f32(result1), 0),
- vreinterpretq_u64_f32(result0),
- 1,
- )))
- }
+ self.mul(rhs)
}
/// Adds two 2x2 matrices.
#[inline]
#[must_use]
pub fn add_mat2(&self, rhs: &Self) -> Self {
- Self(unsafe { vaddq_f32(self.0, rhs.0) })
+ self.add(rhs)
}
/// Subtracts two 2x2 matrices.
#[inline]
#[must_use]
pub fn sub_mat2(&self, rhs: &Self) -> Self {
- Self(unsafe { vsubq_f32(self.0, rhs.0) })
+ self.sub(rhs)
}
/// Multiplies a 2x2 matrix by a scalar.
@@ -423,33 +409,95 @@
}
}
-impl Add<Mat2> for Mat2 {
+impl Add for Mat2 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat2(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self(unsafe { vaddq_f32(self.0, rhs.0) })
}
}
-impl AddAssign<Mat2> for Mat2 {
+impl Add<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: &Mat2) -> Mat2 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: Mat2) -> Mat2 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat2(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat2> for Mat2 {
+impl AddAssign<&Self> for Mat2 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat2 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat2(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self(unsafe { vsubq_f32(self.0, rhs.0) })
}
}
-impl SubAssign<Mat2> for Mat2 {
+impl Sub<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: &Mat2) -> Mat2 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: Mat2) -> Mat2 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat2 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat2(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat2 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -461,18 +509,72 @@
}
}
-impl Mul<Mat2> for Mat2 {
- type Output = Self;
+impl Neg for &Mat2 {
+ type Output = Mat2;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat2(&rhs)
+ fn neg(self) -> Mat2 {
+ (*self).neg()
}
}
-impl MulAssign<Mat2> for Mat2 {
+impl Mul for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ unsafe {
+ let abcd = self.0;
+ let xxyy0 = vzip1q_f32(rhs.0, rhs.0);
+ let xxyy1 = vzip2q_f32(rhs.0, rhs.0);
+ let axbxcydy0 = vmulq_f32(abcd, xxyy0);
+ let axbxcydy1 = vmulq_f32(abcd, xxyy1);
+ let cydyaxbx0 = vextq_f32(axbxcydy0, axbxcydy0, 2);
+ let cydyaxbx1 = vextq_f32(axbxcydy1, axbxcydy1, 2);
+ let result0 = vaddq_f32(axbxcydy0, cydyaxbx0);
+ let result1 = vaddq_f32(axbxcydy1, cydyaxbx1);
+ Self(vreinterpretq_f32_u64(vsetq_lane_u64(
+ vgetq_lane_u64(vreinterpretq_u64_f32(result1), 0),
+ vreinterpretq_u64_f32(result0),
+ 1,
+ )))
+ }
+ }
+}
+
+impl Mul<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat2(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -484,6 +586,30 @@
}
}
+impl Mul<&Vec2> for Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: Vec2) -> Vec2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat2> for f32 {
type Output = Mat2;
#[inline]
@@ -492,18 +618,73 @@
}
}
+impl Mul<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat2 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -515,18 +696,73 @@
}
}
+impl Div<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: Mat2) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat2 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat2 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat2 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/neon/mat3a.rs b/crates/glam/src/f32/neon/mat3a.rs
index 2c02c8f..260afc0 100644
--- a/crates/glam/src/f32/neon/mat3a.rs
+++ b/crates/glam/src/f32/neon/mat3a.rs
@@ -44,6 +44,7 @@
/// vectors respectively. These methods assume that `Self` contains a valid affine
/// transform.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat3A {
pub x_axis: Vec3A,
@@ -713,33 +714,21 @@
#[inline]
#[must_use]
pub fn mul_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- )
+ self.mul(rhs)
}
/// Adds two 3x3 matrices.
#[inline]
#[must_use]
pub fn add_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 3x3 matrices.
#[inline]
#[must_use]
pub fn sub_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 3x3 matrix by a scalar.
@@ -806,33 +795,103 @@
}
}
-impl Add<Mat3A> for Mat3A {
+impl Add for Mat3A {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat3(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ )
}
}
-impl AddAssign<Mat3A> for Mat3A {
+impl Add<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: &Mat3A) -> Mat3A {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: Mat3A) -> Mat3A {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat3(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat3A> for Mat3A {
+impl AddAssign<&Self> for Mat3A {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat3A {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat3(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ )
}
}
-impl SubAssign<Mat3A> for Mat3A {
+impl Sub<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: &Mat3A) -> Mat3A {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: Mat3A) -> Mat3A {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat3A {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat3(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat3A {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -844,18 +903,61 @@
}
}
-impl Mul<Mat3A> for Mat3A {
- type Output = Self;
+impl Neg for &Mat3A {
+ type Output = Mat3A;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat3(&rhs)
+ fn neg(self) -> Mat3A {
+ (*self).neg()
}
}
-impl MulAssign<Mat3A> for Mat3A {
+impl Mul for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat3(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -867,6 +969,30 @@
}
}
+impl Mul<&Vec3A> for Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat3A> for f32 {
type Output = Mat3A;
#[inline]
@@ -875,18 +1001,73 @@
}
}
+impl Mul<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat3A {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -898,18 +1079,73 @@
}
}
+impl Div<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: Mat3A) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat3A {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat3A {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat3A {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
@@ -921,6 +1157,30 @@
}
}
+impl Mul<&Vec3> for Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
impl From<Mat3> for Mat3A {
#[inline]
fn from(m: Mat3) -> Self {
diff --git a/crates/glam/src/f32/neon/mat4.rs b/crates/glam/src/f32/neon/mat4.rs
index b118a88..232e13e 100644
--- a/crates/glam/src/f32/neon/mat4.rs
+++ b/crates/glam/src/f32/neon/mat4.rs
@@ -50,6 +50,7 @@
/// The resulting perspective project can be use to transform 3D vectors as points with
/// perspective correction using the [`Self::project_point3()`] convenience method.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat4 {
pub x_axis: Vec4,
@@ -878,6 +879,103 @@
Self::look_to_rh(eye, center.sub(eye).normalize(), up)
}
+ /// Creates a right-handed perspective projection matrix with [-1,1] depth range.
+ ///
+ /// This is the same as the OpenGL `glFurstum` function.
+ ///
+ /// See <https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml>
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh_gl(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -(z_far + z_near) * inv_depth;
+ let d = -(2.0 * z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a left-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_lh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, 1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a right-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
/// Creates a right-handed perspective projection matrix with `[-1,1]` depth range.
///
/// Useful to map the standard right-handed coordinate system into what OpenGL expects.
@@ -1257,36 +1355,21 @@
#[inline]
#[must_use]
pub fn mul_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- self.mul(rhs.w_axis),
- )
+ self.mul(rhs)
}
/// Adds two 4x4 matrices.
#[inline]
#[must_use]
pub fn add_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- self.w_axis.add(rhs.w_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 4x4 matrices.
#[inline]
#[must_use]
pub fn sub_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- self.w_axis.sub(rhs.w_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 4x4 matrix by a scalar.
@@ -1362,33 +1445,105 @@
}
}
-impl Add<Mat4> for Mat4 {
+impl Add for Mat4 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat4(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ self.w_axis.add(rhs.w_axis),
+ )
}
}
-impl AddAssign<Mat4> for Mat4 {
+impl Add<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: &Mat4) -> Mat4 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: Mat4) -> Mat4 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat4(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat4> for Mat4 {
+impl AddAssign<&Self> for Mat4 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat4 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat4(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ self.w_axis.sub(rhs.w_axis),
+ )
}
}
-impl SubAssign<Mat4> for Mat4 {
+impl Sub<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: &Mat4) -> Mat4 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: Mat4) -> Mat4 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat4 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat4(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat4 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1405,18 +1560,62 @@
}
}
-impl Mul<Mat4> for Mat4 {
- type Output = Self;
+impl Neg for &Mat4 {
+ type Output = Mat4;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat4(&rhs)
+ fn neg(self) -> Mat4 {
+ (*self).neg()
}
}
-impl MulAssign<Mat4> for Mat4 {
+impl Mul for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ self.mul(rhs.w_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat4(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1428,6 +1627,30 @@
}
}
+impl Mul<&Vec4> for Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: Vec4) -> Vec4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat4> for f32 {
type Output = Mat4;
#[inline]
@@ -1436,18 +1659,73 @@
}
}
+impl Mul<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat4 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -1459,18 +1737,73 @@
}
}
+impl Div<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: Mat4) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat4 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat4 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat4 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/neon/quat.rs b/crates/glam/src/f32/neon/quat.rs
index 7a4d35d..a335fec 100644
--- a/crates/glam/src/f32/neon/quat.rs
+++ b/crates/glam/src/f32/neon/quat.rs
@@ -11,7 +11,9 @@
use core::fmt;
use core::iter::{Product, Sum};
-use core::ops::{Add, Deref, DerefMut, Div, Mul, MulAssign, Neg, Sub};
+use core::ops::{
+ Add, AddAssign, Deref, DerefMut, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign,
+};
#[repr(C)]
union UnionCast {
@@ -39,6 +41,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Quat(pub(crate) float32x4_t);
@@ -452,6 +455,7 @@
///
/// Will panic if `up` is not normalized when `glam_assert` is enabled.
#[inline]
+ #[must_use]
pub fn look_at_rh(eye: Vec3, center: Vec3, up: Vec3) -> Self {
Self::look_to_rh(center.sub(eye).normalize(), up)
}
@@ -888,7 +892,7 @@
}
}
-impl Add<Quat> for Quat {
+impl Add for Quat {
type Output = Self;
/// Adds two quaternions.
///
@@ -902,7 +906,45 @@
}
}
-impl Sub<Quat> for Quat {
+impl Add<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: &Quat) -> Quat {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: Quat) -> Quat {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: Self) {
+ *self = self.add(rhs);
+ }
+}
+
+impl AddAssign<&Self> for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Quat {
type Output = Self;
/// Subtracts the `rhs` quaternion from `self`.
///
@@ -913,6 +955,44 @@
}
}
+impl Sub<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: &Quat) -> Quat {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: Quat) -> Quat {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: Self) {
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
+ }
+}
+
impl Mul<f32> for Quat {
type Output = Self;
/// Multiplies a quaternion by a scalar value.
@@ -924,6 +1004,44 @@
}
}
+impl Mul<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: f32) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: f32) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
+ }
+}
+
impl Div<f32> for Quat {
type Output = Self;
/// Divides a quaternion by a scalar value.
@@ -934,7 +1052,45 @@
}
}
-impl Mul<Quat> for Quat {
+impl Div<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: &f32) -> Quat {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: f32) -> Quat {
+ (*self).div(rhs)
+ }
+}
+
+impl DivAssign<f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: f32) {
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
+ }
+}
+
+impl Mul for Quat {
type Output = Self;
/// Multiplies two quaternions. If they each represent a rotation, the result will
/// represent the combined rotation.
@@ -951,19 +1107,41 @@
}
}
-impl MulAssign<Quat> for Quat {
- /// Multiplies two quaternions. If they each represent a rotation, the result will
- /// represent the combined rotation.
- ///
- /// Note that due to floating point rounding the result may not be perfectly
- /// normalized.
- ///
- /// # Panics
- ///
- /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.
+impl Mul<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &Quat) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: Quat) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Quat {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_quat(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -980,6 +1158,62 @@
}
}
+impl Mul<&Vec3> for Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Self::Output {
+ self.mul_vec3a(rhs)
+ }
+}
+
+impl Mul<&Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Neg for Quat {
type Output = Self;
#[inline]
@@ -988,6 +1222,14 @@
}
}
+impl Neg for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn neg(self) -> Quat {
+ (*self).neg()
+ }
+}
+
impl Default for Quat {
#[inline]
fn default() -> Self {
@@ -1046,14 +1288,6 @@
}
}
-impl Mul<Vec3A> for Quat {
- type Output = Vec3A;
- #[inline]
- fn mul(self, rhs: Vec3A) -> Self::Output {
- self.mul_vec3a(rhs)
- }
-}
-
impl From<Quat> for Vec4 {
#[inline]
fn from(q: Quat) -> Self {
diff --git a/crates/glam/src/f32/neon/vec3a.rs b/crates/glam/src/f32/neon/vec3a.rs
index 131b3e5..fcfd7ed 100644
--- a/crates/glam/src/f32/neon/vec3a.rs
+++ b/crates/glam/src/f32/neon/vec3a.rs
@@ -31,6 +31,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Vec3A(pub(crate) float32x4_t);
@@ -137,7 +138,7 @@
#[inline]
#[must_use]
pub const fn to_array(&self) -> [f32; 3] {
- unsafe { *(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { *(self as *const Self as *const [f32; 3]) }
}
/// Creates a vector from the first 3 values in `slice`.
@@ -518,6 +519,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec3A {
BVec3A(unsafe { vcltq_f32(vabsq_f32(self.0), Self::INFINITY.0) })
}
@@ -1207,7 +1210,7 @@
}
}
-impl Div<Vec3A> for Vec3A {
+impl Div for Vec3A {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1215,10 +1218,10 @@
}
}
-impl Div<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Div<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec3A) -> Vec3A {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1239,17 +1242,17 @@
}
}
-impl DivAssign<Vec3A> for Vec3A {
+impl DivAssign for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.0 = unsafe { vdivq_f32(self.0, rhs.0) };
}
}
-impl DivAssign<&Vec3A> for Vec3A {
+impl DivAssign<&Self> for Vec3A {
#[inline]
- fn div_assign(&mut self, rhs: &Vec3A) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1262,9 +1265,9 @@
}
impl Div<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec3A {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1295,7 +1298,7 @@
impl DivAssign<&f32> for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1331,7 +1334,7 @@
}
}
-impl Mul<Vec3A> for Vec3A {
+impl Mul for Vec3A {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1339,10 +1342,10 @@
}
}
-impl Mul<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Mul<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec3A) -> Vec3A {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1363,17 +1366,17 @@
}
}
-impl MulAssign<Vec3A> for Vec3A {
+impl MulAssign for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.0 = unsafe { vmulq_f32(self.0, rhs.0) };
}
}
-impl MulAssign<&Vec3A> for Vec3A {
+impl MulAssign<&Self> for Vec3A {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec3A) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1386,9 +1389,9 @@
}
impl Mul<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec3A {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1419,7 +1422,7 @@
impl MulAssign<&f32> for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1455,7 +1458,7 @@
}
}
-impl Add<Vec3A> for Vec3A {
+impl Add for Vec3A {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1463,10 +1466,10 @@
}
}
-impl Add<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Add<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec3A) -> Vec3A {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1487,17 +1490,17 @@
}
}
-impl AddAssign<Vec3A> for Vec3A {
+impl AddAssign for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.0 = unsafe { vaddq_f32(self.0, rhs.0) };
}
}
-impl AddAssign<&Vec3A> for Vec3A {
+impl AddAssign<&Self> for Vec3A {
#[inline]
- fn add_assign(&mut self, rhs: &Vec3A) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1510,9 +1513,9 @@
}
impl Add<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec3A {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1543,7 +1546,7 @@
impl AddAssign<&f32> for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1579,7 +1582,7 @@
}
}
-impl Sub<Vec3A> for Vec3A {
+impl Sub for Vec3A {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1587,10 +1590,10 @@
}
}
-impl Sub<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Sub<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec3A) -> Vec3A {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1611,17 +1614,17 @@
}
}
-impl SubAssign<Vec3A> for Vec3A {
+impl SubAssign for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: Vec3A) {
+ fn sub_assign(&mut self, rhs: Self) {
self.0 = unsafe { vsubq_f32(self.0, rhs.0) };
}
}
-impl SubAssign<&Vec3A> for Vec3A {
+impl SubAssign<&Self> for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec3A) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1634,9 +1637,9 @@
}
impl Sub<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec3A {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1667,7 +1670,7 @@
impl SubAssign<&f32> for Vec3A {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1703,7 +1706,7 @@
}
}
-impl Rem<Vec3A> for Vec3A {
+impl Rem for Vec3A {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1714,10 +1717,10 @@
}
}
-impl Rem<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Rem<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec3A) -> Vec3A {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1738,17 +1741,17 @@
}
}
-impl RemAssign<Vec3A> for Vec3A {
+impl RemAssign for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
*self = self.rem(rhs);
}
}
-impl RemAssign<&Vec3A> for Vec3A {
+impl RemAssign<&Self> for Vec3A {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec3A) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1761,9 +1764,9 @@
}
impl Rem<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec3A {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1794,7 +1797,7 @@
impl RemAssign<&f32> for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1834,7 +1837,7 @@
impl AsRef<[f32; 3]> for Vec3A {
#[inline]
fn as_ref(&self) -> &[f32; 3] {
- unsafe { &*(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { &*(self as *const Self as *const [f32; 3]) }
}
}
@@ -1842,7 +1845,7 @@
impl AsMut<[f32; 3]> for Vec3A {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 3] {
- unsafe { &mut *(self as *mut Vec3A as *mut [f32; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 3]) }
}
}
@@ -1991,13 +1994,7 @@
impl From<Vec3A> for (f32, f32, f32) {
#[inline]
fn from(v: Vec3A) -> Self {
- use crate::align16::Align16;
- use core::mem::MaybeUninit;
- let mut out: MaybeUninit<Align16<Self>> = MaybeUninit::uninit();
- unsafe {
- vst1q_f32(out.as_mut_ptr().cast(), v.0);
- out.assume_init().0
- }
+ (v.x, v.y, v.z)
}
}
diff --git a/crates/glam/src/f32/neon/vec4.rs b/crates/glam/src/f32/neon/vec4.rs
index d5c9abf..be1116c 100644
--- a/crates/glam/src/f32/neon/vec4.rs
+++ b/crates/glam/src/f32/neon/vec4.rs
@@ -27,6 +27,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Vec4(pub(crate) float32x4_t);
@@ -139,7 +140,7 @@
#[inline]
#[must_use]
pub const fn to_array(&self) -> [f32; 4] {
- unsafe { *(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { *(self as *const Self as *const [f32; 4]) }
}
/// Creates a vector from the first 4 values in `slice`.
@@ -497,6 +498,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec4A {
BVec4A(unsafe { vcltq_f32(vabsq_f32(self.0), Self::INFINITY.0) })
}
@@ -1071,7 +1074,7 @@
}
}
-impl Div<Vec4> for Vec4 {
+impl Div for Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1079,10 +1082,10 @@
}
}
-impl Div<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Div<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec4) -> Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1103,17 +1106,17 @@
}
}
-impl DivAssign<Vec4> for Vec4 {
+impl DivAssign for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.0 = unsafe { vdivq_f32(self.0, rhs.0) };
}
}
-impl DivAssign<&Vec4> for Vec4 {
+impl DivAssign<&Self> for Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1126,9 +1129,9 @@
}
impl Div<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec4 {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1159,7 +1162,7 @@
impl DivAssign<&f32> for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1195,7 +1198,7 @@
}
}
-impl Mul<Vec4> for Vec4 {
+impl Mul for Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1203,10 +1206,10 @@
}
}
-impl Mul<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Mul<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec4) -> Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1227,17 +1230,17 @@
}
}
-impl MulAssign<Vec4> for Vec4 {
+impl MulAssign for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.0 = unsafe { vmulq_f32(self.0, rhs.0) };
}
}
-impl MulAssign<&Vec4> for Vec4 {
+impl MulAssign<&Self> for Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1250,9 +1253,9 @@
}
impl Mul<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec4 {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1283,7 +1286,7 @@
impl MulAssign<&f32> for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1319,7 +1322,7 @@
}
}
-impl Add<Vec4> for Vec4 {
+impl Add for Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1327,10 +1330,10 @@
}
}
-impl Add<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Add<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec4) -> Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1351,17 +1354,17 @@
}
}
-impl AddAssign<Vec4> for Vec4 {
+impl AddAssign for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.0 = unsafe { vaddq_f32(self.0, rhs.0) };
}
}
-impl AddAssign<&Vec4> for Vec4 {
+impl AddAssign<&Self> for Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1374,9 +1377,9 @@
}
impl Add<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec4 {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1407,7 +1410,7 @@
impl AddAssign<&f32> for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1443,7 +1446,7 @@
}
}
-impl Sub<Vec4> for Vec4 {
+impl Sub for Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1451,10 +1454,10 @@
}
}
-impl Sub<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Sub<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec4) -> Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1475,17 +1478,17 @@
}
}
-impl SubAssign<Vec4> for Vec4 {
+impl SubAssign for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.0 = unsafe { vsubq_f32(self.0, rhs.0) };
}
}
-impl SubAssign<&Vec4> for Vec4 {
+impl SubAssign<&Self> for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1498,9 +1501,9 @@
}
impl Sub<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec4 {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1531,7 +1534,7 @@
impl SubAssign<&f32> for Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1567,7 +1570,7 @@
}
}
-impl Rem<Vec4> for Vec4 {
+impl Rem for Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1578,10 +1581,10 @@
}
}
-impl Rem<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Rem<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec4) -> Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1602,17 +1605,17 @@
}
}
-impl RemAssign<Vec4> for Vec4 {
+impl RemAssign for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
*self = self.rem(rhs);
}
}
-impl RemAssign<&Vec4> for Vec4 {
+impl RemAssign<&Self> for Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1625,9 +1628,9 @@
}
impl Rem<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec4 {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1658,7 +1661,7 @@
impl RemAssign<&f32> for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1698,7 +1701,7 @@
impl AsRef<[f32; 4]> for Vec4 {
#[inline]
fn as_ref(&self) -> &[f32; 4] {
- unsafe { &*(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { &*(self as *const Self as *const [f32; 4]) }
}
}
@@ -1706,7 +1709,7 @@
impl AsMut<[f32; 4]> for Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 4] {
- unsafe { &mut *(self as *mut Vec4 as *mut [f32; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 4]) }
}
}
@@ -1862,13 +1865,7 @@
impl From<Vec4> for (f32, f32, f32, f32) {
#[inline]
fn from(v: Vec4) -> Self {
- use crate::align16::Align16;
- use core::mem::MaybeUninit;
- let mut out: MaybeUninit<Align16<Self>> = MaybeUninit::uninit();
- unsafe {
- vst1q_f32(out.as_mut_ptr().cast(), v.0);
- out.assume_init().0
- }
+ (v.x, v.y, v.z, v.w)
}
}
diff --git a/crates/glam/src/f32/scalar/mat2.rs b/crates/glam/src/f32/scalar/mat2.rs
index f650c69..b62fe83 100644
--- a/crates/glam/src/f32/scalar/mat2.rs
+++ b/crates/glam/src/f32/scalar/mat2.rs
@@ -14,6 +14,7 @@
/// A 2x2 column major matrix.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(
not(any(feature = "scalar-math", target_arch = "spirv")),
repr(align(16))
@@ -309,21 +310,21 @@
#[inline]
#[must_use]
pub fn mul_mat2(&self, rhs: &Self) -> Self {
- Self::from_cols(self.mul(rhs.x_axis), self.mul(rhs.y_axis))
+ self.mul(rhs)
}
/// Adds two 2x2 matrices.
#[inline]
#[must_use]
pub fn add_mat2(&self, rhs: &Self) -> Self {
- Self::from_cols(self.x_axis.add(rhs.x_axis), self.y_axis.add(rhs.y_axis))
+ self.add(rhs)
}
/// Subtracts two 2x2 matrices.
#[inline]
#[must_use]
pub fn sub_mat2(&self, rhs: &Self) -> Self {
- Self::from_cols(self.x_axis.sub(rhs.x_axis), self.y_axis.sub(rhs.y_axis))
+ self.sub(rhs)
}
/// Multiplies a 2x2 matrix by a scalar.
@@ -377,33 +378,95 @@
}
}
-impl Add<Mat2> for Mat2 {
+impl Add for Mat2 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat2(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(self.x_axis.add(rhs.x_axis), self.y_axis.add(rhs.y_axis))
}
}
-impl AddAssign<Mat2> for Mat2 {
+impl Add<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: &Mat2) -> Mat2 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: Mat2) -> Mat2 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat2(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat2> for Mat2 {
+impl AddAssign<&Self> for Mat2 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat2 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat2(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(self.x_axis.sub(rhs.x_axis), self.y_axis.sub(rhs.y_axis))
}
}
-impl SubAssign<Mat2> for Mat2 {
+impl Sub<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: &Mat2) -> Mat2 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: Mat2) -> Mat2 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat2 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat2(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat2 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -415,18 +478,57 @@
}
}
-impl Mul<Mat2> for Mat2 {
- type Output = Self;
+impl Neg for &Mat2 {
+ type Output = Mat2;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat2(&rhs)
+ fn neg(self) -> Mat2 {
+ (*self).neg()
}
}
-impl MulAssign<Mat2> for Mat2 {
+impl Mul for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(self.mul(rhs.x_axis), self.mul(rhs.y_axis))
+ }
+}
+
+impl Mul<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat2(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -438,6 +540,30 @@
}
}
+impl Mul<&Vec2> for Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: Vec2) -> Vec2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat2> for f32 {
type Output = Mat2;
#[inline]
@@ -446,18 +572,73 @@
}
}
+impl Mul<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat2 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -469,18 +650,73 @@
}
}
+impl Div<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: Mat2) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat2 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat2 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat2 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/scalar/mat3a.rs b/crates/glam/src/f32/scalar/mat3a.rs
index 3947a98..0eca6b7 100644
--- a/crates/glam/src/f32/scalar/mat3a.rs
+++ b/crates/glam/src/f32/scalar/mat3a.rs
@@ -42,6 +42,7 @@
/// vectors respectively. These methods assume that `Self` contains a valid affine
/// transform.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::AnyBitPattern))]
#[repr(C)]
pub struct Mat3A {
pub x_axis: Vec3A,
@@ -700,33 +701,21 @@
#[inline]
#[must_use]
pub fn mul_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- )
+ self.mul(rhs)
}
/// Adds two 3x3 matrices.
#[inline]
#[must_use]
pub fn add_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 3x3 matrices.
#[inline]
#[must_use]
pub fn sub_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 3x3 matrix by a scalar.
@@ -793,33 +782,103 @@
}
}
-impl Add<Mat3A> for Mat3A {
+impl Add for Mat3A {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat3(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ )
}
}
-impl AddAssign<Mat3A> for Mat3A {
+impl Add<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: &Mat3A) -> Mat3A {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: Mat3A) -> Mat3A {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat3(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat3A> for Mat3A {
+impl AddAssign<&Self> for Mat3A {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat3A {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat3(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ )
}
}
-impl SubAssign<Mat3A> for Mat3A {
+impl Sub<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: &Mat3A) -> Mat3A {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: Mat3A) -> Mat3A {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat3A {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat3(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat3A {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -831,18 +890,61 @@
}
}
-impl Mul<Mat3A> for Mat3A {
- type Output = Self;
+impl Neg for &Mat3A {
+ type Output = Mat3A;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat3(&rhs)
+ fn neg(self) -> Mat3A {
+ (*self).neg()
}
}
-impl MulAssign<Mat3A> for Mat3A {
+impl Mul for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat3(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -854,6 +956,30 @@
}
}
+impl Mul<&Vec3A> for Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat3A> for f32 {
type Output = Mat3A;
#[inline]
@@ -862,18 +988,73 @@
}
}
+impl Mul<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat3A {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -885,18 +1066,73 @@
}
}
+impl Div<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: Mat3A) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat3A {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat3A {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat3A {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
@@ -908,6 +1144,30 @@
}
}
+impl Mul<&Vec3> for Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
impl From<Mat3> for Mat3A {
#[inline]
fn from(m: Mat3) -> Self {
diff --git a/crates/glam/src/f32/scalar/mat4.rs b/crates/glam/src/f32/scalar/mat4.rs
index 39cdc97..4c23493 100644
--- a/crates/glam/src/f32/scalar/mat4.rs
+++ b/crates/glam/src/f32/scalar/mat4.rs
@@ -47,6 +47,7 @@
/// The resulting perspective project can be use to transform 3D vectors as points with
/// perspective correction using the [`Self::project_point3()`] convenience method.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(
any(
not(any(feature = "scalar-math", target_arch = "spirv")),
@@ -795,6 +796,103 @@
Self::look_to_rh(eye, center.sub(eye).normalize(), up)
}
+ /// Creates a right-handed perspective projection matrix with [-1,1] depth range.
+ ///
+ /// This is the same as the OpenGL `glFurstum` function.
+ ///
+ /// See <https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml>
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh_gl(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -(z_far + z_near) * inv_depth;
+ let d = -(2.0 * z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a left-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_lh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, 1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a right-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
/// Creates a right-handed perspective projection matrix with `[-1,1]` depth range.
///
/// Useful to map the standard right-handed coordinate system into what OpenGL expects.
@@ -1160,36 +1258,21 @@
#[inline]
#[must_use]
pub fn mul_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- self.mul(rhs.w_axis),
- )
+ self.mul(rhs)
}
/// Adds two 4x4 matrices.
#[inline]
#[must_use]
pub fn add_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- self.w_axis.add(rhs.w_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 4x4 matrices.
#[inline]
#[must_use]
pub fn sub_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- self.w_axis.sub(rhs.w_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 4x4 matrix by a scalar.
@@ -1265,33 +1348,105 @@
}
}
-impl Add<Mat4> for Mat4 {
+impl Add for Mat4 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat4(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ self.w_axis.add(rhs.w_axis),
+ )
}
}
-impl AddAssign<Mat4> for Mat4 {
+impl Add<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: &Mat4) -> Mat4 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: Mat4) -> Mat4 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat4(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat4> for Mat4 {
+impl AddAssign<&Self> for Mat4 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat4 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat4(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ self.w_axis.sub(rhs.w_axis),
+ )
}
}
-impl SubAssign<Mat4> for Mat4 {
+impl Sub<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: &Mat4) -> Mat4 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: Mat4) -> Mat4 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat4 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat4(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat4 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1308,18 +1463,62 @@
}
}
-impl Mul<Mat4> for Mat4 {
- type Output = Self;
+impl Neg for &Mat4 {
+ type Output = Mat4;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat4(&rhs)
+ fn neg(self) -> Mat4 {
+ (*self).neg()
}
}
-impl MulAssign<Mat4> for Mat4 {
+impl Mul for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ self.mul(rhs.w_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat4(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1331,6 +1530,30 @@
}
}
+impl Mul<&Vec4> for Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: Vec4) -> Vec4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat4> for f32 {
type Output = Mat4;
#[inline]
@@ -1339,18 +1562,73 @@
}
}
+impl Mul<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat4 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -1362,18 +1640,73 @@
}
}
+impl Div<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: Mat4) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat4 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat4 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat4 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/scalar/quat.rs b/crates/glam/src/f32/scalar/quat.rs
index 6f89e7f..6d2cf90 100644
--- a/crates/glam/src/f32/scalar/quat.rs
+++ b/crates/glam/src/f32/scalar/quat.rs
@@ -8,7 +8,7 @@
use core::fmt;
use core::iter::{Product, Sum};
-use core::ops::{Add, Div, Mul, MulAssign, Neg, Sub};
+use core::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign};
/// Creates a quaternion from `x`, `y`, `z` and `w` values.
///
@@ -26,6 +26,7 @@
/// floating point "error creep" which can occur when successive quaternion
/// operations are applied.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(
not(any(feature = "scalar-math", target_arch = "spirv")),
repr(align(16))
@@ -455,6 +456,7 @@
///
/// Will panic if `up` is not normalized when `glam_assert` is enabled.
#[inline]
+ #[must_use]
pub fn look_at_rh(eye: Vec3, center: Vec3, up: Vec3) -> Self {
Self::look_to_rh(center.sub(eye).normalize(), up)
}
@@ -848,7 +850,7 @@
}
}
-impl Add<Quat> for Quat {
+impl Add for Quat {
type Output = Self;
/// Adds two quaternions.
///
@@ -862,7 +864,45 @@
}
}
-impl Sub<Quat> for Quat {
+impl Add<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: &Quat) -> Quat {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: Quat) -> Quat {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: Self) {
+ *self = self.add(rhs);
+ }
+}
+
+impl AddAssign<&Self> for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Quat {
type Output = Self;
/// Subtracts the `rhs` quaternion from `self`.
///
@@ -873,6 +913,44 @@
}
}
+impl Sub<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: &Quat) -> Quat {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: Quat) -> Quat {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: Self) {
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
+ }
+}
+
impl Mul<f32> for Quat {
type Output = Self;
/// Multiplies a quaternion by a scalar value.
@@ -884,6 +962,44 @@
}
}
+impl Mul<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: f32) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: f32) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
+ }
+}
+
impl Div<f32> for Quat {
type Output = Self;
/// Divides a quaternion by a scalar value.
@@ -894,7 +1010,45 @@
}
}
-impl Mul<Quat> for Quat {
+impl Div<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: &f32) -> Quat {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: f32) -> Quat {
+ (*self).div(rhs)
+ }
+}
+
+impl DivAssign<f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: f32) {
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
+ }
+}
+
+impl Mul for Quat {
type Output = Self;
/// Multiplies two quaternions. If they each represent a rotation, the result will
/// represent the combined rotation.
@@ -911,19 +1065,41 @@
}
}
-impl MulAssign<Quat> for Quat {
- /// Multiplies two quaternions. If they each represent a rotation, the result will
- /// represent the combined rotation.
- ///
- /// Note that due to floating point rounding the result may not be perfectly
- /// normalized.
- ///
- /// # Panics
- ///
- /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.
+impl Mul<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &Quat) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: Quat) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Quat {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_quat(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -940,6 +1116,62 @@
}
}
+impl Mul<&Vec3> for Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Self::Output {
+ self.mul_vec3a(rhs)
+ }
+}
+
+impl Mul<&Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Neg for Quat {
type Output = Self;
#[inline]
@@ -948,6 +1180,14 @@
}
}
+impl Neg for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn neg(self) -> Quat {
+ (*self).neg()
+ }
+}
+
impl Default for Quat {
#[inline]
fn default() -> Self {
@@ -1006,14 +1246,6 @@
}
}
-impl Mul<Vec3A> for Quat {
- type Output = Vec3A;
- #[inline]
- fn mul(self, rhs: Vec3A) -> Self::Output {
- self.mul_vec3a(rhs)
- }
-}
-
impl From<Quat> for Vec4 {
#[inline]
fn from(q: Quat) -> Self {
diff --git a/crates/glam/src/f32/scalar/vec3a.rs b/crates/glam/src/f32/scalar/vec3a.rs
index cdc1880..58756f7 100644
--- a/crates/glam/src/f32/scalar/vec3a.rs
+++ b/crates/glam/src/f32/scalar/vec3a.rs
@@ -23,6 +23,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy, PartialEq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::AnyBitPattern))]
#[cfg_attr(not(target_arch = "spirv"), repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -499,6 +500,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec3A {
BVec3A::new(self.x.is_finite(), self.y.is_finite(), self.z.is_finite())
}
@@ -1205,7 +1208,7 @@
}
}
-impl Div<Vec3A> for Vec3A {
+impl Div for Vec3A {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1217,10 +1220,10 @@
}
}
-impl Div<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Div<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec3A) -> Vec3A {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1241,7 +1244,7 @@
}
}
-impl DivAssign<Vec3A> for Vec3A {
+impl DivAssign for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1250,10 +1253,10 @@
}
}
-impl DivAssign<&Vec3A> for Vec3A {
+impl DivAssign<&Self> for Vec3A {
#[inline]
- fn div_assign(&mut self, rhs: &Vec3A) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1270,9 +1273,9 @@
}
impl Div<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec3A {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1305,7 +1308,7 @@
impl DivAssign<&f32> for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1345,7 +1348,7 @@
}
}
-impl Mul<Vec3A> for Vec3A {
+impl Mul for Vec3A {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1357,10 +1360,10 @@
}
}
-impl Mul<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Mul<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec3A) -> Vec3A {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1381,7 +1384,7 @@
}
}
-impl MulAssign<Vec3A> for Vec3A {
+impl MulAssign for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1390,10 +1393,10 @@
}
}
-impl MulAssign<&Vec3A> for Vec3A {
+impl MulAssign<&Self> for Vec3A {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec3A) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1410,9 +1413,9 @@
}
impl Mul<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec3A {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1445,7 +1448,7 @@
impl MulAssign<&f32> for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1485,7 +1488,7 @@
}
}
-impl Add<Vec3A> for Vec3A {
+impl Add for Vec3A {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1497,10 +1500,10 @@
}
}
-impl Add<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Add<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec3A) -> Vec3A {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1521,7 +1524,7 @@
}
}
-impl AddAssign<Vec3A> for Vec3A {
+impl AddAssign for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1530,10 +1533,10 @@
}
}
-impl AddAssign<&Vec3A> for Vec3A {
+impl AddAssign<&Self> for Vec3A {
#[inline]
- fn add_assign(&mut self, rhs: &Vec3A) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1550,9 +1553,9 @@
}
impl Add<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec3A {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1585,7 +1588,7 @@
impl AddAssign<&f32> for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1625,7 +1628,7 @@
}
}
-impl Sub<Vec3A> for Vec3A {
+impl Sub for Vec3A {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1637,10 +1640,10 @@
}
}
-impl Sub<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Sub<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec3A) -> Vec3A {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1661,19 +1664,19 @@
}
}
-impl SubAssign<Vec3A> for Vec3A {
+impl SubAssign for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: Vec3A) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&Vec3A> for Vec3A {
+impl SubAssign<&Self> for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec3A) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1690,9 +1693,9 @@
}
impl Sub<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec3A {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1725,7 +1728,7 @@
impl SubAssign<&f32> for Vec3A {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1765,7 +1768,7 @@
}
}
-impl Rem<Vec3A> for Vec3A {
+impl Rem for Vec3A {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1777,10 +1780,10 @@
}
}
-impl Rem<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Rem<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec3A) -> Vec3A {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1801,7 +1804,7 @@
}
}
-impl RemAssign<Vec3A> for Vec3A {
+impl RemAssign for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1810,10 +1813,10 @@
}
}
-impl RemAssign<&Vec3A> for Vec3A {
+impl RemAssign<&Self> for Vec3A {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec3A) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1830,9 +1833,9 @@
}
impl Rem<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec3A {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1865,7 +1868,7 @@
impl RemAssign<&f32> for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1909,7 +1912,7 @@
impl AsRef<[f32; 3]> for Vec3A {
#[inline]
fn as_ref(&self) -> &[f32; 3] {
- unsafe { &*(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { &*(self as *const Self as *const [f32; 3]) }
}
}
@@ -1917,7 +1920,7 @@
impl AsMut<[f32; 3]> for Vec3A {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 3] {
- unsafe { &mut *(self as *mut Vec3A as *mut [f32; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 3]) }
}
}
diff --git a/crates/glam/src/f32/scalar/vec4.rs b/crates/glam/src/f32/scalar/vec4.rs
index 03a60c7..ddae5a0 100644
--- a/crates/glam/src/f32/scalar/vec4.rs
+++ b/crates/glam/src/f32/scalar/vec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[derive(Clone, Copy, PartialEq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(
any(
not(any(feature = "scalar-math", target_arch = "spirv")),
@@ -541,6 +542,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec4A {
BVec4A::new(
self.x.is_finite(),
@@ -1148,7 +1151,7 @@
}
}
-impl Div<Vec4> for Vec4 {
+impl Div for Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1161,10 +1164,10 @@
}
}
-impl Div<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Div<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec4) -> Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1185,7 +1188,7 @@
}
}
-impl DivAssign<Vec4> for Vec4 {
+impl DivAssign for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1195,10 +1198,10 @@
}
}
-impl DivAssign<&Vec4> for Vec4 {
+impl DivAssign<&Self> for Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1216,9 +1219,9 @@
}
impl Div<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec4 {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1252,7 +1255,7 @@
impl DivAssign<&f32> for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1293,7 +1296,7 @@
}
}
-impl Mul<Vec4> for Vec4 {
+impl Mul for Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1306,10 +1309,10 @@
}
}
-impl Mul<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Mul<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec4) -> Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1330,7 +1333,7 @@
}
}
-impl MulAssign<Vec4> for Vec4 {
+impl MulAssign for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1340,10 +1343,10 @@
}
}
-impl MulAssign<&Vec4> for Vec4 {
+impl MulAssign<&Self> for Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1361,9 +1364,9 @@
}
impl Mul<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec4 {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1397,7 +1400,7 @@
impl MulAssign<&f32> for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1438,7 +1441,7 @@
}
}
-impl Add<Vec4> for Vec4 {
+impl Add for Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1451,10 +1454,10 @@
}
}
-impl Add<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Add<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec4) -> Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1475,7 +1478,7 @@
}
}
-impl AddAssign<Vec4> for Vec4 {
+impl AddAssign for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1485,10 +1488,10 @@
}
}
-impl AddAssign<&Vec4> for Vec4 {
+impl AddAssign<&Self> for Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1506,9 +1509,9 @@
}
impl Add<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec4 {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1542,7 +1545,7 @@
impl AddAssign<&f32> for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1583,7 +1586,7 @@
}
}
-impl Sub<Vec4> for Vec4 {
+impl Sub for Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1596,10 +1599,10 @@
}
}
-impl Sub<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Sub<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec4) -> Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1620,9 +1623,9 @@
}
}
-impl SubAssign<Vec4> for Vec4 {
+impl SubAssign for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1630,10 +1633,10 @@
}
}
-impl SubAssign<&Vec4> for Vec4 {
+impl SubAssign<&Self> for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1651,9 +1654,9 @@
}
impl Sub<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec4 {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1687,7 +1690,7 @@
impl SubAssign<&f32> for Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1728,7 +1731,7 @@
}
}
-impl Rem<Vec4> for Vec4 {
+impl Rem for Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1741,10 +1744,10 @@
}
}
-impl Rem<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Rem<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec4) -> Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1765,7 +1768,7 @@
}
}
-impl RemAssign<Vec4> for Vec4 {
+impl RemAssign for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1775,10 +1778,10 @@
}
}
-impl RemAssign<&Vec4> for Vec4 {
+impl RemAssign<&Self> for Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1796,9 +1799,9 @@
}
impl Rem<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec4 {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1832,7 +1835,7 @@
impl RemAssign<&f32> for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1877,7 +1880,7 @@
impl AsRef<[f32; 4]> for Vec4 {
#[inline]
fn as_ref(&self) -> &[f32; 4] {
- unsafe { &*(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { &*(self as *const Self as *const [f32; 4]) }
}
}
@@ -1885,7 +1888,7 @@
impl AsMut<[f32; 4]> for Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 4] {
- unsafe { &mut *(self as *mut Vec4 as *mut [f32; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 4]) }
}
}
diff --git a/crates/glam/src/f32/sse2/mat2.rs b/crates/glam/src/f32/sse2/mat2.rs
index 64e098a..a646fa7 100644
--- a/crates/glam/src/f32/sse2/mat2.rs
+++ b/crates/glam/src/f32/sse2/mat2.rs
@@ -29,6 +29,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Mat2(pub(crate) __m128);
@@ -334,33 +335,21 @@
#[inline]
#[must_use]
pub fn mul_mat2(&self, rhs: &Self) -> Self {
- unsafe {
- let abcd = self.0;
- let rhs = rhs.0;
- let xxyy0 = _mm_shuffle_ps(rhs, rhs, 0b01_01_00_00);
- let xxyy1 = _mm_shuffle_ps(rhs, rhs, 0b11_11_10_10);
- let axbxcydy0 = _mm_mul_ps(abcd, xxyy0);
- let axbxcydy1 = _mm_mul_ps(abcd, xxyy1);
- let cydyaxbx0 = _mm_shuffle_ps(axbxcydy0, axbxcydy0, 0b01_00_11_10);
- let cydyaxbx1 = _mm_shuffle_ps(axbxcydy1, axbxcydy1, 0b01_00_11_10);
- let result0 = _mm_add_ps(axbxcydy0, cydyaxbx0);
- let result1 = _mm_add_ps(axbxcydy1, cydyaxbx1);
- Self(_mm_shuffle_ps(result0, result1, 0b01_00_01_00))
- }
+ self.mul(rhs)
}
/// Adds two 2x2 matrices.
#[inline]
#[must_use]
pub fn add_mat2(&self, rhs: &Self) -> Self {
- Self(unsafe { _mm_add_ps(self.0, rhs.0) })
+ self.add(rhs)
}
/// Subtracts two 2x2 matrices.
#[inline]
#[must_use]
pub fn sub_mat2(&self, rhs: &Self) -> Self {
- Self(unsafe { _mm_sub_ps(self.0, rhs.0) })
+ self.sub(rhs)
}
/// Multiplies a 2x2 matrix by a scalar.
@@ -413,33 +402,95 @@
}
}
-impl Add<Mat2> for Mat2 {
+impl Add for Mat2 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat2(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self(unsafe { _mm_add_ps(self.0, rhs.0) })
}
}
-impl AddAssign<Mat2> for Mat2 {
+impl Add<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: &Mat2) -> Mat2 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: Mat2) -> Mat2 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat2(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat2> for Mat2 {
+impl AddAssign<&Self> for Mat2 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat2 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat2(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self(unsafe { _mm_sub_ps(self.0, rhs.0) })
}
}
-impl SubAssign<Mat2> for Mat2 {
+impl Sub<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: &Mat2) -> Mat2 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: Mat2) -> Mat2 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat2 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat2(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat2 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -451,18 +502,69 @@
}
}
-impl Mul<Mat2> for Mat2 {
- type Output = Self;
+impl Neg for &Mat2 {
+ type Output = Mat2;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat2(&rhs)
+ fn neg(self) -> Mat2 {
+ (*self).neg()
}
}
-impl MulAssign<Mat2> for Mat2 {
+impl Mul for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ unsafe {
+ let abcd = self.0;
+ let rhs = rhs.0;
+ let xxyy0 = _mm_shuffle_ps(rhs, rhs, 0b01_01_00_00);
+ let xxyy1 = _mm_shuffle_ps(rhs, rhs, 0b11_11_10_10);
+ let axbxcydy0 = _mm_mul_ps(abcd, xxyy0);
+ let axbxcydy1 = _mm_mul_ps(abcd, xxyy1);
+ let cydyaxbx0 = _mm_shuffle_ps(axbxcydy0, axbxcydy0, 0b01_00_11_10);
+ let cydyaxbx1 = _mm_shuffle_ps(axbxcydy1, axbxcydy1, 0b01_00_11_10);
+ let result0 = _mm_add_ps(axbxcydy0, cydyaxbx0);
+ let result1 = _mm_add_ps(axbxcydy1, cydyaxbx1);
+ Self(_mm_shuffle_ps(result0, result1, 0b01_00_01_00))
+ }
+ }
+}
+
+impl Mul<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat2(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -474,6 +576,30 @@
}
}
+impl Mul<&Vec2> for Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: Vec2) -> Vec2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat2> for f32 {
type Output = Mat2;
#[inline]
@@ -482,18 +608,73 @@
}
}
+impl Mul<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat2 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -505,18 +686,73 @@
}
}
+impl Div<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: Mat2) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat2 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat2 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat2 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/sse2/mat3a.rs b/crates/glam/src/f32/sse2/mat3a.rs
index 539ba8d..1b37a42 100644
--- a/crates/glam/src/f32/sse2/mat3a.rs
+++ b/crates/glam/src/f32/sse2/mat3a.rs
@@ -47,6 +47,7 @@
/// vectors respectively. These methods assume that `Self` contains a valid affine
/// transform.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat3A {
pub x_axis: Vec3A,
@@ -707,33 +708,21 @@
#[inline]
#[must_use]
pub fn mul_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- )
+ self.mul(rhs)
}
/// Adds two 3x3 matrices.
#[inline]
#[must_use]
pub fn add_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 3x3 matrices.
#[inline]
#[must_use]
pub fn sub_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 3x3 matrix by a scalar.
@@ -800,33 +789,103 @@
}
}
-impl Add<Mat3A> for Mat3A {
+impl Add for Mat3A {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat3(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ )
}
}
-impl AddAssign<Mat3A> for Mat3A {
+impl Add<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: &Mat3A) -> Mat3A {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: Mat3A) -> Mat3A {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat3(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat3A> for Mat3A {
+impl AddAssign<&Self> for Mat3A {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat3A {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat3(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ )
}
}
-impl SubAssign<Mat3A> for Mat3A {
+impl Sub<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: &Mat3A) -> Mat3A {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: Mat3A) -> Mat3A {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat3A {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat3(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat3A {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -838,18 +897,61 @@
}
}
-impl Mul<Mat3A> for Mat3A {
- type Output = Self;
+impl Neg for &Mat3A {
+ type Output = Mat3A;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat3(&rhs)
+ fn neg(self) -> Mat3A {
+ (*self).neg()
}
}
-impl MulAssign<Mat3A> for Mat3A {
+impl Mul for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat3(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -861,6 +963,30 @@
}
}
+impl Mul<&Vec3A> for Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat3A> for f32 {
type Output = Mat3A;
#[inline]
@@ -869,18 +995,73 @@
}
}
+impl Mul<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat3A {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -892,18 +1073,73 @@
}
}
+impl Div<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: Mat3A) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat3A {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat3A {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat3A {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
@@ -915,6 +1151,30 @@
}
}
+impl Mul<&Vec3> for Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
impl From<Mat3> for Mat3A {
#[inline]
fn from(m: Mat3) -> Self {
diff --git a/crates/glam/src/f32/sse2/mat4.rs b/crates/glam/src/f32/sse2/mat4.rs
index b5884ff..3471a3d 100644
--- a/crates/glam/src/f32/sse2/mat4.rs
+++ b/crates/glam/src/f32/sse2/mat4.rs
@@ -53,6 +53,7 @@
/// The resulting perspective project can be use to transform 3D vectors as points with
/// perspective correction using the [`Self::project_point3()`] convenience method.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat4 {
pub x_axis: Vec4,
@@ -882,6 +883,103 @@
Self::look_to_rh(eye, center.sub(eye).normalize(), up)
}
+ /// Creates a right-handed perspective projection matrix with [-1,1] depth range.
+ ///
+ /// This is the same as the OpenGL `glFurstum` function.
+ ///
+ /// See <https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml>
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh_gl(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -(z_far + z_near) * inv_depth;
+ let d = -(2.0 * z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a left-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_lh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, 1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a right-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
/// Creates a right-handed perspective projection matrix with `[-1,1]` depth range.
///
/// Useful to map the standard right-handed coordinate system into what OpenGL expects.
@@ -1261,36 +1359,21 @@
#[inline]
#[must_use]
pub fn mul_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- self.mul(rhs.w_axis),
- )
+ self.mul(rhs)
}
/// Adds two 4x4 matrices.
#[inline]
#[must_use]
pub fn add_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- self.w_axis.add(rhs.w_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 4x4 matrices.
#[inline]
#[must_use]
pub fn sub_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- self.w_axis.sub(rhs.w_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 4x4 matrix by a scalar.
@@ -1366,33 +1449,105 @@
}
}
-impl Add<Mat4> for Mat4 {
+impl Add for Mat4 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat4(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ self.w_axis.add(rhs.w_axis),
+ )
}
}
-impl AddAssign<Mat4> for Mat4 {
+impl Add<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: &Mat4) -> Mat4 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: Mat4) -> Mat4 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat4(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat4> for Mat4 {
+impl AddAssign<&Self> for Mat4 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat4 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat4(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ self.w_axis.sub(rhs.w_axis),
+ )
}
}
-impl SubAssign<Mat4> for Mat4 {
+impl Sub<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: &Mat4) -> Mat4 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: Mat4) -> Mat4 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat4 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat4(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat4 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1409,18 +1564,62 @@
}
}
-impl Mul<Mat4> for Mat4 {
- type Output = Self;
+impl Neg for &Mat4 {
+ type Output = Mat4;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat4(&rhs)
+ fn neg(self) -> Mat4 {
+ (*self).neg()
}
}
-impl MulAssign<Mat4> for Mat4 {
+impl Mul for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ self.mul(rhs.w_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat4(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1432,6 +1631,30 @@
}
}
+impl Mul<&Vec4> for Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: Vec4) -> Vec4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat4> for f32 {
type Output = Mat4;
#[inline]
@@ -1440,18 +1663,73 @@
}
}
+impl Mul<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat4 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -1463,18 +1741,73 @@
}
}
+impl Div<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: Mat4) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat4 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat4 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat4 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/sse2/quat.rs b/crates/glam/src/f32/sse2/quat.rs
index a4fd0b4..920b5b2 100644
--- a/crates/glam/src/f32/sse2/quat.rs
+++ b/crates/glam/src/f32/sse2/quat.rs
@@ -14,7 +14,9 @@
use core::fmt;
use core::iter::{Product, Sum};
-use core::ops::{Add, Deref, DerefMut, Div, Mul, MulAssign, Neg, Sub};
+use core::ops::{
+ Add, AddAssign, Deref, DerefMut, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign,
+};
#[repr(C)]
union UnionCast {
@@ -42,6 +44,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Quat(pub(crate) __m128);
@@ -455,6 +458,7 @@
///
/// Will panic if `up` is not normalized when `glam_assert` is enabled.
#[inline]
+ #[must_use]
pub fn look_at_rh(eye: Vec3, center: Vec3, up: Vec3) -> Self {
Self::look_to_rh(center.sub(eye).normalize(), up)
}
@@ -896,7 +900,7 @@
}
}
-impl Add<Quat> for Quat {
+impl Add for Quat {
type Output = Self;
/// Adds two quaternions.
///
@@ -910,7 +914,45 @@
}
}
-impl Sub<Quat> for Quat {
+impl Add<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: &Quat) -> Quat {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: Quat) -> Quat {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: Self) {
+ *self = self.add(rhs);
+ }
+}
+
+impl AddAssign<&Self> for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Quat {
type Output = Self;
/// Subtracts the `rhs` quaternion from `self`.
///
@@ -921,6 +963,44 @@
}
}
+impl Sub<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: &Quat) -> Quat {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: Quat) -> Quat {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: Self) {
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
+ }
+}
+
impl Mul<f32> for Quat {
type Output = Self;
/// Multiplies a quaternion by a scalar value.
@@ -932,6 +1012,44 @@
}
}
+impl Mul<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: f32) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: f32) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
+ }
+}
+
impl Div<f32> for Quat {
type Output = Self;
/// Divides a quaternion by a scalar value.
@@ -942,7 +1060,45 @@
}
}
-impl Mul<Quat> for Quat {
+impl Div<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: &f32) -> Quat {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: f32) -> Quat {
+ (*self).div(rhs)
+ }
+}
+
+impl DivAssign<f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: f32) {
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
+ }
+}
+
+impl Mul for Quat {
type Output = Self;
/// Multiplies two quaternions. If they each represent a rotation, the result will
/// represent the combined rotation.
@@ -959,19 +1115,41 @@
}
}
-impl MulAssign<Quat> for Quat {
- /// Multiplies two quaternions. If they each represent a rotation, the result will
- /// represent the combined rotation.
- ///
- /// Note that due to floating point rounding the result may not be perfectly
- /// normalized.
- ///
- /// # Panics
- ///
- /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.
+impl Mul<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &Quat) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: Quat) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Quat {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_quat(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -988,6 +1166,62 @@
}
}
+impl Mul<&Vec3> for Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Self::Output {
+ self.mul_vec3a(rhs)
+ }
+}
+
+impl Mul<&Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Neg for Quat {
type Output = Self;
#[inline]
@@ -996,6 +1230,14 @@
}
}
+impl Neg for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn neg(self) -> Quat {
+ (*self).neg()
+ }
+}
+
impl Default for Quat {
#[inline]
fn default() -> Self {
@@ -1054,14 +1296,6 @@
}
}
-impl Mul<Vec3A> for Quat {
- type Output = Vec3A;
- #[inline]
- fn mul(self, rhs: Vec3A) -> Self::Output {
- self.mul_vec3a(rhs)
- }
-}
-
impl From<Quat> for Vec4 {
#[inline]
fn from(q: Quat) -> Self {
diff --git a/crates/glam/src/f32/sse2/vec3a.rs b/crates/glam/src/f32/sse2/vec3a.rs
index 9e6c489..a7739b3 100644
--- a/crates/glam/src/f32/sse2/vec3a.rs
+++ b/crates/glam/src/f32/sse2/vec3a.rs
@@ -34,6 +34,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Vec3A(pub(crate) __m128);
@@ -145,7 +146,7 @@
#[inline]
#[must_use]
pub const fn to_array(&self) -> [f32; 3] {
- unsafe { *(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { *(self as *const Self as *const [f32; 3]) }
}
/// Creates a vector from the first 3 values in `slice`.
@@ -508,6 +509,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec3A {
BVec3A(unsafe { _mm_cmplt_ps(crate::sse2::m128_abs(self.0), Self::INFINITY.0) })
}
@@ -1215,7 +1218,7 @@
}
}
-impl Div<Vec3A> for Vec3A {
+impl Div for Vec3A {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1223,10 +1226,10 @@
}
}
-impl Div<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Div<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec3A) -> Vec3A {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1247,17 +1250,17 @@
}
}
-impl DivAssign<Vec3A> for Vec3A {
+impl DivAssign for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.0 = unsafe { _mm_div_ps(self.0, rhs.0) };
}
}
-impl DivAssign<&Vec3A> for Vec3A {
+impl DivAssign<&Self> for Vec3A {
#[inline]
- fn div_assign(&mut self, rhs: &Vec3A) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1270,9 +1273,9 @@
}
impl Div<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec3A {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1303,7 +1306,7 @@
impl DivAssign<&f32> for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1339,7 +1342,7 @@
}
}
-impl Mul<Vec3A> for Vec3A {
+impl Mul for Vec3A {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1347,10 +1350,10 @@
}
}
-impl Mul<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Mul<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec3A) -> Vec3A {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1371,17 +1374,17 @@
}
}
-impl MulAssign<Vec3A> for Vec3A {
+impl MulAssign for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.0 = unsafe { _mm_mul_ps(self.0, rhs.0) };
}
}
-impl MulAssign<&Vec3A> for Vec3A {
+impl MulAssign<&Self> for Vec3A {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec3A) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1394,9 +1397,9 @@
}
impl Mul<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec3A {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1427,7 +1430,7 @@
impl MulAssign<&f32> for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1463,7 +1466,7 @@
}
}
-impl Add<Vec3A> for Vec3A {
+impl Add for Vec3A {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1471,10 +1474,10 @@
}
}
-impl Add<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Add<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec3A) -> Vec3A {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1495,17 +1498,17 @@
}
}
-impl AddAssign<Vec3A> for Vec3A {
+impl AddAssign for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.0 = unsafe { _mm_add_ps(self.0, rhs.0) };
}
}
-impl AddAssign<&Vec3A> for Vec3A {
+impl AddAssign<&Self> for Vec3A {
#[inline]
- fn add_assign(&mut self, rhs: &Vec3A) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1518,9 +1521,9 @@
}
impl Add<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec3A {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1551,7 +1554,7 @@
impl AddAssign<&f32> for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1587,7 +1590,7 @@
}
}
-impl Sub<Vec3A> for Vec3A {
+impl Sub for Vec3A {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1595,10 +1598,10 @@
}
}
-impl Sub<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Sub<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec3A) -> Vec3A {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1619,17 +1622,17 @@
}
}
-impl SubAssign<Vec3A> for Vec3A {
+impl SubAssign for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: Vec3A) {
+ fn sub_assign(&mut self, rhs: Self) {
self.0 = unsafe { _mm_sub_ps(self.0, rhs.0) };
}
}
-impl SubAssign<&Vec3A> for Vec3A {
+impl SubAssign<&Self> for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec3A) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1642,9 +1645,9 @@
}
impl Sub<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec3A {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1675,7 +1678,7 @@
impl SubAssign<&f32> for Vec3A {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1711,7 +1714,7 @@
}
}
-impl Rem<Vec3A> for Vec3A {
+impl Rem for Vec3A {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1722,10 +1725,10 @@
}
}
-impl Rem<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Rem<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec3A) -> Vec3A {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1746,17 +1749,17 @@
}
}
-impl RemAssign<Vec3A> for Vec3A {
+impl RemAssign for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
*self = self.rem(rhs);
}
}
-impl RemAssign<&Vec3A> for Vec3A {
+impl RemAssign<&Self> for Vec3A {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec3A) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1769,9 +1772,9 @@
}
impl Rem<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec3A {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1802,7 +1805,7 @@
impl RemAssign<&f32> for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1842,7 +1845,7 @@
impl AsRef<[f32; 3]> for Vec3A {
#[inline]
fn as_ref(&self) -> &[f32; 3] {
- unsafe { &*(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { &*(self as *const Self as *const [f32; 3]) }
}
}
@@ -1850,7 +1853,7 @@
impl AsMut<[f32; 3]> for Vec3A {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 3] {
- unsafe { &mut *(self as *mut Vec3A as *mut [f32; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 3]) }
}
}
@@ -1999,13 +2002,7 @@
impl From<Vec3A> for (f32, f32, f32) {
#[inline]
fn from(v: Vec3A) -> Self {
- use crate::Align16;
- use core::mem::MaybeUninit;
- let mut out: MaybeUninit<Align16<Self>> = MaybeUninit::uninit();
- unsafe {
- _mm_store_ps(out.as_mut_ptr().cast(), v.0);
- out.assume_init().0
- }
+ (v.x, v.y, v.z)
}
}
diff --git a/crates/glam/src/f32/sse2/vec4.rs b/crates/glam/src/f32/sse2/vec4.rs
index 66c6aa0..40e4489 100644
--- a/crates/glam/src/f32/sse2/vec4.rs
+++ b/crates/glam/src/f32/sse2/vec4.rs
@@ -30,6 +30,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Vec4(pub(crate) __m128);
@@ -147,7 +148,7 @@
#[inline]
#[must_use]
pub const fn to_array(&self) -> [f32; 4] {
- unsafe { *(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { *(self as *const Self as *const [f32; 4]) }
}
/// Creates a vector from the first 4 values in `slice`.
@@ -496,6 +497,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec4A {
BVec4A(unsafe { _mm_cmplt_ps(crate::sse2::m128_abs(self.0), Self::INFINITY.0) })
}
@@ -1089,7 +1092,7 @@
}
}
-impl Div<Vec4> for Vec4 {
+impl Div for Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1097,10 +1100,10 @@
}
}
-impl Div<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Div<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec4) -> Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1121,17 +1124,17 @@
}
}
-impl DivAssign<Vec4> for Vec4 {
+impl DivAssign for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.0 = unsafe { _mm_div_ps(self.0, rhs.0) };
}
}
-impl DivAssign<&Vec4> for Vec4 {
+impl DivAssign<&Self> for Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1144,9 +1147,9 @@
}
impl Div<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec4 {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1177,7 +1180,7 @@
impl DivAssign<&f32> for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1213,7 +1216,7 @@
}
}
-impl Mul<Vec4> for Vec4 {
+impl Mul for Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1221,10 +1224,10 @@
}
}
-impl Mul<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Mul<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec4) -> Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1245,17 +1248,17 @@
}
}
-impl MulAssign<Vec4> for Vec4 {
+impl MulAssign for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.0 = unsafe { _mm_mul_ps(self.0, rhs.0) };
}
}
-impl MulAssign<&Vec4> for Vec4 {
+impl MulAssign<&Self> for Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1268,9 +1271,9 @@
}
impl Mul<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec4 {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1301,7 +1304,7 @@
impl MulAssign<&f32> for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1337,7 +1340,7 @@
}
}
-impl Add<Vec4> for Vec4 {
+impl Add for Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1345,10 +1348,10 @@
}
}
-impl Add<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Add<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec4) -> Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1369,17 +1372,17 @@
}
}
-impl AddAssign<Vec4> for Vec4 {
+impl AddAssign for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.0 = unsafe { _mm_add_ps(self.0, rhs.0) };
}
}
-impl AddAssign<&Vec4> for Vec4 {
+impl AddAssign<&Self> for Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1392,9 +1395,9 @@
}
impl Add<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec4 {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1425,7 +1428,7 @@
impl AddAssign<&f32> for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1461,7 +1464,7 @@
}
}
-impl Sub<Vec4> for Vec4 {
+impl Sub for Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1469,10 +1472,10 @@
}
}
-impl Sub<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Sub<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec4) -> Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1493,17 +1496,17 @@
}
}
-impl SubAssign<Vec4> for Vec4 {
+impl SubAssign for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.0 = unsafe { _mm_sub_ps(self.0, rhs.0) };
}
}
-impl SubAssign<&Vec4> for Vec4 {
+impl SubAssign<&Self> for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1516,9 +1519,9 @@
}
impl Sub<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec4 {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1549,7 +1552,7 @@
impl SubAssign<&f32> for Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1585,7 +1588,7 @@
}
}
-impl Rem<Vec4> for Vec4 {
+impl Rem for Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1596,10 +1599,10 @@
}
}
-impl Rem<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Rem<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec4) -> Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1620,17 +1623,17 @@
}
}
-impl RemAssign<Vec4> for Vec4 {
+impl RemAssign for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
*self = self.rem(rhs);
}
}
-impl RemAssign<&Vec4> for Vec4 {
+impl RemAssign<&Self> for Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1643,9 +1646,9 @@
}
impl Rem<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec4 {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1676,7 +1679,7 @@
impl RemAssign<&f32> for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1716,7 +1719,7 @@
impl AsRef<[f32; 4]> for Vec4 {
#[inline]
fn as_ref(&self) -> &[f32; 4] {
- unsafe { &*(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { &*(self as *const Self as *const [f32; 4]) }
}
}
@@ -1724,7 +1727,7 @@
impl AsMut<[f32; 4]> for Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 4] {
- unsafe { &mut *(self as *mut Vec4 as *mut [f32; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 4]) }
}
}
@@ -1880,13 +1883,7 @@
impl From<Vec4> for (f32, f32, f32, f32) {
#[inline]
fn from(v: Vec4) -> Self {
- use crate::Align16;
- use core::mem::MaybeUninit;
- let mut out: MaybeUninit<Align16<Self>> = MaybeUninit::uninit();
- unsafe {
- _mm_store_ps(out.as_mut_ptr().cast(), v.0);
- out.assume_init().0
- }
+ (v.x, v.y, v.z, v.w)
}
}
diff --git a/crates/glam/src/f32/vec2.rs b/crates/glam/src/f32/vec2.rs
index d80f591..16edd03 100644
--- a/crates/glam/src/f32/vec2.rs
+++ b/crates/glam/src/f32/vec2.rs
@@ -15,6 +15,7 @@
/// A 2-dimensional vector.
#[derive(Clone, Copy, PartialEq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(8)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -424,6 +425,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec2 {
BVec2::new(self.x.is_finite(), self.y.is_finite())
}
@@ -1081,7 +1084,7 @@
}
}
-impl Div<Vec2> for Vec2 {
+impl Div for Vec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1092,10 +1095,10 @@
}
}
-impl Div<&Vec2> for Vec2 {
- type Output = Vec2;
+impl Div<&Self> for Vec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec2) -> Vec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1116,7 +1119,7 @@
}
}
-impl DivAssign<Vec2> for Vec2 {
+impl DivAssign for Vec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1124,10 +1127,10 @@
}
}
-impl DivAssign<&Vec2> for Vec2 {
+impl DivAssign<&Self> for Vec2 {
#[inline]
- fn div_assign(&mut self, rhs: &Vec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1143,9 +1146,9 @@
}
impl Div<&f32> for Vec2 {
- type Output = Vec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec2 {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1177,7 +1180,7 @@
impl DivAssign<&f32> for Vec2 {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1216,7 +1219,7 @@
}
}
-impl Mul<Vec2> for Vec2 {
+impl Mul for Vec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1227,10 +1230,10 @@
}
}
-impl Mul<&Vec2> for Vec2 {
- type Output = Vec2;
+impl Mul<&Self> for Vec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec2) -> Vec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1251,7 +1254,7 @@
}
}
-impl MulAssign<Vec2> for Vec2 {
+impl MulAssign for Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1259,10 +1262,10 @@
}
}
-impl MulAssign<&Vec2> for Vec2 {
+impl MulAssign<&Self> for Vec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1278,9 +1281,9 @@
}
impl Mul<&f32> for Vec2 {
- type Output = Vec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec2 {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1312,7 +1315,7 @@
impl MulAssign<&f32> for Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1351,7 +1354,7 @@
}
}
-impl Add<Vec2> for Vec2 {
+impl Add for Vec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1362,10 +1365,10 @@
}
}
-impl Add<&Vec2> for Vec2 {
- type Output = Vec2;
+impl Add<&Self> for Vec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec2) -> Vec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1386,7 +1389,7 @@
}
}
-impl AddAssign<Vec2> for Vec2 {
+impl AddAssign for Vec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1394,10 +1397,10 @@
}
}
-impl AddAssign<&Vec2> for Vec2 {
+impl AddAssign<&Self> for Vec2 {
#[inline]
- fn add_assign(&mut self, rhs: &Vec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1413,9 +1416,9 @@
}
impl Add<&f32> for Vec2 {
- type Output = Vec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec2 {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1447,7 +1450,7 @@
impl AddAssign<&f32> for Vec2 {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1486,7 +1489,7 @@
}
}
-impl Sub<Vec2> for Vec2 {
+impl Sub for Vec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1497,10 +1500,10 @@
}
}
-impl Sub<&Vec2> for Vec2 {
- type Output = Vec2;
+impl Sub<&Self> for Vec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec2) -> Vec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1521,18 +1524,18 @@
}
}
-impl SubAssign<Vec2> for Vec2 {
+impl SubAssign for Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: Vec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&Vec2> for Vec2 {
+impl SubAssign<&Self> for Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1548,9 +1551,9 @@
}
impl Sub<&f32> for Vec2 {
- type Output = Vec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec2 {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1582,7 +1585,7 @@
impl SubAssign<&f32> for Vec2 {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1621,7 +1624,7 @@
}
}
-impl Rem<Vec2> for Vec2 {
+impl Rem for Vec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1632,10 +1635,10 @@
}
}
-impl Rem<&Vec2> for Vec2 {
- type Output = Vec2;
+impl Rem<&Self> for Vec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec2) -> Vec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1656,7 +1659,7 @@
}
}
-impl RemAssign<Vec2> for Vec2 {
+impl RemAssign for Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1664,10 +1667,10 @@
}
}
-impl RemAssign<&Vec2> for Vec2 {
+impl RemAssign<&Self> for Vec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1683,9 +1686,9 @@
}
impl Rem<&f32> for Vec2 {
- type Output = Vec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec2 {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1717,7 +1720,7 @@
impl RemAssign<&f32> for Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1760,7 +1763,7 @@
impl AsRef<[f32; 2]> for Vec2 {
#[inline]
fn as_ref(&self) -> &[f32; 2] {
- unsafe { &*(self as *const Vec2 as *const [f32; 2]) }
+ unsafe { &*(self as *const Self as *const [f32; 2]) }
}
}
@@ -1768,7 +1771,7 @@
impl AsMut<[f32; 2]> for Vec2 {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 2] {
- unsafe { &mut *(self as *mut Vec2 as *mut [f32; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 2]) }
}
}
diff --git a/crates/glam/src/f32/vec3.rs b/crates/glam/src/f32/vec3.rs
index c71b17c..6b0dad6 100644
--- a/crates/glam/src/f32/vec3.rs
+++ b/crates/glam/src/f32/vec3.rs
@@ -15,6 +15,7 @@
/// A 3-dimensional vector.
#[derive(Clone, Copy, PartialEq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct Vec3 {
@@ -489,6 +490,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec3 {
BVec3::new(self.x.is_finite(), self.y.is_finite(), self.z.is_finite())
}
@@ -1195,7 +1198,7 @@
}
}
-impl Div<Vec3> for Vec3 {
+impl Div for Vec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1207,10 +1210,10 @@
}
}
-impl Div<&Vec3> for Vec3 {
- type Output = Vec3;
+impl Div<&Self> for Vec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec3) -> Vec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1231,7 +1234,7 @@
}
}
-impl DivAssign<Vec3> for Vec3 {
+impl DivAssign for Vec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1240,10 +1243,10 @@
}
}
-impl DivAssign<&Vec3> for Vec3 {
+impl DivAssign<&Self> for Vec3 {
#[inline]
- fn div_assign(&mut self, rhs: &Vec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1260,9 +1263,9 @@
}
impl Div<&f32> for Vec3 {
- type Output = Vec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec3 {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1295,7 +1298,7 @@
impl DivAssign<&f32> for Vec3 {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1335,7 +1338,7 @@
}
}
-impl Mul<Vec3> for Vec3 {
+impl Mul for Vec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1347,10 +1350,10 @@
}
}
-impl Mul<&Vec3> for Vec3 {
- type Output = Vec3;
+impl Mul<&Self> for Vec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec3) -> Vec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1371,7 +1374,7 @@
}
}
-impl MulAssign<Vec3> for Vec3 {
+impl MulAssign for Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1380,10 +1383,10 @@
}
}
-impl MulAssign<&Vec3> for Vec3 {
+impl MulAssign<&Self> for Vec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1400,9 +1403,9 @@
}
impl Mul<&f32> for Vec3 {
- type Output = Vec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec3 {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1435,7 +1438,7 @@
impl MulAssign<&f32> for Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1475,7 +1478,7 @@
}
}
-impl Add<Vec3> for Vec3 {
+impl Add for Vec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1487,10 +1490,10 @@
}
}
-impl Add<&Vec3> for Vec3 {
- type Output = Vec3;
+impl Add<&Self> for Vec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec3) -> Vec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1511,7 +1514,7 @@
}
}
-impl AddAssign<Vec3> for Vec3 {
+impl AddAssign for Vec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1520,10 +1523,10 @@
}
}
-impl AddAssign<&Vec3> for Vec3 {
+impl AddAssign<&Self> for Vec3 {
#[inline]
- fn add_assign(&mut self, rhs: &Vec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1540,9 +1543,9 @@
}
impl Add<&f32> for Vec3 {
- type Output = Vec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec3 {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1575,7 +1578,7 @@
impl AddAssign<&f32> for Vec3 {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1615,7 +1618,7 @@
}
}
-impl Sub<Vec3> for Vec3 {
+impl Sub for Vec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1627,10 +1630,10 @@
}
}
-impl Sub<&Vec3> for Vec3 {
- type Output = Vec3;
+impl Sub<&Self> for Vec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec3) -> Vec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1651,19 +1654,19 @@
}
}
-impl SubAssign<Vec3> for Vec3 {
+impl SubAssign for Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: Vec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&Vec3> for Vec3 {
+impl SubAssign<&Self> for Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1680,9 +1683,9 @@
}
impl Sub<&f32> for Vec3 {
- type Output = Vec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec3 {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1715,7 +1718,7 @@
impl SubAssign<&f32> for Vec3 {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1755,7 +1758,7 @@
}
}
-impl Rem<Vec3> for Vec3 {
+impl Rem for Vec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1767,10 +1770,10 @@
}
}
-impl Rem<&Vec3> for Vec3 {
- type Output = Vec3;
+impl Rem<&Self> for Vec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec3) -> Vec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1791,7 +1794,7 @@
}
}
-impl RemAssign<Vec3> for Vec3 {
+impl RemAssign for Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1800,10 +1803,10 @@
}
}
-impl RemAssign<&Vec3> for Vec3 {
+impl RemAssign<&Self> for Vec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1820,9 +1823,9 @@
}
impl Rem<&f32> for Vec3 {
- type Output = Vec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec3 {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1855,7 +1858,7 @@
impl RemAssign<&f32> for Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1899,7 +1902,7 @@
impl AsRef<[f32; 3]> for Vec3 {
#[inline]
fn as_ref(&self) -> &[f32; 3] {
- unsafe { &*(self as *const Vec3 as *const [f32; 3]) }
+ unsafe { &*(self as *const Self as *const [f32; 3]) }
}
}
@@ -1907,7 +1910,7 @@
impl AsMut<[f32; 3]> for Vec3 {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 3] {
- unsafe { &mut *(self as *mut Vec3 as *mut [f32; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 3]) }
}
}
diff --git a/crates/glam/src/f32/wasm32/mat2.rs b/crates/glam/src/f32/wasm32/mat2.rs
index 2225c94..b932280 100644
--- a/crates/glam/src/f32/wasm32/mat2.rs
+++ b/crates/glam/src/f32/wasm32/mat2.rs
@@ -20,6 +20,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Mat2(pub(crate) v128);
@@ -310,31 +311,21 @@
#[inline]
#[must_use]
pub fn mul_mat2(&self, rhs: &Self) -> Self {
- let abcd = self.0;
- let rhs = rhs.0;
- let xxyy0 = i32x4_shuffle::<0, 0, 5, 5>(rhs, rhs);
- let xxyy1 = i32x4_shuffle::<2, 2, 7, 7>(rhs, rhs);
- let axbxcydy0 = f32x4_mul(abcd, xxyy0);
- let axbxcydy1 = f32x4_mul(abcd, xxyy1);
- let cydyaxbx0 = i32x4_shuffle::<2, 3, 4, 5>(axbxcydy0, axbxcydy0);
- let cydyaxbx1 = i32x4_shuffle::<2, 3, 4, 5>(axbxcydy1, axbxcydy1);
- let result0 = f32x4_add(axbxcydy0, cydyaxbx0);
- let result1 = f32x4_add(axbxcydy1, cydyaxbx1);
- Self(i32x4_shuffle::<0, 1, 4, 5>(result0, result1))
+ self.mul(rhs)
}
/// Adds two 2x2 matrices.
#[inline]
#[must_use]
pub fn add_mat2(&self, rhs: &Self) -> Self {
- Self(f32x4_add(self.0, rhs.0))
+ self.add(rhs)
}
/// Subtracts two 2x2 matrices.
#[inline]
#[must_use]
pub fn sub_mat2(&self, rhs: &Self) -> Self {
- Self(f32x4_sub(self.0, rhs.0))
+ self.sub(rhs)
}
/// Multiplies a 2x2 matrix by a scalar.
@@ -387,33 +378,95 @@
}
}
-impl Add<Mat2> for Mat2 {
+impl Add for Mat2 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat2(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self(f32x4_add(self.0, rhs.0))
}
}
-impl AddAssign<Mat2> for Mat2 {
+impl Add<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: &Mat2) -> Mat2 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn add(self, rhs: Mat2) -> Mat2 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat2(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat2> for Mat2 {
+impl AddAssign<&Self> for Mat2 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat2 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat2(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self(f32x4_sub(self.0, rhs.0))
}
}
-impl SubAssign<Mat2> for Mat2 {
+impl Sub<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: &Mat2) -> Mat2 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn sub(self, rhs: Mat2) -> Mat2 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat2 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat2(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat2 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -425,18 +478,67 @@
}
}
-impl Mul<Mat2> for Mat2 {
- type Output = Self;
+impl Neg for &Mat2 {
+ type Output = Mat2;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat2(&rhs)
+ fn neg(self) -> Mat2 {
+ (*self).neg()
}
}
-impl MulAssign<Mat2> for Mat2 {
+impl Mul for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ let abcd = self.0;
+ let rhs = rhs.0;
+ let xxyy0 = i32x4_shuffle::<0, 0, 5, 5>(rhs, rhs);
+ let xxyy1 = i32x4_shuffle::<2, 2, 7, 7>(rhs, rhs);
+ let axbxcydy0 = f32x4_mul(abcd, xxyy0);
+ let axbxcydy1 = f32x4_mul(abcd, xxyy1);
+ let cydyaxbx0 = i32x4_shuffle::<2, 3, 4, 5>(axbxcydy0, axbxcydy0);
+ let cydyaxbx1 = i32x4_shuffle::<2, 3, 4, 5>(axbxcydy1, axbxcydy1);
+ let result0 = f32x4_add(axbxcydy0, cydyaxbx0);
+ let result1 = f32x4_add(axbxcydy1, cydyaxbx1);
+ Self(i32x4_shuffle::<0, 1, 4, 5>(result0, result1))
+ }
+}
+
+impl Mul<&Self> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat2(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -448,6 +550,30 @@
}
}
+impl Mul<&Vec2> for Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: &Vec2) -> Vec2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec2> for &Mat2 {
+ type Output = Vec2;
+ #[inline]
+ fn mul(self, rhs: Vec2) -> Vec2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat2> for f32 {
type Output = Mat2;
#[inline]
@@ -456,18 +582,73 @@
}
}
+impl Mul<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &Mat2) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: Mat2) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat2 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat2 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -479,18 +660,73 @@
}
}
+impl Div<&Mat2> for f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &Mat2) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat2> for &f32 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: Mat2) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat2 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat2 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat2 {
+ type Output = Mat2;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat2 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat2 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat2 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/wasm32/mat3a.rs b/crates/glam/src/f32/wasm32/mat3a.rs
index 4bc777d..f84ec21 100644
--- a/crates/glam/src/f32/wasm32/mat3a.rs
+++ b/crates/glam/src/f32/wasm32/mat3a.rs
@@ -44,6 +44,7 @@
/// vectors respectively. These methods assume that `Self` contains a valid affine
/// transform.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat3A {
pub x_axis: Vec3A,
@@ -702,33 +703,21 @@
#[inline]
#[must_use]
pub fn mul_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- )
+ self.mul(rhs)
}
/// Adds two 3x3 matrices.
#[inline]
#[must_use]
pub fn add_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 3x3 matrices.
#[inline]
#[must_use]
pub fn sub_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 3x3 matrix by a scalar.
@@ -795,33 +784,103 @@
}
}
-impl Add<Mat3A> for Mat3A {
+impl Add for Mat3A {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat3(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ )
}
}
-impl AddAssign<Mat3A> for Mat3A {
+impl Add<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: &Mat3A) -> Mat3A {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn add(self, rhs: Mat3A) -> Mat3A {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat3(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat3A> for Mat3A {
+impl AddAssign<&Self> for Mat3A {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat3A {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat3(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ )
}
}
-impl SubAssign<Mat3A> for Mat3A {
+impl Sub<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: &Mat3A) -> Mat3A {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn sub(self, rhs: Mat3A) -> Mat3A {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat3A {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat3(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat3A {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -833,18 +892,61 @@
}
}
-impl Mul<Mat3A> for Mat3A {
- type Output = Self;
+impl Neg for &Mat3A {
+ type Output = Mat3A;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat3(&rhs)
+ fn neg(self) -> Mat3A {
+ (*self).neg()
}
}
-impl MulAssign<Mat3A> for Mat3A {
+impl Mul for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat3(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -856,6 +958,30 @@
}
}
+impl Mul<&Vec3A> for Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Mat3A {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat3A> for f32 {
type Output = Mat3A;
#[inline]
@@ -864,18 +990,73 @@
}
}
+impl Mul<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &Mat3A) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: Mat3A) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat3A {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat3A {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat3A {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat3A {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -887,18 +1068,73 @@
}
}
+impl Div<&Mat3A> for f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &Mat3A) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat3A> for &f32 {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: Mat3A) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat3A {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat3A {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat3A {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat3A {
+ type Output = Mat3A;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat3A {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat3A {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat3A {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
@@ -910,6 +1146,30 @@
}
}
+impl Mul<&Vec3> for Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Mat3A {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
impl From<Mat3> for Mat3A {
#[inline]
fn from(m: Mat3) -> Self {
diff --git a/crates/glam/src/f32/wasm32/mat4.rs b/crates/glam/src/f32/wasm32/mat4.rs
index 6e00ed2..64529b8 100644
--- a/crates/glam/src/f32/wasm32/mat4.rs
+++ b/crates/glam/src/f32/wasm32/mat4.rs
@@ -50,6 +50,7 @@
/// The resulting perspective project can be use to transform 3D vectors as points with
/// perspective correction using the [`Self::project_point3()`] convenience method.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct Mat4 {
pub x_axis: Vec4,
@@ -873,6 +874,103 @@
Self::look_to_rh(eye, center.sub(eye).normalize(), up)
}
+ /// Creates a right-handed perspective projection matrix with [-1,1] depth range.
+ ///
+ /// This is the same as the OpenGL `glFurstum` function.
+ ///
+ /// See <https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml>
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh_gl(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -(z_far + z_near) * inv_depth;
+ let d = -(2.0 * z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a left-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_lh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, 1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a right-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh(
+ left: f32,
+ right: f32,
+ bottom: f32,
+ top: f32,
+ z_near: f32,
+ z_far: f32,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ Vec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ Vec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ Vec4::new(a, b, c, -1.0),
+ Vec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
/// Creates a right-handed perspective projection matrix with `[-1,1]` depth range.
///
/// Useful to map the standard right-handed coordinate system into what OpenGL expects.
@@ -1252,36 +1350,21 @@
#[inline]
#[must_use]
pub fn mul_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- self.mul(rhs.w_axis),
- )
+ self.mul(rhs)
}
/// Adds two 4x4 matrices.
#[inline]
#[must_use]
pub fn add_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- self.w_axis.add(rhs.w_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 4x4 matrices.
#[inline]
#[must_use]
pub fn sub_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- self.w_axis.sub(rhs.w_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 4x4 matrix by a scalar.
@@ -1357,33 +1440,105 @@
}
}
-impl Add<Mat4> for Mat4 {
+impl Add for Mat4 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat4(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ self.w_axis.add(rhs.w_axis),
+ )
}
}
-impl AddAssign<Mat4> for Mat4 {
+impl Add<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: &Mat4) -> Mat4 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn add(self, rhs: Mat4) -> Mat4 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Mat4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat4(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<Mat4> for Mat4 {
+impl AddAssign<&Self> for Mat4 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Mat4 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat4(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ self.w_axis.sub(rhs.w_axis),
+ )
}
}
-impl SubAssign<Mat4> for Mat4 {
+impl Sub<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: &Mat4) -> Mat4 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn sub(self, rhs: Mat4) -> Mat4 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Mat4 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat4(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Mat4 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1400,18 +1555,62 @@
}
}
-impl Mul<Mat4> for Mat4 {
- type Output = Self;
+impl Neg for &Mat4 {
+ type Output = Mat4;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat4(&rhs)
+ fn neg(self) -> Mat4 {
+ (*self).neg()
}
}
-impl MulAssign<Mat4> for Mat4 {
+impl Mul for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ self.mul(rhs.w_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat4(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1423,6 +1622,30 @@
}
}
+impl Mul<&Vec4> for Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: &Vec4) -> Vec4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec4> for &Mat4 {
+ type Output = Vec4;
+ #[inline]
+ fn mul(self, rhs: Vec4) -> Vec4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<Mat4> for f32 {
type Output = Mat4;
#[inline]
@@ -1431,18 +1654,73 @@
}
}
+impl Mul<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &Mat4) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: Mat4) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f32> for Mat4 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f32) -> Self::Output {
+ fn mul(self, rhs: f32) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Mat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn mul(self, rhs: f32) -> Mat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f32> for Mat4 {
#[inline]
fn mul_assign(&mut self, rhs: f32) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Mat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
}
}
@@ -1454,18 +1732,73 @@
}
}
+impl Div<&Mat4> for f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &Mat4) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<Mat4> for &f32 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: Mat4) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f32> for Mat4 {
type Output = Self;
#[inline]
- fn div(self, rhs: f32) -> Self::Output {
+ fn div(self, rhs: f32) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f32> for Mat4 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: &f32) -> Mat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Mat4 {
+ type Output = Mat4;
+ #[inline]
+ fn div(self, rhs: f32) -> Mat4 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f32> for Mat4 {
#[inline]
fn div_assign(&mut self, rhs: f32) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Mat4 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f32/wasm32/quat.rs b/crates/glam/src/f32/wasm32/quat.rs
index 293a5e8..d5ec219 100644
--- a/crates/glam/src/f32/wasm32/quat.rs
+++ b/crates/glam/src/f32/wasm32/quat.rs
@@ -11,7 +11,9 @@
use core::fmt;
use core::iter::{Product, Sum};
-use core::ops::{Add, Deref, DerefMut, Div, Mul, MulAssign, Neg, Sub};
+use core::ops::{
+ Add, AddAssign, Deref, DerefMut, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign,
+};
/// Creates a quaternion from `x`, `y`, `z` and `w` values.
///
@@ -33,6 +35,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Quat(pub(crate) v128);
@@ -447,6 +450,7 @@
///
/// Will panic if `up` is not normalized when `glam_assert` is enabled.
#[inline]
+ #[must_use]
pub fn look_at_rh(eye: Vec3, center: Vec3, up: Vec3) -> Self {
Self::look_to_rh(center.sub(eye).normalize(), up)
}
@@ -868,7 +872,7 @@
}
}
-impl Add<Quat> for Quat {
+impl Add for Quat {
type Output = Self;
/// Adds two quaternions.
///
@@ -882,7 +886,45 @@
}
}
-impl Sub<Quat> for Quat {
+impl Add<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: &Quat) -> Quat {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn add(self, rhs: Quat) -> Quat {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: Self) {
+ *self = self.add(rhs);
+ }
+}
+
+impl AddAssign<&Self> for Quat {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for Quat {
type Output = Self;
/// Subtracts the `rhs` quaternion from `self`.
///
@@ -893,6 +935,44 @@
}
}
+impl Sub<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: &Quat) -> Quat {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn sub(self, rhs: Quat) -> Quat {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: Self) {
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for Quat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
+ }
+}
+
impl Mul<f32> for Quat {
type Output = Self;
/// Multiplies a quaternion by a scalar value.
@@ -904,6 +984,44 @@
}
}
+impl Mul<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &f32) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: f32) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: f32) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f32> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f32) {
+ self.mul_assign(*rhs);
+ }
+}
+
impl Div<f32> for Quat {
type Output = Self;
/// Divides a quaternion by a scalar value.
@@ -914,7 +1032,45 @@
}
}
-impl Mul<Quat> for Quat {
+impl Div<&f32> for Quat {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f32) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: &f32) -> Quat {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f32> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn div(self, rhs: f32) -> Quat {
+ (*self).div(rhs)
+ }
+}
+
+impl DivAssign<f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: f32) {
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f32> for Quat {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f32) {
+ self.div_assign(*rhs);
+ }
+}
+
+impl Mul for Quat {
type Output = Self;
/// Multiplies two quaternions. If they each represent a rotation, the result will
/// represent the combined rotation.
@@ -931,19 +1087,41 @@
}
}
-impl MulAssign<Quat> for Quat {
- /// Multiplies two quaternions. If they each represent a rotation, the result will
- /// represent the combined rotation.
- ///
- /// Note that due to floating point rounding the result may not be perfectly
- /// normalized.
- ///
- /// # Panics
- ///
- /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.
+impl Mul<&Self> for Quat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: &Quat) -> Quat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Quat> for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn mul(self, rhs: Quat) -> Quat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for Quat {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_quat(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for Quat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -960,6 +1138,62 @@
}
}
+impl Mul<&Vec3> for Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: &Vec3) -> Vec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3> for &Quat {
+ type Output = Vec3;
+ #[inline]
+ fn mul(self, rhs: Vec3) -> Vec3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Self::Output {
+ self.mul_vec3a(rhs)
+ }
+}
+
+impl Mul<&Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: &Vec3A) -> Vec3A {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<Vec3A> for &Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Vec3A {
+ (*self).mul(rhs)
+ }
+}
+
impl Neg for Quat {
type Output = Self;
#[inline]
@@ -968,6 +1202,14 @@
}
}
+impl Neg for &Quat {
+ type Output = Quat;
+ #[inline]
+ fn neg(self) -> Quat {
+ (*self).neg()
+ }
+}
+
impl Default for Quat {
#[inline]
fn default() -> Self {
@@ -1026,14 +1268,6 @@
}
}
-impl Mul<Vec3A> for Quat {
- type Output = Vec3A;
- #[inline]
- fn mul(self, rhs: Vec3A) -> Self::Output {
- self.mul_vec3a(rhs)
- }
-}
-
impl From<Quat> for Vec4 {
#[inline]
fn from(q: Quat) -> Self {
diff --git a/crates/glam/src/f32/wasm32/vec3a.rs b/crates/glam/src/f32/wasm32/vec3a.rs
index 3589fc5..e3af0c0 100644
--- a/crates/glam/src/f32/wasm32/vec3a.rs
+++ b/crates/glam/src/f32/wasm32/vec3a.rs
@@ -25,6 +25,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Vec3A(pub(crate) v128);
@@ -131,7 +132,7 @@
#[inline]
#[must_use]
pub const fn to_array(&self) -> [f32; 3] {
- unsafe { *(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { *(self as *const Self as *const [f32; 3]) }
}
/// Creates a vector from the first 3 values in `slice`.
@@ -482,6 +483,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec3A {
BVec3A(f32x4_lt(f32x4_abs(self.0), Self::INFINITY.0))
}
@@ -1178,7 +1181,7 @@
}
}
-impl Div<Vec3A> for Vec3A {
+impl Div for Vec3A {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1186,10 +1189,10 @@
}
}
-impl Div<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Div<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec3A) -> Vec3A {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1210,17 +1213,17 @@
}
}
-impl DivAssign<Vec3A> for Vec3A {
+impl DivAssign for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.0 = f32x4_div(self.0, rhs.0);
}
}
-impl DivAssign<&Vec3A> for Vec3A {
+impl DivAssign<&Self> for Vec3A {
#[inline]
- fn div_assign(&mut self, rhs: &Vec3A) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1233,9 +1236,9 @@
}
impl Div<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec3A {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1266,7 +1269,7 @@
impl DivAssign<&f32> for Vec3A {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1302,7 +1305,7 @@
}
}
-impl Mul<Vec3A> for Vec3A {
+impl Mul for Vec3A {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1310,10 +1313,10 @@
}
}
-impl Mul<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Mul<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec3A) -> Vec3A {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1334,17 +1337,17 @@
}
}
-impl MulAssign<Vec3A> for Vec3A {
+impl MulAssign for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.0 = f32x4_mul(self.0, rhs.0);
}
}
-impl MulAssign<&Vec3A> for Vec3A {
+impl MulAssign<&Self> for Vec3A {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec3A) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1357,9 +1360,9 @@
}
impl Mul<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec3A {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1390,7 +1393,7 @@
impl MulAssign<&f32> for Vec3A {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1426,7 +1429,7 @@
}
}
-impl Add<Vec3A> for Vec3A {
+impl Add for Vec3A {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1434,10 +1437,10 @@
}
}
-impl Add<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Add<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec3A) -> Vec3A {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1458,17 +1461,17 @@
}
}
-impl AddAssign<Vec3A> for Vec3A {
+impl AddAssign for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.0 = f32x4_add(self.0, rhs.0);
}
}
-impl AddAssign<&Vec3A> for Vec3A {
+impl AddAssign<&Self> for Vec3A {
#[inline]
- fn add_assign(&mut self, rhs: &Vec3A) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1481,9 +1484,9 @@
}
impl Add<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec3A {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1514,7 +1517,7 @@
impl AddAssign<&f32> for Vec3A {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1550,7 +1553,7 @@
}
}
-impl Sub<Vec3A> for Vec3A {
+impl Sub for Vec3A {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1558,10 +1561,10 @@
}
}
-impl Sub<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Sub<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec3A) -> Vec3A {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1582,17 +1585,17 @@
}
}
-impl SubAssign<Vec3A> for Vec3A {
+impl SubAssign for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: Vec3A) {
+ fn sub_assign(&mut self, rhs: Self) {
self.0 = f32x4_sub(self.0, rhs.0);
}
}
-impl SubAssign<&Vec3A> for Vec3A {
+impl SubAssign<&Self> for Vec3A {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec3A) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1605,9 +1608,9 @@
}
impl Sub<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec3A {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1638,7 +1641,7 @@
impl SubAssign<&f32> for Vec3A {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1674,7 +1677,7 @@
}
}
-impl Rem<Vec3A> for Vec3A {
+impl Rem for Vec3A {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1683,10 +1686,10 @@
}
}
-impl Rem<&Vec3A> for Vec3A {
- type Output = Vec3A;
+impl Rem<&Self> for Vec3A {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec3A) -> Vec3A {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1707,17 +1710,17 @@
}
}
-impl RemAssign<Vec3A> for Vec3A {
+impl RemAssign for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
*self = self.rem(rhs);
}
}
-impl RemAssign<&Vec3A> for Vec3A {
+impl RemAssign<&Self> for Vec3A {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec3A) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1730,9 +1733,9 @@
}
impl Rem<&f32> for Vec3A {
- type Output = Vec3A;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec3A {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1763,7 +1766,7 @@
impl RemAssign<&f32> for Vec3A {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1803,7 +1806,7 @@
impl AsRef<[f32; 3]> for Vec3A {
#[inline]
fn as_ref(&self) -> &[f32; 3] {
- unsafe { &*(self as *const Vec3A as *const [f32; 3]) }
+ unsafe { &*(self as *const Self as *const [f32; 3]) }
}
}
@@ -1811,7 +1814,7 @@
impl AsMut<[f32; 3]> for Vec3A {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 3] {
- unsafe { &mut *(self as *mut Vec3A as *mut [f32; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 3]) }
}
}
@@ -1954,7 +1957,7 @@
impl From<Vec3A> for (f32, f32, f32) {
#[inline]
fn from(v: Vec3A) -> Self {
- unsafe { *(&v.0 as *const v128 as *const Self) }
+ (v.x, v.y, v.z)
}
}
diff --git a/crates/glam/src/f32/wasm32/vec4.rs b/crates/glam/src/f32/wasm32/vec4.rs
index e4b5670..f42d124 100644
--- a/crates/glam/src/f32/wasm32/vec4.rs
+++ b/crates/glam/src/f32/wasm32/vec4.rs
@@ -21,6 +21,7 @@
///
/// This type is 16 byte aligned.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(transparent)]
pub struct Vec4(pub(crate) v128);
@@ -133,7 +134,7 @@
#[inline]
#[must_use]
pub const fn to_array(&self) -> [f32; 4] {
- unsafe { *(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { *(self as *const Self as *const [f32; 4]) }
}
/// Creates a vector from the first 4 values in `slice`.
@@ -474,6 +475,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec4A {
BVec4A(f32x4_lt(f32x4_abs(self.0), Self::INFINITY.0))
}
@@ -1056,7 +1059,7 @@
}
}
-impl Div<Vec4> for Vec4 {
+impl Div for Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1064,10 +1067,10 @@
}
}
-impl Div<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Div<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &Vec4) -> Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1088,17 +1091,17 @@
}
}
-impl DivAssign<Vec4> for Vec4 {
+impl DivAssign for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.0 = f32x4_div(self.0, rhs.0);
}
}
-impl DivAssign<&Vec4> for Vec4 {
+impl DivAssign<&Self> for Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1111,9 +1114,9 @@
}
impl Div<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f32) -> Vec4 {
+ fn div(self, rhs: &f32) -> Self {
self.div(*rhs)
}
}
@@ -1144,7 +1147,7 @@
impl DivAssign<&f32> for Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &f32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1180,7 +1183,7 @@
}
}
-impl Mul<Vec4> for Vec4 {
+impl Mul for Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1188,10 +1191,10 @@
}
}
-impl Mul<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Mul<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &Vec4) -> Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1212,17 +1215,17 @@
}
}
-impl MulAssign<Vec4> for Vec4 {
+impl MulAssign for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.0 = f32x4_mul(self.0, rhs.0);
}
}
-impl MulAssign<&Vec4> for Vec4 {
+impl MulAssign<&Self> for Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1235,9 +1238,9 @@
}
impl Mul<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f32) -> Vec4 {
+ fn mul(self, rhs: &f32) -> Self {
self.mul(*rhs)
}
}
@@ -1268,7 +1271,7 @@
impl MulAssign<&f32> for Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &f32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1304,7 +1307,7 @@
}
}
-impl Add<Vec4> for Vec4 {
+impl Add for Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1312,10 +1315,10 @@
}
}
-impl Add<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Add<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &Vec4) -> Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1336,17 +1339,17 @@
}
}
-impl AddAssign<Vec4> for Vec4 {
+impl AddAssign for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.0 = f32x4_add(self.0, rhs.0);
}
}
-impl AddAssign<&Vec4> for Vec4 {
+impl AddAssign<&Self> for Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1359,9 +1362,9 @@
}
impl Add<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f32) -> Vec4 {
+ fn add(self, rhs: &f32) -> Self {
self.add(*rhs)
}
}
@@ -1392,7 +1395,7 @@
impl AddAssign<&f32> for Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &f32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1428,7 +1431,7 @@
}
}
-impl Sub<Vec4> for Vec4 {
+impl Sub for Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1436,10 +1439,10 @@
}
}
-impl Sub<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Sub<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &Vec4) -> Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1460,17 +1463,17 @@
}
}
-impl SubAssign<Vec4> for Vec4 {
+impl SubAssign for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.0 = f32x4_sub(self.0, rhs.0);
}
}
-impl SubAssign<&Vec4> for Vec4 {
+impl SubAssign<&Self> for Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1483,9 +1486,9 @@
}
impl Sub<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f32) -> Vec4 {
+ fn sub(self, rhs: &f32) -> Self {
self.sub(*rhs)
}
}
@@ -1516,7 +1519,7 @@
impl SubAssign<&f32> for Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &f32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1552,7 +1555,7 @@
}
}
-impl Rem<Vec4> for Vec4 {
+impl Rem for Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1561,10 +1564,10 @@
}
}
-impl Rem<&Vec4> for Vec4 {
- type Output = Vec4;
+impl Rem<&Self> for Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &Vec4) -> Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1585,17 +1588,17 @@
}
}
-impl RemAssign<Vec4> for Vec4 {
+impl RemAssign for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
*self = self.rem(rhs);
}
}
-impl RemAssign<&Vec4> for Vec4 {
+impl RemAssign<&Self> for Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1608,9 +1611,9 @@
}
impl Rem<&f32> for Vec4 {
- type Output = Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f32) -> Vec4 {
+ fn rem(self, rhs: &f32) -> Self {
self.rem(*rhs)
}
}
@@ -1641,7 +1644,7 @@
impl RemAssign<&f32> for Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &f32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1681,7 +1684,7 @@
impl AsRef<[f32; 4]> for Vec4 {
#[inline]
fn as_ref(&self) -> &[f32; 4] {
- unsafe { &*(self as *const Vec4 as *const [f32; 4]) }
+ unsafe { &*(self as *const Self as *const [f32; 4]) }
}
}
@@ -1689,7 +1692,7 @@
impl AsMut<[f32; 4]> for Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [f32; 4] {
- unsafe { &mut *(self as *mut Vec4 as *mut [f32; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [f32; 4]) }
}
}
@@ -1839,7 +1842,7 @@
impl From<Vec4> for (f32, f32, f32, f32) {
#[inline]
fn from(v: Vec4) -> Self {
- unsafe { *(&v.0 as *const v128 as *const Self) }
+ (v.x, v.y, v.z, v.w)
}
}
diff --git a/crates/glam/src/f64/daffine2.rs b/crates/glam/src/f64/daffine2.rs
index 1a2b4bb..6f7df92 100644
--- a/crates/glam/src/f64/daffine2.rs
+++ b/crates/glam/src/f64/daffine2.rs
@@ -5,6 +5,7 @@
/// A 2D affine transform, which can represent translation, rotation, scaling and shear.
#[derive(Copy, Clone)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct DAffine2 {
pub matrix2: DMat2,
@@ -377,10 +378,10 @@
}
impl Mul for DAffine2 {
- type Output = DAffine2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: DAffine2) -> Self::Output {
+ fn mul(self, rhs: Self) -> Self {
Self {
matrix2: self.matrix2 * rhs.matrix2,
translation: self.matrix2 * rhs.translation + self.translation,
@@ -388,16 +389,47 @@
}
}
+impl Mul<&Self> for DAffine2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DAffine2> for &DAffine2 {
+ type Output = DAffine2;
+ #[inline]
+ fn mul(self, rhs: &DAffine2) -> DAffine2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DAffine2> for &DAffine2 {
+ type Output = DAffine2;
+ #[inline]
+ fn mul(self, rhs: DAffine2) -> DAffine2 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign for DAffine2 {
#[inline]
- fn mul_assign(&mut self, rhs: DAffine2) {
+ fn mul_assign(&mut self, rhs: Self) {
*self = self.mul(rhs);
}
}
+impl MulAssign<&Self> for DAffine2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
+ }
+}
+
impl From<DAffine2> for DMat3 {
#[inline]
- fn from(m: DAffine2) -> DMat3 {
+ fn from(m: DAffine2) -> Self {
Self::from_cols(
m.matrix2.x_axis.extend(0.0),
m.matrix2.y_axis.extend(0.0),
@@ -415,11 +447,73 @@
}
}
-impl Mul<DAffine2> for DMat3 {
+impl Mul<&DMat3> for DAffine2 {
type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: &DMat3) -> DMat3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DMat3> for &DAffine2 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: &DMat3) -> DMat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DMat3> for &DAffine2 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: DMat3) -> DMat3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<DAffine2> for DMat3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: DAffine2) -> Self::Output {
- self * DMat3::from(rhs)
+ fn mul(self, rhs: DAffine2) -> Self {
+ self * Self::from(rhs)
+ }
+}
+
+impl Mul<&DAffine2> for DMat3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &DAffine2) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DAffine2> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: &DAffine2) -> DMat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DAffine2> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: DAffine2) -> DMat3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<DAffine2> for DMat3 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: DAffine2) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&DAffine2> for DMat3 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &DAffine2) {
+ self.mul_assign(*rhs);
}
}
diff --git a/crates/glam/src/f64/daffine3.rs b/crates/glam/src/f64/daffine3.rs
index e048287..8c54fa6 100644
--- a/crates/glam/src/f64/daffine3.rs
+++ b/crates/glam/src/f64/daffine3.rs
@@ -5,6 +5,7 @@
/// A 3D affine transform, which can represent translation, rotation, scaling and shear.
#[derive(Copy, Clone)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct DAffine3 {
pub matrix3: DMat3,
@@ -524,10 +525,10 @@
}
impl Mul for DAffine3 {
- type Output = DAffine3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: DAffine3) -> Self::Output {
+ fn mul(self, rhs: Self) -> Self {
Self {
matrix3: self.matrix3 * rhs.matrix3,
translation: self.matrix3 * rhs.translation + self.translation,
@@ -535,22 +536,41 @@
}
}
+impl Mul<&Self> for DAffine3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DAffine3> for &DAffine3 {
+ type Output = DAffine3;
+ #[inline]
+ fn mul(self, rhs: &DAffine3) -> DAffine3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DAffine3> for &DAffine3 {
+ type Output = DAffine3;
+ #[inline]
+ fn mul(self, rhs: DAffine3) -> DAffine3 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign for DAffine3 {
#[inline]
- fn mul_assign(&mut self, rhs: DAffine3) {
+ fn mul_assign(&mut self, rhs: Self) {
*self = self.mul(rhs);
}
}
-impl From<DAffine3> for DMat4 {
+impl MulAssign<&Self> for DAffine3 {
#[inline]
- fn from(m: DAffine3) -> DMat4 {
- DMat4::from_cols(
- m.matrix3.x_axis.extend(0.0),
- m.matrix3.y_axis.extend(0.0),
- m.matrix3.z_axis.extend(0.0),
- m.translation.extend(1.0),
- )
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -563,11 +583,85 @@
}
}
-impl Mul<DAffine3> for DMat4 {
+impl Mul<&DMat4> for DAffine3 {
type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: &DMat4) -> DMat4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DMat4> for &DAffine3 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: &DMat4) -> DMat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DMat4> for &DAffine3 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: DMat4) -> DMat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl Mul<DAffine3> for DMat4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: DAffine3) -> Self::Output {
- self * DMat4::from(rhs)
+ fn mul(self, rhs: DAffine3) -> Self {
+ self * Self::from(rhs)
+ }
+}
+
+impl Mul<&DAffine3> for DMat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &DAffine3) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DAffine3> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: &DAffine3) -> DMat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DAffine3> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: DAffine3) -> DMat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<DAffine3> for DMat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: DAffine3) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&DAffine3> for DMat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &DAffine3) {
+ self.mul_assign(*rhs);
+ }
+}
+
+impl From<DAffine3> for DMat4 {
+ #[inline]
+ fn from(m: DAffine3) -> Self {
+ Self::from_cols(
+ m.matrix3.x_axis.extend(0.0),
+ m.matrix3.y_axis.extend(0.0),
+ m.matrix3.z_axis.extend(0.0),
+ m.translation.extend(1.0),
+ )
}
}
diff --git a/crates/glam/src/f64/dmat2.rs b/crates/glam/src/f64/dmat2.rs
index 2cf90d2..0208df3 100644
--- a/crates/glam/src/f64/dmat2.rs
+++ b/crates/glam/src/f64/dmat2.rs
@@ -14,6 +14,7 @@
/// A 2x2 column major matrix.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[repr(C)]
pub struct DMat2 {
@@ -275,21 +276,21 @@
#[inline]
#[must_use]
pub fn mul_mat2(&self, rhs: &Self) -> Self {
- Self::from_cols(self.mul(rhs.x_axis), self.mul(rhs.y_axis))
+ self.mul(rhs)
}
/// Adds two 2x2 matrices.
#[inline]
#[must_use]
pub fn add_mat2(&self, rhs: &Self) -> Self {
- Self::from_cols(self.x_axis.add(rhs.x_axis), self.y_axis.add(rhs.y_axis))
+ self.add(rhs)
}
/// Subtracts two 2x2 matrices.
#[inline]
#[must_use]
pub fn sub_mat2(&self, rhs: &Self) -> Self {
- Self::from_cols(self.x_axis.sub(rhs.x_axis), self.y_axis.sub(rhs.y_axis))
+ self.sub(rhs)
}
/// Multiplies a 2x2 matrix by a scalar.
@@ -343,33 +344,95 @@
}
}
-impl Add<DMat2> for DMat2 {
+impl Add for DMat2 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat2(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(self.x_axis.add(rhs.x_axis), self.y_axis.add(rhs.y_axis))
}
}
-impl AddAssign<DMat2> for DMat2 {
+impl Add<&Self> for DMat2 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&DMat2> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn add(self, rhs: &DMat2) -> DMat2 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<DMat2> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn add(self, rhs: DMat2) -> DMat2 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for DMat2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat2(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<DMat2> for DMat2 {
+impl AddAssign<&Self> for DMat2 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for DMat2 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat2(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(self.x_axis.sub(rhs.x_axis), self.y_axis.sub(rhs.y_axis))
}
}
-impl SubAssign<DMat2> for DMat2 {
+impl Sub<&Self> for DMat2 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&DMat2> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn sub(self, rhs: &DMat2) -> DMat2 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<DMat2> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn sub(self, rhs: DMat2) -> DMat2 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for DMat2 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat2(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for DMat2 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -381,18 +444,57 @@
}
}
-impl Mul<DMat2> for DMat2 {
- type Output = Self;
+impl Neg for &DMat2 {
+ type Output = DMat2;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat2(&rhs)
+ fn neg(self) -> DMat2 {
+ (*self).neg()
}
}
-impl MulAssign<DMat2> for DMat2 {
+impl Mul for DMat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(self.mul(rhs.x_axis), self.mul(rhs.y_axis))
+ }
+}
+
+impl Mul<&Self> for DMat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DMat2> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn mul(self, rhs: &DMat2) -> DMat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DMat2> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn mul(self, rhs: DMat2) -> DMat2 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for DMat2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat2(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for DMat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -404,6 +506,30 @@
}
}
+impl Mul<&DVec2> for DMat2 {
+ type Output = DVec2;
+ #[inline]
+ fn mul(self, rhs: &DVec2) -> DVec2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DVec2> for &DMat2 {
+ type Output = DVec2;
+ #[inline]
+ fn mul(self, rhs: &DVec2) -> DVec2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DVec2> for &DMat2 {
+ type Output = DVec2;
+ #[inline]
+ fn mul(self, rhs: DVec2) -> DVec2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<DMat2> for f64 {
type Output = DMat2;
#[inline]
@@ -412,18 +538,73 @@
}
}
+impl Mul<&DMat2> for f64 {
+ type Output = DMat2;
+ #[inline]
+ fn mul(self, rhs: &DMat2) -> DMat2 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DMat2> for &f64 {
+ type Output = DMat2;
+ #[inline]
+ fn mul(self, rhs: &DMat2) -> DMat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DMat2> for &f64 {
+ type Output = DMat2;
+ #[inline]
+ fn mul(self, rhs: DMat2) -> DMat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f64> for DMat2 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f64) -> Self::Output {
+ fn mul(self, rhs: f64) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f64> for DMat2 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f64) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f64> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn mul(self, rhs: &f64) -> DMat2 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f64> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn mul(self, rhs: f64) -> DMat2 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f64> for DMat2 {
#[inline]
fn mul_assign(&mut self, rhs: f64) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f64> for DMat2 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f64) {
+ self.mul_assign(*rhs);
}
}
@@ -435,18 +616,73 @@
}
}
+impl Div<&DMat2> for f64 {
+ type Output = DMat2;
+ #[inline]
+ fn div(self, rhs: &DMat2) -> DMat2 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&DMat2> for &f64 {
+ type Output = DMat2;
+ #[inline]
+ fn div(self, rhs: &DMat2) -> DMat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<DMat2> for &f64 {
+ type Output = DMat2;
+ #[inline]
+ fn div(self, rhs: DMat2) -> DMat2 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f64> for DMat2 {
type Output = Self;
#[inline]
- fn div(self, rhs: f64) -> Self::Output {
+ fn div(self, rhs: f64) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f64> for DMat2 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f64) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f64> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn div(self, rhs: &f64) -> DMat2 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f64> for &DMat2 {
+ type Output = DMat2;
+ #[inline]
+ fn div(self, rhs: f64) -> DMat2 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f64> for DMat2 {
#[inline]
fn div_assign(&mut self, rhs: f64) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f64> for DMat2 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f64) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f64/dmat3.rs b/crates/glam/src/f64/dmat3.rs
index d85ad8b..d39f6f6 100644
--- a/crates/glam/src/f64/dmat3.rs
+++ b/crates/glam/src/f64/dmat3.rs
@@ -42,6 +42,7 @@
/// vectors respectively. These methods assume that `Self` contains a valid affine
/// transform.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[repr(C)]
pub struct DMat3 {
pub x_axis: DVec3,
@@ -629,33 +630,21 @@
#[inline]
#[must_use]
pub fn mul_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- )
+ self.mul(rhs)
}
/// Adds two 3x3 matrices.
#[inline]
#[must_use]
pub fn add_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 3x3 matrices.
#[inline]
#[must_use]
pub fn sub_mat3(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 3x3 matrix by a scalar.
@@ -722,33 +711,103 @@
}
}
-impl Add<DMat3> for DMat3 {
+impl Add for DMat3 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat3(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ )
}
}
-impl AddAssign<DMat3> for DMat3 {
+impl Add<&Self> for DMat3 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&DMat3> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn add(self, rhs: &DMat3) -> DMat3 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<DMat3> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn add(self, rhs: DMat3) -> DMat3 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for DMat3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat3(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<DMat3> for DMat3 {
+impl AddAssign<&Self> for DMat3 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for DMat3 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat3(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ )
}
}
-impl SubAssign<DMat3> for DMat3 {
+impl Sub<&Self> for DMat3 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&DMat3> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn sub(self, rhs: &DMat3) -> DMat3 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<DMat3> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn sub(self, rhs: DMat3) -> DMat3 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for DMat3 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat3(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for DMat3 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -760,18 +819,61 @@
}
}
-impl Mul<DMat3> for DMat3 {
- type Output = Self;
+impl Neg for &DMat3 {
+ type Output = DMat3;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat3(&rhs)
+ fn neg(self) -> DMat3 {
+ (*self).neg()
}
}
-impl MulAssign<DMat3> for DMat3 {
+impl Mul for DMat3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for DMat3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DMat3> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: &DMat3) -> DMat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DMat3> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: DMat3) -> DMat3 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for DMat3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat3(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for DMat3 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -783,6 +885,30 @@
}
}
+impl Mul<&DVec3> for DMat3 {
+ type Output = DVec3;
+ #[inline]
+ fn mul(self, rhs: &DVec3) -> DVec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DVec3> for &DMat3 {
+ type Output = DVec3;
+ #[inline]
+ fn mul(self, rhs: &DVec3) -> DVec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DVec3> for &DMat3 {
+ type Output = DVec3;
+ #[inline]
+ fn mul(self, rhs: DVec3) -> DVec3 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<DMat3> for f64 {
type Output = DMat3;
#[inline]
@@ -791,18 +917,73 @@
}
}
+impl Mul<&DMat3> for f64 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: &DMat3) -> DMat3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DMat3> for &f64 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: &DMat3) -> DMat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DMat3> for &f64 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: DMat3) -> DMat3 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f64> for DMat3 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f64) -> Self::Output {
+ fn mul(self, rhs: f64) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f64> for DMat3 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f64) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f64> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: &f64) -> DMat3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f64> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn mul(self, rhs: f64) -> DMat3 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f64> for DMat3 {
#[inline]
fn mul_assign(&mut self, rhs: f64) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f64> for DMat3 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f64) {
+ self.mul_assign(*rhs);
}
}
@@ -814,18 +995,73 @@
}
}
+impl Div<&DMat3> for f64 {
+ type Output = DMat3;
+ #[inline]
+ fn div(self, rhs: &DMat3) -> DMat3 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&DMat3> for &f64 {
+ type Output = DMat3;
+ #[inline]
+ fn div(self, rhs: &DMat3) -> DMat3 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<DMat3> for &f64 {
+ type Output = DMat3;
+ #[inline]
+ fn div(self, rhs: DMat3) -> DMat3 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f64> for DMat3 {
type Output = Self;
#[inline]
- fn div(self, rhs: f64) -> Self::Output {
+ fn div(self, rhs: f64) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f64> for DMat3 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f64) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f64> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn div(self, rhs: &f64) -> DMat3 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f64> for &DMat3 {
+ type Output = DMat3;
+ #[inline]
+ fn div(self, rhs: f64) -> DMat3 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f64> for DMat3 {
#[inline]
fn div_assign(&mut self, rhs: f64) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f64> for DMat3 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f64) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f64/dmat4.rs b/crates/glam/src/f64/dmat4.rs
index 801bc61..ae3ecf7 100644
--- a/crates/glam/src/f64/dmat4.rs
+++ b/crates/glam/src/f64/dmat4.rs
@@ -47,6 +47,7 @@
/// The resulting perspective project can be use to transform 3D vectors as points with
/// perspective correction using the [`Self::project_point3()`] convenience method.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[repr(C)]
pub struct DMat4 {
@@ -777,6 +778,103 @@
Self::look_to_rh(eye, center.sub(eye).normalize(), up)
}
+ /// Creates a right-handed perspective projection matrix with [-1,1] depth range.
+ ///
+ /// This is the same as the OpenGL `glFurstum` function.
+ ///
+ /// See <https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml>
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh_gl(
+ left: f64,
+ right: f64,
+ bottom: f64,
+ top: f64,
+ z_near: f64,
+ z_far: f64,
+ ) -> Self {
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -(z_far + z_near) * inv_depth;
+ let d = -(2.0 * z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ DVec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ DVec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ DVec4::new(a, b, c, -1.0),
+ DVec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a left-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_lh(
+ left: f64,
+ right: f64,
+ bottom: f64,
+ top: f64,
+ z_near: f64,
+ z_far: f64,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ DVec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ DVec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ DVec4::new(a, b, c, 1.0),
+ DVec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a right-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh(
+ left: f64,
+ right: f64,
+ bottom: f64,
+ top: f64,
+ z_near: f64,
+ z_far: f64,
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ DVec4::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ DVec4::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ DVec4::new(a, b, c, -1.0),
+ DVec4::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
/// Creates a right-handed perspective projection matrix with `[-1,1]` depth range.
///
/// Useful to map the standard right-handed coordinate system into what OpenGL expects.
@@ -1112,36 +1210,21 @@
#[inline]
#[must_use]
pub fn mul_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.mul(rhs.x_axis),
- self.mul(rhs.y_axis),
- self.mul(rhs.z_axis),
- self.mul(rhs.w_axis),
- )
+ self.mul(rhs)
}
/// Adds two 4x4 matrices.
#[inline]
#[must_use]
pub fn add_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.add(rhs.x_axis),
- self.y_axis.add(rhs.y_axis),
- self.z_axis.add(rhs.z_axis),
- self.w_axis.add(rhs.w_axis),
- )
+ self.add(rhs)
}
/// Subtracts two 4x4 matrices.
#[inline]
#[must_use]
pub fn sub_mat4(&self, rhs: &Self) -> Self {
- Self::from_cols(
- self.x_axis.sub(rhs.x_axis),
- self.y_axis.sub(rhs.y_axis),
- self.z_axis.sub(rhs.z_axis),
- self.w_axis.sub(rhs.w_axis),
- )
+ self.sub(rhs)
}
/// Multiplies a 4x4 matrix by a scalar.
@@ -1217,33 +1300,105 @@
}
}
-impl Add<DMat4> for DMat4 {
+impl Add for DMat4 {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat4(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.add(rhs.x_axis),
+ self.y_axis.add(rhs.y_axis),
+ self.z_axis.add(rhs.z_axis),
+ self.w_axis.add(rhs.w_axis),
+ )
}
}
-impl AddAssign<DMat4> for DMat4 {
+impl Add<&Self> for DMat4 {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&DMat4> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn add(self, rhs: &DMat4) -> DMat4 {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<DMat4> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn add(self, rhs: DMat4) -> DMat4 {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for DMat4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat4(&rhs);
+ *self = self.add(rhs);
}
}
-impl Sub<DMat4> for DMat4 {
+impl AddAssign<&Self> for DMat4 {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for DMat4 {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat4(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.x_axis.sub(rhs.x_axis),
+ self.y_axis.sub(rhs.y_axis),
+ self.z_axis.sub(rhs.z_axis),
+ self.w_axis.sub(rhs.w_axis),
+ )
}
}
-impl SubAssign<DMat4> for DMat4 {
+impl Sub<&Self> for DMat4 {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&DMat4> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn sub(self, rhs: &DMat4) -> DMat4 {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<DMat4> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn sub(self, rhs: DMat4) -> DMat4 {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for DMat4 {
#[inline]
fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat4(&rhs);
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for DMat4 {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1260,18 +1415,62 @@
}
}
-impl Mul<DMat4> for DMat4 {
- type Output = Self;
+impl Neg for &DMat4 {
+ type Output = DMat4;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat4(&rhs)
+ fn neg(self) -> DMat4 {
+ (*self).neg()
}
}
-impl MulAssign<DMat4> for DMat4 {
+impl Mul for DMat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: Self) -> Self {
+ Self::from_cols(
+ self.mul(rhs.x_axis),
+ self.mul(rhs.y_axis),
+ self.mul(rhs.z_axis),
+ self.mul(rhs.w_axis),
+ )
+ }
+}
+
+impl Mul<&Self> for DMat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DMat4> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: &DMat4) -> DMat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DMat4> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: DMat4) -> DMat4 {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for DMat4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat4(&rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for DMat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1283,6 +1482,30 @@
}
}
+impl Mul<&DVec4> for DMat4 {
+ type Output = DVec4;
+ #[inline]
+ fn mul(self, rhs: &DVec4) -> DVec4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DVec4> for &DMat4 {
+ type Output = DVec4;
+ #[inline]
+ fn mul(self, rhs: &DVec4) -> DVec4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DVec4> for &DMat4 {
+ type Output = DVec4;
+ #[inline]
+ fn mul(self, rhs: DVec4) -> DVec4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<DMat4> for f64 {
type Output = DMat4;
#[inline]
@@ -1291,18 +1514,73 @@
}
}
+impl Mul<&DMat4> for f64 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: &DMat4) -> DMat4 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DMat4> for &f64 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: &DMat4) -> DMat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DMat4> for &f64 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: DMat4) -> DMat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl Mul<f64> for DMat4 {
type Output = Self;
#[inline]
- fn mul(self, rhs: f64) -> Self::Output {
+ fn mul(self, rhs: f64) -> Self {
self.mul_scalar(rhs)
}
}
+impl Mul<&f64> for DMat4 {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f64) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f64> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: &f64) -> DMat4 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f64> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn mul(self, rhs: f64) -> DMat4 {
+ (*self).mul(rhs)
+ }
+}
+
impl MulAssign<f64> for DMat4 {
#[inline]
fn mul_assign(&mut self, rhs: f64) {
- *self = self.mul_scalar(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f64> for DMat4 {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f64) {
+ self.mul_assign(*rhs);
}
}
@@ -1314,18 +1592,73 @@
}
}
+impl Div<&DMat4> for f64 {
+ type Output = DMat4;
+ #[inline]
+ fn div(self, rhs: &DMat4) -> DMat4 {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&DMat4> for &f64 {
+ type Output = DMat4;
+ #[inline]
+ fn div(self, rhs: &DMat4) -> DMat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<DMat4> for &f64 {
+ type Output = DMat4;
+ #[inline]
+ fn div(self, rhs: DMat4) -> DMat4 {
+ (*self).div(rhs)
+ }
+}
+
impl Div<f64> for DMat4 {
type Output = Self;
#[inline]
- fn div(self, rhs: f64) -> Self::Output {
+ fn div(self, rhs: f64) -> Self {
self.div_scalar(rhs)
}
}
+impl Div<&f64> for DMat4 {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f64) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f64> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn div(self, rhs: &f64) -> DMat4 {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f64> for &DMat4 {
+ type Output = DMat4;
+ #[inline]
+ fn div(self, rhs: f64) -> DMat4 {
+ (*self).div(rhs)
+ }
+}
+
impl DivAssign<f64> for DMat4 {
#[inline]
fn div_assign(&mut self, rhs: f64) {
- *self = self.div_scalar(rhs);
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f64> for DMat4 {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f64) {
+ self.div_assign(*rhs);
}
}
diff --git a/crates/glam/src/f64/dquat.rs b/crates/glam/src/f64/dquat.rs
index 2b1d76d..ee530ea 100644
--- a/crates/glam/src/f64/dquat.rs
+++ b/crates/glam/src/f64/dquat.rs
@@ -8,7 +8,7 @@
use core::fmt;
use core::iter::{Product, Sum};
-use core::ops::{Add, Div, Mul, MulAssign, Neg, Sub};
+use core::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign};
/// Creates a quaternion from `x`, `y`, `z` and `w` values.
///
@@ -26,6 +26,7 @@
/// floating point "error creep" which can occur when successive quaternion
/// operations are applied.
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct DQuat {
@@ -437,6 +438,7 @@
///
/// Will panic if `up` is not normalized when `glam_assert` is enabled.
#[inline]
+ #[must_use]
pub fn look_at_rh(eye: DVec3, center: DVec3, up: DVec3) -> Self {
Self::look_to_rh(center.sub(eye).normalize(), up)
}
@@ -823,7 +825,7 @@
}
}
-impl Add<DQuat> for DQuat {
+impl Add for DQuat {
type Output = Self;
/// Adds two quaternions.
///
@@ -837,7 +839,45 @@
}
}
-impl Sub<DQuat> for DQuat {
+impl Add<&Self> for DQuat {
+ type Output = Self;
+ #[inline]
+ fn add(self, rhs: &Self) -> Self {
+ self.add(*rhs)
+ }
+}
+
+impl Add<&DQuat> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn add(self, rhs: &DQuat) -> DQuat {
+ (*self).add(*rhs)
+ }
+}
+
+impl Add<DQuat> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn add(self, rhs: DQuat) -> DQuat {
+ (*self).add(rhs)
+ }
+}
+
+impl AddAssign for DQuat {
+ #[inline]
+ fn add_assign(&mut self, rhs: Self) {
+ *self = self.add(rhs);
+ }
+}
+
+impl AddAssign<&Self> for DQuat {
+ #[inline]
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
+ }
+}
+
+impl Sub for DQuat {
type Output = Self;
/// Subtracts the `rhs` quaternion from `self`.
///
@@ -848,6 +888,44 @@
}
}
+impl Sub<&Self> for DQuat {
+ type Output = Self;
+ #[inline]
+ fn sub(self, rhs: &Self) -> Self {
+ self.sub(*rhs)
+ }
+}
+
+impl Sub<&DQuat> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn sub(self, rhs: &DQuat) -> DQuat {
+ (*self).sub(*rhs)
+ }
+}
+
+impl Sub<DQuat> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn sub(self, rhs: DQuat) -> DQuat {
+ (*self).sub(rhs)
+ }
+}
+
+impl SubAssign for DQuat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: Self) {
+ *self = self.sub(rhs);
+ }
+}
+
+impl SubAssign<&Self> for DQuat {
+ #[inline]
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
+ }
+}
+
impl Mul<f64> for DQuat {
type Output = Self;
/// Multiplies a quaternion by a scalar value.
@@ -859,6 +937,44 @@
}
}
+impl Mul<&f64> for DQuat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &f64) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&f64> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn mul(self, rhs: &f64) -> DQuat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<f64> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn mul(self, rhs: f64) -> DQuat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign<f64> for DQuat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: f64) {
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&f64> for DQuat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &f64) {
+ self.mul_assign(*rhs);
+ }
+}
+
impl Div<f64> for DQuat {
type Output = Self;
/// Divides a quaternion by a scalar value.
@@ -869,7 +985,45 @@
}
}
-impl Mul<DQuat> for DQuat {
+impl Div<&f64> for DQuat {
+ type Output = Self;
+ #[inline]
+ fn div(self, rhs: &f64) -> Self {
+ self.div(*rhs)
+ }
+}
+
+impl Div<&f64> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn div(self, rhs: &f64) -> DQuat {
+ (*self).div(*rhs)
+ }
+}
+
+impl Div<f64> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn div(self, rhs: f64) -> DQuat {
+ (*self).div(rhs)
+ }
+}
+
+impl DivAssign<f64> for DQuat {
+ #[inline]
+ fn div_assign(&mut self, rhs: f64) {
+ *self = self.div(rhs);
+ }
+}
+
+impl DivAssign<&f64> for DQuat {
+ #[inline]
+ fn div_assign(&mut self, rhs: &f64) {
+ self.div_assign(*rhs);
+ }
+}
+
+impl Mul for DQuat {
type Output = Self;
/// Multiplies two quaternions. If they each represent a rotation, the result will
/// represent the combined rotation.
@@ -886,19 +1040,41 @@
}
}
-impl MulAssign<DQuat> for DQuat {
- /// Multiplies two quaternions. If they each represent a rotation, the result will
- /// represent the combined rotation.
- ///
- /// Note that due to floating point rounding the result may not be perfectly
- /// normalized.
- ///
- /// # Panics
- ///
- /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.
+impl Mul<&Self> for DQuat {
+ type Output = Self;
+ #[inline]
+ fn mul(self, rhs: &Self) -> Self {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DQuat> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn mul(self, rhs: &DQuat) -> DQuat {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DQuat> for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn mul(self, rhs: DQuat) -> DQuat {
+ (*self).mul(rhs)
+ }
+}
+
+impl MulAssign for DQuat {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_quat(rhs);
+ *self = self.mul(rhs);
+ }
+}
+
+impl MulAssign<&Self> for DQuat {
+ #[inline]
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -915,6 +1091,30 @@
}
}
+impl Mul<&DVec3> for DQuat {
+ type Output = DVec3;
+ #[inline]
+ fn mul(self, rhs: &DVec3) -> DVec3 {
+ self.mul(*rhs)
+ }
+}
+
+impl Mul<&DVec3> for &DQuat {
+ type Output = DVec3;
+ #[inline]
+ fn mul(self, rhs: &DVec3) -> DVec3 {
+ (*self).mul(*rhs)
+ }
+}
+
+impl Mul<DVec3> for &DQuat {
+ type Output = DVec3;
+ #[inline]
+ fn mul(self, rhs: DVec3) -> DVec3 {
+ (*self).mul(rhs)
+ }
+}
+
impl Neg for DQuat {
type Output = Self;
#[inline]
@@ -923,6 +1123,14 @@
}
}
+impl Neg for &DQuat {
+ type Output = DQuat;
+ #[inline]
+ fn neg(self) -> DQuat {
+ (*self).neg()
+ }
+}
+
impl Default for DQuat {
#[inline]
fn default() -> Self {
diff --git a/crates/glam/src/f64/dvec2.rs b/crates/glam/src/f64/dvec2.rs
index cf99d6d..e1767e3 100644
--- a/crates/glam/src/f64/dvec2.rs
+++ b/crates/glam/src/f64/dvec2.rs
@@ -15,6 +15,7 @@
/// A 2-dimensional vector.
#[derive(Clone, Copy, PartialEq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -424,6 +425,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec2 {
BVec2::new(self.x.is_finite(), self.y.is_finite())
}
@@ -1081,7 +1084,7 @@
}
}
-impl Div<DVec2> for DVec2 {
+impl Div for DVec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1092,10 +1095,10 @@
}
}
-impl Div<&DVec2> for DVec2 {
- type Output = DVec2;
+impl Div<&Self> for DVec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &DVec2) -> DVec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1116,7 +1119,7 @@
}
}
-impl DivAssign<DVec2> for DVec2 {
+impl DivAssign for DVec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1124,10 +1127,10 @@
}
}
-impl DivAssign<&DVec2> for DVec2 {
+impl DivAssign<&Self> for DVec2 {
#[inline]
- fn div_assign(&mut self, rhs: &DVec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1143,9 +1146,9 @@
}
impl Div<&f64> for DVec2 {
- type Output = DVec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f64) -> DVec2 {
+ fn div(self, rhs: &f64) -> Self {
self.div(*rhs)
}
}
@@ -1177,7 +1180,7 @@
impl DivAssign<&f64> for DVec2 {
#[inline]
fn div_assign(&mut self, rhs: &f64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1216,7 +1219,7 @@
}
}
-impl Mul<DVec2> for DVec2 {
+impl Mul for DVec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1227,10 +1230,10 @@
}
}
-impl Mul<&DVec2> for DVec2 {
- type Output = DVec2;
+impl Mul<&Self> for DVec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &DVec2) -> DVec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1251,7 +1254,7 @@
}
}
-impl MulAssign<DVec2> for DVec2 {
+impl MulAssign for DVec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1259,10 +1262,10 @@
}
}
-impl MulAssign<&DVec2> for DVec2 {
+impl MulAssign<&Self> for DVec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &DVec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1278,9 +1281,9 @@
}
impl Mul<&f64> for DVec2 {
- type Output = DVec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f64) -> DVec2 {
+ fn mul(self, rhs: &f64) -> Self {
self.mul(*rhs)
}
}
@@ -1312,7 +1315,7 @@
impl MulAssign<&f64> for DVec2 {
#[inline]
fn mul_assign(&mut self, rhs: &f64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1351,7 +1354,7 @@
}
}
-impl Add<DVec2> for DVec2 {
+impl Add for DVec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1362,10 +1365,10 @@
}
}
-impl Add<&DVec2> for DVec2 {
- type Output = DVec2;
+impl Add<&Self> for DVec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &DVec2) -> DVec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1386,7 +1389,7 @@
}
}
-impl AddAssign<DVec2> for DVec2 {
+impl AddAssign for DVec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1394,10 +1397,10 @@
}
}
-impl AddAssign<&DVec2> for DVec2 {
+impl AddAssign<&Self> for DVec2 {
#[inline]
- fn add_assign(&mut self, rhs: &DVec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1413,9 +1416,9 @@
}
impl Add<&f64> for DVec2 {
- type Output = DVec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f64) -> DVec2 {
+ fn add(self, rhs: &f64) -> Self {
self.add(*rhs)
}
}
@@ -1447,7 +1450,7 @@
impl AddAssign<&f64> for DVec2 {
#[inline]
fn add_assign(&mut self, rhs: &f64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1486,7 +1489,7 @@
}
}
-impl Sub<DVec2> for DVec2 {
+impl Sub for DVec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1497,10 +1500,10 @@
}
}
-impl Sub<&DVec2> for DVec2 {
- type Output = DVec2;
+impl Sub<&Self> for DVec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &DVec2) -> DVec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1521,18 +1524,18 @@
}
}
-impl SubAssign<DVec2> for DVec2 {
+impl SubAssign for DVec2 {
#[inline]
- fn sub_assign(&mut self, rhs: DVec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&DVec2> for DVec2 {
+impl SubAssign<&Self> for DVec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &DVec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1548,9 +1551,9 @@
}
impl Sub<&f64> for DVec2 {
- type Output = DVec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f64) -> DVec2 {
+ fn sub(self, rhs: &f64) -> Self {
self.sub(*rhs)
}
}
@@ -1582,7 +1585,7 @@
impl SubAssign<&f64> for DVec2 {
#[inline]
fn sub_assign(&mut self, rhs: &f64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1621,7 +1624,7 @@
}
}
-impl Rem<DVec2> for DVec2 {
+impl Rem for DVec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1632,10 +1635,10 @@
}
}
-impl Rem<&DVec2> for DVec2 {
- type Output = DVec2;
+impl Rem<&Self> for DVec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &DVec2) -> DVec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1656,7 +1659,7 @@
}
}
-impl RemAssign<DVec2> for DVec2 {
+impl RemAssign for DVec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1664,10 +1667,10 @@
}
}
-impl RemAssign<&DVec2> for DVec2 {
+impl RemAssign<&Self> for DVec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &DVec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1683,9 +1686,9 @@
}
impl Rem<&f64> for DVec2 {
- type Output = DVec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f64) -> DVec2 {
+ fn rem(self, rhs: &f64) -> Self {
self.rem(*rhs)
}
}
@@ -1717,7 +1720,7 @@
impl RemAssign<&f64> for DVec2 {
#[inline]
fn rem_assign(&mut self, rhs: &f64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1760,7 +1763,7 @@
impl AsRef<[f64; 2]> for DVec2 {
#[inline]
fn as_ref(&self) -> &[f64; 2] {
- unsafe { &*(self as *const DVec2 as *const [f64; 2]) }
+ unsafe { &*(self as *const Self as *const [f64; 2]) }
}
}
@@ -1768,7 +1771,7 @@
impl AsMut<[f64; 2]> for DVec2 {
#[inline]
fn as_mut(&mut self) -> &mut [f64; 2] {
- unsafe { &mut *(self as *mut DVec2 as *mut [f64; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [f64; 2]) }
}
}
diff --git a/crates/glam/src/f64/dvec3.rs b/crates/glam/src/f64/dvec3.rs
index 4998194..0736a3b 100644
--- a/crates/glam/src/f64/dvec3.rs
+++ b/crates/glam/src/f64/dvec3.rs
@@ -15,6 +15,7 @@
/// A 3-dimensional vector.
#[derive(Clone, Copy, PartialEq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct DVec3 {
@@ -489,6 +490,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec3 {
BVec3::new(self.x.is_finite(), self.y.is_finite(), self.z.is_finite())
}
@@ -1202,7 +1205,7 @@
}
}
-impl Div<DVec3> for DVec3 {
+impl Div for DVec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1214,10 +1217,10 @@
}
}
-impl Div<&DVec3> for DVec3 {
- type Output = DVec3;
+impl Div<&Self> for DVec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &DVec3) -> DVec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1238,7 +1241,7 @@
}
}
-impl DivAssign<DVec3> for DVec3 {
+impl DivAssign for DVec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1247,10 +1250,10 @@
}
}
-impl DivAssign<&DVec3> for DVec3 {
+impl DivAssign<&Self> for DVec3 {
#[inline]
- fn div_assign(&mut self, rhs: &DVec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1267,9 +1270,9 @@
}
impl Div<&f64> for DVec3 {
- type Output = DVec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f64) -> DVec3 {
+ fn div(self, rhs: &f64) -> Self {
self.div(*rhs)
}
}
@@ -1302,7 +1305,7 @@
impl DivAssign<&f64> for DVec3 {
#[inline]
fn div_assign(&mut self, rhs: &f64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1342,7 +1345,7 @@
}
}
-impl Mul<DVec3> for DVec3 {
+impl Mul for DVec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1354,10 +1357,10 @@
}
}
-impl Mul<&DVec3> for DVec3 {
- type Output = DVec3;
+impl Mul<&Self> for DVec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &DVec3) -> DVec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1378,7 +1381,7 @@
}
}
-impl MulAssign<DVec3> for DVec3 {
+impl MulAssign for DVec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1387,10 +1390,10 @@
}
}
-impl MulAssign<&DVec3> for DVec3 {
+impl MulAssign<&Self> for DVec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &DVec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1407,9 +1410,9 @@
}
impl Mul<&f64> for DVec3 {
- type Output = DVec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f64) -> DVec3 {
+ fn mul(self, rhs: &f64) -> Self {
self.mul(*rhs)
}
}
@@ -1442,7 +1445,7 @@
impl MulAssign<&f64> for DVec3 {
#[inline]
fn mul_assign(&mut self, rhs: &f64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1482,7 +1485,7 @@
}
}
-impl Add<DVec3> for DVec3 {
+impl Add for DVec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1494,10 +1497,10 @@
}
}
-impl Add<&DVec3> for DVec3 {
- type Output = DVec3;
+impl Add<&Self> for DVec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &DVec3) -> DVec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1518,7 +1521,7 @@
}
}
-impl AddAssign<DVec3> for DVec3 {
+impl AddAssign for DVec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1527,10 +1530,10 @@
}
}
-impl AddAssign<&DVec3> for DVec3 {
+impl AddAssign<&Self> for DVec3 {
#[inline]
- fn add_assign(&mut self, rhs: &DVec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1547,9 +1550,9 @@
}
impl Add<&f64> for DVec3 {
- type Output = DVec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f64) -> DVec3 {
+ fn add(self, rhs: &f64) -> Self {
self.add(*rhs)
}
}
@@ -1582,7 +1585,7 @@
impl AddAssign<&f64> for DVec3 {
#[inline]
fn add_assign(&mut self, rhs: &f64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1622,7 +1625,7 @@
}
}
-impl Sub<DVec3> for DVec3 {
+impl Sub for DVec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1634,10 +1637,10 @@
}
}
-impl Sub<&DVec3> for DVec3 {
- type Output = DVec3;
+impl Sub<&Self> for DVec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &DVec3) -> DVec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1658,19 +1661,19 @@
}
}
-impl SubAssign<DVec3> for DVec3 {
+impl SubAssign for DVec3 {
#[inline]
- fn sub_assign(&mut self, rhs: DVec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&DVec3> for DVec3 {
+impl SubAssign<&Self> for DVec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &DVec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1687,9 +1690,9 @@
}
impl Sub<&f64> for DVec3 {
- type Output = DVec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f64) -> DVec3 {
+ fn sub(self, rhs: &f64) -> Self {
self.sub(*rhs)
}
}
@@ -1722,7 +1725,7 @@
impl SubAssign<&f64> for DVec3 {
#[inline]
fn sub_assign(&mut self, rhs: &f64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1762,7 +1765,7 @@
}
}
-impl Rem<DVec3> for DVec3 {
+impl Rem for DVec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1774,10 +1777,10 @@
}
}
-impl Rem<&DVec3> for DVec3 {
- type Output = DVec3;
+impl Rem<&Self> for DVec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &DVec3) -> DVec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1798,7 +1801,7 @@
}
}
-impl RemAssign<DVec3> for DVec3 {
+impl RemAssign for DVec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1807,10 +1810,10 @@
}
}
-impl RemAssign<&DVec3> for DVec3 {
+impl RemAssign<&Self> for DVec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &DVec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1827,9 +1830,9 @@
}
impl Rem<&f64> for DVec3 {
- type Output = DVec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f64) -> DVec3 {
+ fn rem(self, rhs: &f64) -> Self {
self.rem(*rhs)
}
}
@@ -1862,7 +1865,7 @@
impl RemAssign<&f64> for DVec3 {
#[inline]
fn rem_assign(&mut self, rhs: &f64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1906,7 +1909,7 @@
impl AsRef<[f64; 3]> for DVec3 {
#[inline]
fn as_ref(&self) -> &[f64; 3] {
- unsafe { &*(self as *const DVec3 as *const [f64; 3]) }
+ unsafe { &*(self as *const Self as *const [f64; 3]) }
}
}
@@ -1914,7 +1917,7 @@
impl AsMut<[f64; 3]> for DVec3 {
#[inline]
fn as_mut(&mut self) -> &mut [f64; 3] {
- unsafe { &mut *(self as *mut DVec3 as *mut [f64; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [f64; 3]) }
}
}
diff --git a/crates/glam/src/f64/dvec4.rs b/crates/glam/src/f64/dvec4.rs
index 75d537d..3582a8f 100644
--- a/crates/glam/src/f64/dvec4.rs
+++ b/crates/glam/src/f64/dvec4.rs
@@ -17,6 +17,7 @@
/// A 4-dimensional vector.
#[derive(Clone, Copy, PartialEq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -530,6 +531,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> BVec4 {
BVec4::new(
self.x.is_finite(),
@@ -1137,7 +1140,7 @@
}
}
-impl Div<DVec4> for DVec4 {
+impl Div for DVec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -1150,10 +1153,10 @@
}
}
-impl Div<&DVec4> for DVec4 {
- type Output = DVec4;
+impl Div<&Self> for DVec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &DVec4) -> DVec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1174,7 +1177,7 @@
}
}
-impl DivAssign<DVec4> for DVec4 {
+impl DivAssign for DVec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1184,10 +1187,10 @@
}
}
-impl DivAssign<&DVec4> for DVec4 {
+impl DivAssign<&Self> for DVec4 {
#[inline]
- fn div_assign(&mut self, rhs: &DVec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1205,9 +1208,9 @@
}
impl Div<&f64> for DVec4 {
- type Output = DVec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &f64) -> DVec4 {
+ fn div(self, rhs: &f64) -> Self {
self.div(*rhs)
}
}
@@ -1241,7 +1244,7 @@
impl DivAssign<&f64> for DVec4 {
#[inline]
fn div_assign(&mut self, rhs: &f64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1282,7 +1285,7 @@
}
}
-impl Mul<DVec4> for DVec4 {
+impl Mul for DVec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1295,10 +1298,10 @@
}
}
-impl Mul<&DVec4> for DVec4 {
- type Output = DVec4;
+impl Mul<&Self> for DVec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &DVec4) -> DVec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1319,7 +1322,7 @@
}
}
-impl MulAssign<DVec4> for DVec4 {
+impl MulAssign for DVec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1329,10 +1332,10 @@
}
}
-impl MulAssign<&DVec4> for DVec4 {
+impl MulAssign<&Self> for DVec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &DVec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1350,9 +1353,9 @@
}
impl Mul<&f64> for DVec4 {
- type Output = DVec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &f64) -> DVec4 {
+ fn mul(self, rhs: &f64) -> Self {
self.mul(*rhs)
}
}
@@ -1386,7 +1389,7 @@
impl MulAssign<&f64> for DVec4 {
#[inline]
fn mul_assign(&mut self, rhs: &f64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1427,7 +1430,7 @@
}
}
-impl Add<DVec4> for DVec4 {
+impl Add for DVec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1440,10 +1443,10 @@
}
}
-impl Add<&DVec4> for DVec4 {
- type Output = DVec4;
+impl Add<&Self> for DVec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &DVec4) -> DVec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1464,7 +1467,7 @@
}
}
-impl AddAssign<DVec4> for DVec4 {
+impl AddAssign for DVec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1474,10 +1477,10 @@
}
}
-impl AddAssign<&DVec4> for DVec4 {
+impl AddAssign<&Self> for DVec4 {
#[inline]
- fn add_assign(&mut self, rhs: &DVec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1495,9 +1498,9 @@
}
impl Add<&f64> for DVec4 {
- type Output = DVec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &f64) -> DVec4 {
+ fn add(self, rhs: &f64) -> Self {
self.add(*rhs)
}
}
@@ -1531,7 +1534,7 @@
impl AddAssign<&f64> for DVec4 {
#[inline]
fn add_assign(&mut self, rhs: &f64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1572,7 +1575,7 @@
}
}
-impl Sub<DVec4> for DVec4 {
+impl Sub for DVec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1585,10 +1588,10 @@
}
}
-impl Sub<&DVec4> for DVec4 {
- type Output = DVec4;
+impl Sub<&Self> for DVec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &DVec4) -> DVec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1609,9 +1612,9 @@
}
}
-impl SubAssign<DVec4> for DVec4 {
+impl SubAssign for DVec4 {
#[inline]
- fn sub_assign(&mut self, rhs: DVec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1619,10 +1622,10 @@
}
}
-impl SubAssign<&DVec4> for DVec4 {
+impl SubAssign<&Self> for DVec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &DVec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1640,9 +1643,9 @@
}
impl Sub<&f64> for DVec4 {
- type Output = DVec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &f64) -> DVec4 {
+ fn sub(self, rhs: &f64) -> Self {
self.sub(*rhs)
}
}
@@ -1676,7 +1679,7 @@
impl SubAssign<&f64> for DVec4 {
#[inline]
fn sub_assign(&mut self, rhs: &f64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1717,7 +1720,7 @@
}
}
-impl Rem<DVec4> for DVec4 {
+impl Rem for DVec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1730,10 +1733,10 @@
}
}
-impl Rem<&DVec4> for DVec4 {
- type Output = DVec4;
+impl Rem<&Self> for DVec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &DVec4) -> DVec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1754,7 +1757,7 @@
}
}
-impl RemAssign<DVec4> for DVec4 {
+impl RemAssign for DVec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1764,10 +1767,10 @@
}
}
-impl RemAssign<&DVec4> for DVec4 {
+impl RemAssign<&Self> for DVec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &DVec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1785,9 +1788,9 @@
}
impl Rem<&f64> for DVec4 {
- type Output = DVec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &f64) -> DVec4 {
+ fn rem(self, rhs: &f64) -> Self {
self.rem(*rhs)
}
}
@@ -1821,7 +1824,7 @@
impl RemAssign<&f64> for DVec4 {
#[inline]
fn rem_assign(&mut self, rhs: &f64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1866,7 +1869,7 @@
impl AsRef<[f64; 4]> for DVec4 {
#[inline]
fn as_ref(&self) -> &[f64; 4] {
- unsafe { &*(self as *const DVec4 as *const [f64; 4]) }
+ unsafe { &*(self as *const Self as *const [f64; 4]) }
}
}
@@ -1874,7 +1877,7 @@
impl AsMut<[f64; 4]> for DVec4 {
#[inline]
fn as_mut(&mut self) -> &mut [f64; 4] {
- unsafe { &mut *(self as *mut DVec4 as *mut [f64; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [f64; 4]) }
}
}
diff --git a/crates/glam/src/f64/float.rs b/crates/glam/src/f64/float.rs
index dc63da8..8025aa6 100644
--- a/crates/glam/src/f64/float.rs
+++ b/crates/glam/src/f64/float.rs
@@ -4,23 +4,23 @@
impl FloatExt for f64 {
#[inline]
- fn lerp(self, rhs: f64, t: f64) -> f64 {
+ fn lerp(self, rhs: Self, t: Self) -> Self {
self + (rhs - self) * t
}
#[inline]
- fn inverse_lerp(a: f64, b: f64, v: f64) -> f64 {
+ fn inverse_lerp(a: Self, b: Self, v: Self) -> Self {
(v - a) / (b - a)
}
#[inline]
- fn remap(self, in_start: f64, in_end: f64, out_start: f64, out_end: f64) -> f64 {
- let t = f64::inverse_lerp(in_start, in_end, self);
- f64::lerp(out_start, out_end, t)
+ fn remap(self, in_start: Self, in_end: Self, out_start: Self, out_end: Self) -> Self {
+ let t = Self::inverse_lerp(in_start, in_end, self);
+ Self::lerp(out_start, out_end, t)
}
#[inline]
- fn fract_gl(self) -> f64 {
+ fn fract_gl(self) -> Self {
self - crate::f64::math::floor(self)
}
}
diff --git a/crates/glam/src/features/impl_bytemuck.rs b/crates/glam/src/features/impl_bytemuck.rs
index da4a340..aa7583b 100644
--- a/crates/glam/src/features/impl_bytemuck.rs
+++ b/crates/glam/src/features/impl_bytemuck.rs
@@ -1,116 +1,3 @@
-use crate::{
- Affine2, Affine3A, DAffine2, DAffine3, DMat2, DMat3, DMat4, DQuat, DVec2, DVec3, DVec4,
- I16Vec2, I16Vec3, I16Vec4, I64Vec2, I64Vec3, I64Vec4, I8Vec2, I8Vec3, I8Vec4, IVec2, IVec3,
- IVec4, Mat2, Mat3, Mat3A, Mat4, Quat, U16Vec2, U16Vec3, U16Vec4, U64Vec2, U64Vec3, U64Vec4,
- U8Vec2, U8Vec3, U8Vec4, UVec2, UVec3, UVec4, Vec2, Vec3, Vec3A, Vec4,
-};
-use bytemuck::{AnyBitPattern, Pod, Zeroable};
-
-// Affine2 contains internal padding due to Mat2 using SIMD
-unsafe impl AnyBitPattern for Affine2 {}
-unsafe impl Zeroable for Affine2 {}
-unsafe impl AnyBitPattern for Affine3A {}
-unsafe impl Zeroable for Affine3A {}
-
-unsafe impl Pod for Mat2 {}
-unsafe impl Zeroable for Mat2 {}
-unsafe impl Pod for Mat3 {}
-unsafe impl Zeroable for Mat3 {}
-unsafe impl AnyBitPattern for Mat3A {}
-unsafe impl Zeroable for Mat3A {}
-unsafe impl Pod for Mat4 {}
-unsafe impl Zeroable for Mat4 {}
-
-unsafe impl Pod for Quat {}
-unsafe impl Zeroable for Quat {}
-
-unsafe impl Pod for Vec2 {}
-unsafe impl Zeroable for Vec2 {}
-unsafe impl Pod for Vec3 {}
-unsafe impl Zeroable for Vec3 {}
-unsafe impl AnyBitPattern for Vec3A {}
-unsafe impl Zeroable for Vec3A {}
-unsafe impl Pod for Vec4 {}
-unsafe impl Zeroable for Vec4 {}
-
-unsafe impl Pod for DAffine2 {}
-unsafe impl Zeroable for DAffine2 {}
-unsafe impl Pod for DAffine3 {}
-unsafe impl Zeroable for DAffine3 {}
-
-unsafe impl Pod for DMat2 {}
-unsafe impl Zeroable for DMat2 {}
-unsafe impl Pod for DMat3 {}
-unsafe impl Zeroable for DMat3 {}
-unsafe impl Pod for DMat4 {}
-unsafe impl Zeroable for DMat4 {}
-
-unsafe impl Pod for DQuat {}
-unsafe impl Zeroable for DQuat {}
-
-unsafe impl Pod for DVec2 {}
-unsafe impl Zeroable for DVec2 {}
-unsafe impl Pod for DVec3 {}
-unsafe impl Zeroable for DVec3 {}
-unsafe impl Pod for DVec4 {}
-unsafe impl Zeroable for DVec4 {}
-
-unsafe impl Pod for I8Vec2 {}
-unsafe impl Zeroable for I8Vec2 {}
-unsafe impl Pod for I8Vec3 {}
-unsafe impl Zeroable for I8Vec3 {}
-unsafe impl Pod for I8Vec4 {}
-unsafe impl Zeroable for I8Vec4 {}
-
-unsafe impl Pod for U8Vec2 {}
-unsafe impl Zeroable for U8Vec2 {}
-unsafe impl Pod for U8Vec3 {}
-unsafe impl Zeroable for U8Vec3 {}
-unsafe impl Pod for U8Vec4 {}
-unsafe impl Zeroable for U8Vec4 {}
-
-unsafe impl Pod for I16Vec2 {}
-unsafe impl Zeroable for I16Vec2 {}
-unsafe impl Pod for I16Vec3 {}
-unsafe impl Zeroable for I16Vec3 {}
-unsafe impl Pod for I16Vec4 {}
-unsafe impl Zeroable for I16Vec4 {}
-
-unsafe impl Pod for U16Vec2 {}
-unsafe impl Zeroable for U16Vec2 {}
-unsafe impl Pod for U16Vec3 {}
-unsafe impl Zeroable for U16Vec3 {}
-unsafe impl Pod for U16Vec4 {}
-unsafe impl Zeroable for U16Vec4 {}
-
-unsafe impl Pod for IVec2 {}
-unsafe impl Zeroable for IVec2 {}
-unsafe impl Pod for IVec3 {}
-unsafe impl Zeroable for IVec3 {}
-unsafe impl Pod for IVec4 {}
-unsafe impl Zeroable for IVec4 {}
-
-unsafe impl Pod for UVec2 {}
-unsafe impl Zeroable for UVec2 {}
-unsafe impl Pod for UVec3 {}
-unsafe impl Zeroable for UVec3 {}
-unsafe impl Pod for UVec4 {}
-unsafe impl Zeroable for UVec4 {}
-
-unsafe impl Pod for I64Vec2 {}
-unsafe impl Zeroable for I64Vec2 {}
-unsafe impl Pod for I64Vec3 {}
-unsafe impl Zeroable for I64Vec3 {}
-unsafe impl Pod for I64Vec4 {}
-unsafe impl Zeroable for I64Vec4 {}
-
-unsafe impl Pod for U64Vec2 {}
-unsafe impl Zeroable for U64Vec2 {}
-unsafe impl Pod for U64Vec3 {}
-unsafe impl Zeroable for U64Vec3 {}
-unsafe impl Pod for U64Vec4 {}
-unsafe impl Zeroable for U64Vec4 {}
-
#[cfg(test)]
mod test {
use crate::{
diff --git a/crates/glam/src/i16/i16vec2.rs b/crates/glam/src/i16/i16vec2.rs
index b9b96c5..9546102 100644
--- a/crates/glam/src/i16/i16vec2.rs
+++ b/crates/glam/src/i16/i16vec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(4)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -416,8 +417,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u16 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> u16 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -427,9 +428,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u16> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u16> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -437,9 +438,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u16 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u16 {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -808,7 +809,7 @@
}
}
-impl Div<I16Vec2> for I16Vec2 {
+impl Div for I16Vec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -819,10 +820,10 @@
}
}
-impl Div<&I16Vec2> for I16Vec2 {
- type Output = I16Vec2;
+impl Div<&Self> for I16Vec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I16Vec2) -> I16Vec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -843,7 +844,7 @@
}
}
-impl DivAssign<I16Vec2> for I16Vec2 {
+impl DivAssign for I16Vec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -851,10 +852,10 @@
}
}
-impl DivAssign<&I16Vec2> for I16Vec2 {
+impl DivAssign<&Self> for I16Vec2 {
#[inline]
- fn div_assign(&mut self, rhs: &I16Vec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -870,9 +871,9 @@
}
impl Div<&i16> for I16Vec2 {
- type Output = I16Vec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i16) -> I16Vec2 {
+ fn div(self, rhs: &i16) -> Self {
self.div(*rhs)
}
}
@@ -904,7 +905,7 @@
impl DivAssign<&i16> for I16Vec2 {
#[inline]
fn div_assign(&mut self, rhs: &i16) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -943,7 +944,7 @@
}
}
-impl Mul<I16Vec2> for I16Vec2 {
+impl Mul for I16Vec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -954,10 +955,10 @@
}
}
-impl Mul<&I16Vec2> for I16Vec2 {
- type Output = I16Vec2;
+impl Mul<&Self> for I16Vec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I16Vec2) -> I16Vec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -978,7 +979,7 @@
}
}
-impl MulAssign<I16Vec2> for I16Vec2 {
+impl MulAssign for I16Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -986,10 +987,10 @@
}
}
-impl MulAssign<&I16Vec2> for I16Vec2 {
+impl MulAssign<&Self> for I16Vec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &I16Vec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1005,9 +1006,9 @@
}
impl Mul<&i16> for I16Vec2 {
- type Output = I16Vec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i16) -> I16Vec2 {
+ fn mul(self, rhs: &i16) -> Self {
self.mul(*rhs)
}
}
@@ -1039,7 +1040,7 @@
impl MulAssign<&i16> for I16Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: &i16) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1078,7 +1079,7 @@
}
}
-impl Add<I16Vec2> for I16Vec2 {
+impl Add for I16Vec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1089,10 +1090,10 @@
}
}
-impl Add<&I16Vec2> for I16Vec2 {
- type Output = I16Vec2;
+impl Add<&Self> for I16Vec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I16Vec2) -> I16Vec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1113,7 +1114,7 @@
}
}
-impl AddAssign<I16Vec2> for I16Vec2 {
+impl AddAssign for I16Vec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1121,10 +1122,10 @@
}
}
-impl AddAssign<&I16Vec2> for I16Vec2 {
+impl AddAssign<&Self> for I16Vec2 {
#[inline]
- fn add_assign(&mut self, rhs: &I16Vec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1140,9 +1141,9 @@
}
impl Add<&i16> for I16Vec2 {
- type Output = I16Vec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i16) -> I16Vec2 {
+ fn add(self, rhs: &i16) -> Self {
self.add(*rhs)
}
}
@@ -1174,7 +1175,7 @@
impl AddAssign<&i16> for I16Vec2 {
#[inline]
fn add_assign(&mut self, rhs: &i16) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1213,7 +1214,7 @@
}
}
-impl Sub<I16Vec2> for I16Vec2 {
+impl Sub for I16Vec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1224,10 +1225,10 @@
}
}
-impl Sub<&I16Vec2> for I16Vec2 {
- type Output = I16Vec2;
+impl Sub<&Self> for I16Vec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I16Vec2) -> I16Vec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1248,18 +1249,18 @@
}
}
-impl SubAssign<I16Vec2> for I16Vec2 {
+impl SubAssign for I16Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: I16Vec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&I16Vec2> for I16Vec2 {
+impl SubAssign<&Self> for I16Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &I16Vec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1275,9 +1276,9 @@
}
impl Sub<&i16> for I16Vec2 {
- type Output = I16Vec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i16) -> I16Vec2 {
+ fn sub(self, rhs: &i16) -> Self {
self.sub(*rhs)
}
}
@@ -1309,7 +1310,7 @@
impl SubAssign<&i16> for I16Vec2 {
#[inline]
fn sub_assign(&mut self, rhs: &i16) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1348,7 +1349,7 @@
}
}
-impl Rem<I16Vec2> for I16Vec2 {
+impl Rem for I16Vec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1359,10 +1360,10 @@
}
}
-impl Rem<&I16Vec2> for I16Vec2 {
- type Output = I16Vec2;
+impl Rem<&Self> for I16Vec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I16Vec2) -> I16Vec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1383,7 +1384,7 @@
}
}
-impl RemAssign<I16Vec2> for I16Vec2 {
+impl RemAssign for I16Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1391,10 +1392,10 @@
}
}
-impl RemAssign<&I16Vec2> for I16Vec2 {
+impl RemAssign<&Self> for I16Vec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &I16Vec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1410,9 +1411,9 @@
}
impl Rem<&i16> for I16Vec2 {
- type Output = I16Vec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i16) -> I16Vec2 {
+ fn rem(self, rhs: &i16) -> Self {
self.rem(*rhs)
}
}
@@ -1444,7 +1445,7 @@
impl RemAssign<&i16> for I16Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: &i16) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1487,7 +1488,7 @@
impl AsRef<[i16; 2]> for I16Vec2 {
#[inline]
fn as_ref(&self) -> &[i16; 2] {
- unsafe { &*(self as *const I16Vec2 as *const [i16; 2]) }
+ unsafe { &*(self as *const Self as *const [i16; 2]) }
}
}
@@ -1495,7 +1496,7 @@
impl AsMut<[i16; 2]> for I16Vec2 {
#[inline]
fn as_mut(&mut self) -> &mut [i16; 2] {
- unsafe { &mut *(self as *mut I16Vec2 as *mut [i16; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [i16; 2]) }
}
}
@@ -1561,7 +1562,7 @@
impl Not for I16Vec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1569,6 +1570,14 @@
}
}
+impl Not for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn not(self) -> I16Vec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I16Vec2 {
type Output = Self;
#[inline]
@@ -1580,6 +1589,44 @@
}
}
+impl BitAnd<&Self> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I16Vec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitand(self, rhs: &I16Vec2) -> I16Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I16Vec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitand(self, rhs: I16Vec2) -> I16Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I16Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I16Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I16Vec2 {
type Output = Self;
#[inline]
@@ -1591,6 +1638,44 @@
}
}
+impl BitOr<&Self> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I16Vec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitor(self, rhs: &I16Vec2) -> I16Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I16Vec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitor(self, rhs: I16Vec2) -> I16Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I16Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I16Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I16Vec2 {
type Output = Self;
#[inline]
@@ -1602,6 +1687,44 @@
}
}
+impl BitXor<&Self> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I16Vec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &I16Vec2) -> I16Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I16Vec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitxor(self, rhs: I16Vec2) -> I16Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I16Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I16Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i16> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1613,6 +1736,44 @@
}
}
+impl BitAnd<&i16> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i16) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitand(self, rhs: &i16) -> I16Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitand(self, rhs: i16) -> I16Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i16> for I16Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i16) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i16> for I16Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i16) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i16> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1624,6 +1785,44 @@
}
}
+impl BitOr<&i16> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i16) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitor(self, rhs: &i16) -> I16Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitor(self, rhs: i16) -> I16Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i16> for I16Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i16) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i16> for I16Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i16) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i16> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1635,6 +1834,44 @@
}
}
+impl BitXor<&i16> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i16) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &i16) -> I16Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn bitxor(self, rhs: i16) -> I16Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i16> for I16Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i16) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i16> for I16Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i16) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1646,6 +1883,44 @@
}
}
+impl Shl<&i8> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1657,6 +1932,44 @@
}
}
+impl Shr<&i8> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1668,6 +1981,44 @@
}
}
+impl Shl<&i16> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1679,6 +2030,44 @@
}
}
+impl Shr<&i16> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1690,6 +2079,44 @@
}
}
+impl Shl<&i32> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1701,6 +2128,44 @@
}
}
+impl Shr<&i32> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1712,6 +2177,44 @@
}
}
+impl Shl<&i64> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1723,6 +2226,44 @@
}
}
+impl Shr<&i64> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1734,6 +2275,44 @@
}
}
+impl Shl<&u8> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1745,6 +2324,44 @@
}
}
+impl Shr<&u8> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1756,6 +2373,44 @@
}
}
+impl Shl<&u16> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1767,6 +2422,44 @@
}
}
+impl Shr<&u16> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1778,6 +2471,44 @@
}
}
+impl Shl<&u32> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1789,6 +2520,44 @@
}
}
+impl Shr<&u32> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1800,6 +2569,44 @@
}
}
+impl Shl<&u64> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I16Vec2 {
type Output = Self;
#[inline]
@@ -1811,10 +2618,48 @@
}
}
-impl Shl<crate::IVec2> for I16Vec2 {
+impl Shr<&u64> for I16Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec2> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1822,10 +2667,34 @@
}
}
-impl Shr<crate::IVec2> for I16Vec2 {
+impl Shl<&IVec2> for I16Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &IVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec2> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1833,10 +2702,34 @@
}
}
-impl Shl<crate::UVec2> for I16Vec2 {
+impl Shr<&IVec2> for I16Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &IVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec2> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1844,10 +2737,34 @@
}
}
-impl Shr<crate::UVec2> for I16Vec2 {
+impl Shl<&UVec2> for I16Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &UVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> I16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> I16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec2> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1855,6 +2772,30 @@
}
}
+impl Shr<&UVec2> for I16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> I16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &I16Vec2 {
+ type Output = I16Vec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> I16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I16Vec2 {
type Output = i16;
#[inline]
diff --git a/crates/glam/src/i16/i16vec3.rs b/crates/glam/src/i16/i16vec3.rs
index 2afcac0..4f6c31d 100644
--- a/crates/glam/src/i16/i16vec3.rs
+++ b/crates/glam/src/i16/i16vec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct I16Vec3 {
@@ -491,8 +492,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u16 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> u16 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -502,10 +503,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u16> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u16> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -513,12 +514,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u16 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u16 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -898,7 +899,7 @@
}
}
-impl Div<I16Vec3> for I16Vec3 {
+impl Div for I16Vec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -910,10 +911,10 @@
}
}
-impl Div<&I16Vec3> for I16Vec3 {
- type Output = I16Vec3;
+impl Div<&Self> for I16Vec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I16Vec3) -> I16Vec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -934,7 +935,7 @@
}
}
-impl DivAssign<I16Vec3> for I16Vec3 {
+impl DivAssign for I16Vec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -943,10 +944,10 @@
}
}
-impl DivAssign<&I16Vec3> for I16Vec3 {
+impl DivAssign<&Self> for I16Vec3 {
#[inline]
- fn div_assign(&mut self, rhs: &I16Vec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -963,9 +964,9 @@
}
impl Div<&i16> for I16Vec3 {
- type Output = I16Vec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i16) -> I16Vec3 {
+ fn div(self, rhs: &i16) -> Self {
self.div(*rhs)
}
}
@@ -998,7 +999,7 @@
impl DivAssign<&i16> for I16Vec3 {
#[inline]
fn div_assign(&mut self, rhs: &i16) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1038,7 +1039,7 @@
}
}
-impl Mul<I16Vec3> for I16Vec3 {
+impl Mul for I16Vec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1050,10 +1051,10 @@
}
}
-impl Mul<&I16Vec3> for I16Vec3 {
- type Output = I16Vec3;
+impl Mul<&Self> for I16Vec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I16Vec3) -> I16Vec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1074,7 +1075,7 @@
}
}
-impl MulAssign<I16Vec3> for I16Vec3 {
+impl MulAssign for I16Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1083,10 +1084,10 @@
}
}
-impl MulAssign<&I16Vec3> for I16Vec3 {
+impl MulAssign<&Self> for I16Vec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &I16Vec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1103,9 +1104,9 @@
}
impl Mul<&i16> for I16Vec3 {
- type Output = I16Vec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i16) -> I16Vec3 {
+ fn mul(self, rhs: &i16) -> Self {
self.mul(*rhs)
}
}
@@ -1138,7 +1139,7 @@
impl MulAssign<&i16> for I16Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: &i16) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1178,7 +1179,7 @@
}
}
-impl Add<I16Vec3> for I16Vec3 {
+impl Add for I16Vec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1190,10 +1191,10 @@
}
}
-impl Add<&I16Vec3> for I16Vec3 {
- type Output = I16Vec3;
+impl Add<&Self> for I16Vec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I16Vec3) -> I16Vec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1214,7 +1215,7 @@
}
}
-impl AddAssign<I16Vec3> for I16Vec3 {
+impl AddAssign for I16Vec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1223,10 +1224,10 @@
}
}
-impl AddAssign<&I16Vec3> for I16Vec3 {
+impl AddAssign<&Self> for I16Vec3 {
#[inline]
- fn add_assign(&mut self, rhs: &I16Vec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1243,9 +1244,9 @@
}
impl Add<&i16> for I16Vec3 {
- type Output = I16Vec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i16) -> I16Vec3 {
+ fn add(self, rhs: &i16) -> Self {
self.add(*rhs)
}
}
@@ -1278,7 +1279,7 @@
impl AddAssign<&i16> for I16Vec3 {
#[inline]
fn add_assign(&mut self, rhs: &i16) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1318,7 +1319,7 @@
}
}
-impl Sub<I16Vec3> for I16Vec3 {
+impl Sub for I16Vec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1330,10 +1331,10 @@
}
}
-impl Sub<&I16Vec3> for I16Vec3 {
- type Output = I16Vec3;
+impl Sub<&Self> for I16Vec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I16Vec3) -> I16Vec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1354,19 +1355,19 @@
}
}
-impl SubAssign<I16Vec3> for I16Vec3 {
+impl SubAssign for I16Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: I16Vec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&I16Vec3> for I16Vec3 {
+impl SubAssign<&Self> for I16Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &I16Vec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1383,9 +1384,9 @@
}
impl Sub<&i16> for I16Vec3 {
- type Output = I16Vec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i16) -> I16Vec3 {
+ fn sub(self, rhs: &i16) -> Self {
self.sub(*rhs)
}
}
@@ -1418,7 +1419,7 @@
impl SubAssign<&i16> for I16Vec3 {
#[inline]
fn sub_assign(&mut self, rhs: &i16) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1458,7 +1459,7 @@
}
}
-impl Rem<I16Vec3> for I16Vec3 {
+impl Rem for I16Vec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1470,10 +1471,10 @@
}
}
-impl Rem<&I16Vec3> for I16Vec3 {
- type Output = I16Vec3;
+impl Rem<&Self> for I16Vec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I16Vec3) -> I16Vec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1494,7 +1495,7 @@
}
}
-impl RemAssign<I16Vec3> for I16Vec3 {
+impl RemAssign for I16Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1503,10 +1504,10 @@
}
}
-impl RemAssign<&I16Vec3> for I16Vec3 {
+impl RemAssign<&Self> for I16Vec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &I16Vec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1523,9 +1524,9 @@
}
impl Rem<&i16> for I16Vec3 {
- type Output = I16Vec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i16) -> I16Vec3 {
+ fn rem(self, rhs: &i16) -> Self {
self.rem(*rhs)
}
}
@@ -1558,7 +1559,7 @@
impl RemAssign<&i16> for I16Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: &i16) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1602,7 +1603,7 @@
impl AsRef<[i16; 3]> for I16Vec3 {
#[inline]
fn as_ref(&self) -> &[i16; 3] {
- unsafe { &*(self as *const I16Vec3 as *const [i16; 3]) }
+ unsafe { &*(self as *const Self as *const [i16; 3]) }
}
}
@@ -1610,7 +1611,7 @@
impl AsMut<[i16; 3]> for I16Vec3 {
#[inline]
fn as_mut(&mut self) -> &mut [i16; 3] {
- unsafe { &mut *(self as *mut I16Vec3 as *mut [i16; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [i16; 3]) }
}
}
@@ -1677,7 +1678,7 @@
impl Not for I16Vec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1686,6 +1687,14 @@
}
}
+impl Not for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn not(self) -> I16Vec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I16Vec3 {
type Output = Self;
#[inline]
@@ -1698,6 +1707,44 @@
}
}
+impl BitAnd<&Self> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I16Vec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitand(self, rhs: &I16Vec3) -> I16Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I16Vec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitand(self, rhs: I16Vec3) -> I16Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I16Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I16Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I16Vec3 {
type Output = Self;
#[inline]
@@ -1710,6 +1757,44 @@
}
}
+impl BitOr<&Self> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I16Vec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitor(self, rhs: &I16Vec3) -> I16Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I16Vec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitor(self, rhs: I16Vec3) -> I16Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I16Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I16Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I16Vec3 {
type Output = Self;
#[inline]
@@ -1722,6 +1807,44 @@
}
}
+impl BitXor<&Self> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I16Vec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &I16Vec3) -> I16Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I16Vec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitxor(self, rhs: I16Vec3) -> I16Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I16Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I16Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i16> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1734,6 +1857,44 @@
}
}
+impl BitAnd<&i16> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i16) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitand(self, rhs: &i16) -> I16Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitand(self, rhs: i16) -> I16Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i16> for I16Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i16) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i16> for I16Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i16) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i16> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1746,6 +1907,44 @@
}
}
+impl BitOr<&i16> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i16) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitor(self, rhs: &i16) -> I16Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitor(self, rhs: i16) -> I16Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i16> for I16Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i16) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i16> for I16Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i16) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i16> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1758,6 +1957,44 @@
}
}
+impl BitXor<&i16> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i16) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &i16) -> I16Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn bitxor(self, rhs: i16) -> I16Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i16> for I16Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i16) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i16> for I16Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i16) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1770,6 +2007,44 @@
}
}
+impl Shl<&i8> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1782,6 +2057,44 @@
}
}
+impl Shr<&i8> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1794,6 +2107,44 @@
}
}
+impl Shl<&i16> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1806,6 +2157,44 @@
}
}
+impl Shr<&i16> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1818,6 +2207,44 @@
}
}
+impl Shl<&i32> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1830,6 +2257,44 @@
}
}
+impl Shr<&i32> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1842,6 +2307,44 @@
}
}
+impl Shl<&i64> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1854,6 +2357,44 @@
}
}
+impl Shr<&i64> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1866,6 +2407,44 @@
}
}
+impl Shl<&u8> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1878,6 +2457,44 @@
}
}
+impl Shr<&u8> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1890,6 +2507,44 @@
}
}
+impl Shl<&u16> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1902,6 +2557,44 @@
}
}
+impl Shr<&u16> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1914,6 +2607,44 @@
}
}
+impl Shl<&u32> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1926,6 +2657,44 @@
}
}
+impl Shr<&u32> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1938,6 +2707,44 @@
}
}
+impl Shl<&u64> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I16Vec3 {
type Output = Self;
#[inline]
@@ -1950,10 +2757,48 @@
}
}
-impl Shl<crate::IVec3> for I16Vec3 {
+impl Shr<&u64> for I16Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec3> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1962,10 +2807,34 @@
}
}
-impl Shr<crate::IVec3> for I16Vec3 {
+impl Shl<&IVec3> for I16Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &IVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec3> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1974,10 +2843,34 @@
}
}
-impl Shl<crate::UVec3> for I16Vec3 {
+impl Shr<&IVec3> for I16Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &IVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec3> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1986,10 +2879,34 @@
}
}
-impl Shr<crate::UVec3> for I16Vec3 {
+impl Shl<&UVec3> for I16Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &UVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> I16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> I16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec3> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1998,6 +2915,30 @@
}
}
+impl Shr<&UVec3> for I16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> I16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &I16Vec3 {
+ type Output = I16Vec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> I16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I16Vec3 {
type Output = i16;
#[inline]
diff --git a/crates/glam/src/i16/i16vec4.rs b/crates/glam/src/i16/i16vec4.rs
index 41ae54f..55eca57 100644
--- a/crates/glam/src/i16/i16vec4.rs
+++ b/crates/glam/src/i16/i16vec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(8)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -532,11 +533,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u16 {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> u16 {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -546,11 +547,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u16> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u16> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -558,13 +559,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u16 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u16 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -978,7 +979,7 @@
}
}
-impl Div<I16Vec4> for I16Vec4 {
+impl Div for I16Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -991,10 +992,10 @@
}
}
-impl Div<&I16Vec4> for I16Vec4 {
- type Output = I16Vec4;
+impl Div<&Self> for I16Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I16Vec4) -> I16Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1015,7 +1016,7 @@
}
}
-impl DivAssign<I16Vec4> for I16Vec4 {
+impl DivAssign for I16Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1025,10 +1026,10 @@
}
}
-impl DivAssign<&I16Vec4> for I16Vec4 {
+impl DivAssign<&Self> for I16Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &I16Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1046,9 +1047,9 @@
}
impl Div<&i16> for I16Vec4 {
- type Output = I16Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i16) -> I16Vec4 {
+ fn div(self, rhs: &i16) -> Self {
self.div(*rhs)
}
}
@@ -1082,7 +1083,7 @@
impl DivAssign<&i16> for I16Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &i16) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1123,7 +1124,7 @@
}
}
-impl Mul<I16Vec4> for I16Vec4 {
+impl Mul for I16Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1136,10 +1137,10 @@
}
}
-impl Mul<&I16Vec4> for I16Vec4 {
- type Output = I16Vec4;
+impl Mul<&Self> for I16Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I16Vec4) -> I16Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1160,7 +1161,7 @@
}
}
-impl MulAssign<I16Vec4> for I16Vec4 {
+impl MulAssign for I16Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1170,10 +1171,10 @@
}
}
-impl MulAssign<&I16Vec4> for I16Vec4 {
+impl MulAssign<&Self> for I16Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &I16Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1191,9 +1192,9 @@
}
impl Mul<&i16> for I16Vec4 {
- type Output = I16Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i16) -> I16Vec4 {
+ fn mul(self, rhs: &i16) -> Self {
self.mul(*rhs)
}
}
@@ -1227,7 +1228,7 @@
impl MulAssign<&i16> for I16Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &i16) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1268,7 +1269,7 @@
}
}
-impl Add<I16Vec4> for I16Vec4 {
+impl Add for I16Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1281,10 +1282,10 @@
}
}
-impl Add<&I16Vec4> for I16Vec4 {
- type Output = I16Vec4;
+impl Add<&Self> for I16Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I16Vec4) -> I16Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1305,7 +1306,7 @@
}
}
-impl AddAssign<I16Vec4> for I16Vec4 {
+impl AddAssign for I16Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1315,10 +1316,10 @@
}
}
-impl AddAssign<&I16Vec4> for I16Vec4 {
+impl AddAssign<&Self> for I16Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &I16Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1336,9 +1337,9 @@
}
impl Add<&i16> for I16Vec4 {
- type Output = I16Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i16) -> I16Vec4 {
+ fn add(self, rhs: &i16) -> Self {
self.add(*rhs)
}
}
@@ -1372,7 +1373,7 @@
impl AddAssign<&i16> for I16Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &i16) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1413,7 +1414,7 @@
}
}
-impl Sub<I16Vec4> for I16Vec4 {
+impl Sub for I16Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1426,10 +1427,10 @@
}
}
-impl Sub<&I16Vec4> for I16Vec4 {
- type Output = I16Vec4;
+impl Sub<&Self> for I16Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I16Vec4) -> I16Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1450,9 +1451,9 @@
}
}
-impl SubAssign<I16Vec4> for I16Vec4 {
+impl SubAssign for I16Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: I16Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1460,10 +1461,10 @@
}
}
-impl SubAssign<&I16Vec4> for I16Vec4 {
+impl SubAssign<&Self> for I16Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &I16Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1481,9 +1482,9 @@
}
impl Sub<&i16> for I16Vec4 {
- type Output = I16Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i16) -> I16Vec4 {
+ fn sub(self, rhs: &i16) -> Self {
self.sub(*rhs)
}
}
@@ -1517,7 +1518,7 @@
impl SubAssign<&i16> for I16Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &i16) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1558,7 +1559,7 @@
}
}
-impl Rem<I16Vec4> for I16Vec4 {
+impl Rem for I16Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1571,10 +1572,10 @@
}
}
-impl Rem<&I16Vec4> for I16Vec4 {
- type Output = I16Vec4;
+impl Rem<&Self> for I16Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I16Vec4) -> I16Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1595,7 +1596,7 @@
}
}
-impl RemAssign<I16Vec4> for I16Vec4 {
+impl RemAssign for I16Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1605,10 +1606,10 @@
}
}
-impl RemAssign<&I16Vec4> for I16Vec4 {
+impl RemAssign<&Self> for I16Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &I16Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1626,9 +1627,9 @@
}
impl Rem<&i16> for I16Vec4 {
- type Output = I16Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i16) -> I16Vec4 {
+ fn rem(self, rhs: &i16) -> Self {
self.rem(*rhs)
}
}
@@ -1662,7 +1663,7 @@
impl RemAssign<&i16> for I16Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &i16) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1707,7 +1708,7 @@
impl AsRef<[i16; 4]> for I16Vec4 {
#[inline]
fn as_ref(&self) -> &[i16; 4] {
- unsafe { &*(self as *const I16Vec4 as *const [i16; 4]) }
+ unsafe { &*(self as *const Self as *const [i16; 4]) }
}
}
@@ -1715,7 +1716,7 @@
impl AsMut<[i16; 4]> for I16Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [i16; 4] {
- unsafe { &mut *(self as *mut I16Vec4 as *mut [i16; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [i16; 4]) }
}
}
@@ -1783,7 +1784,7 @@
impl Not for I16Vec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1793,6 +1794,14 @@
}
}
+impl Not for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn not(self) -> I16Vec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I16Vec4 {
type Output = Self;
#[inline]
@@ -1806,6 +1815,44 @@
}
}
+impl BitAnd<&Self> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I16Vec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitand(self, rhs: &I16Vec4) -> I16Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I16Vec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitand(self, rhs: I16Vec4) -> I16Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I16Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I16Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I16Vec4 {
type Output = Self;
#[inline]
@@ -1819,6 +1866,44 @@
}
}
+impl BitOr<&Self> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I16Vec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitor(self, rhs: &I16Vec4) -> I16Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I16Vec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitor(self, rhs: I16Vec4) -> I16Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I16Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I16Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I16Vec4 {
type Output = Self;
#[inline]
@@ -1832,6 +1917,44 @@
}
}
+impl BitXor<&Self> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I16Vec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &I16Vec4) -> I16Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I16Vec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitxor(self, rhs: I16Vec4) -> I16Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I16Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I16Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i16> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1845,6 +1968,44 @@
}
}
+impl BitAnd<&i16> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i16) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitand(self, rhs: &i16) -> I16Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitand(self, rhs: i16) -> I16Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i16> for I16Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i16) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i16> for I16Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i16) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i16> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1858,6 +2019,44 @@
}
}
+impl BitOr<&i16> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i16) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitor(self, rhs: &i16) -> I16Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitor(self, rhs: i16) -> I16Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i16> for I16Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i16) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i16> for I16Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i16) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i16> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1871,6 +2070,44 @@
}
}
+impl BitXor<&i16> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i16) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &i16) -> I16Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn bitxor(self, rhs: i16) -> I16Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i16> for I16Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i16) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i16> for I16Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i16) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1884,6 +2121,44 @@
}
}
+impl Shl<&i8> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1897,6 +2172,44 @@
}
}
+impl Shr<&i8> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1910,6 +2223,44 @@
}
}
+impl Shl<&i16> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1923,6 +2274,44 @@
}
}
+impl Shr<&i16> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1936,6 +2325,44 @@
}
}
+impl Shl<&i32> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1949,6 +2376,44 @@
}
}
+impl Shr<&i32> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1962,6 +2427,44 @@
}
}
+impl Shl<&i64> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1975,6 +2478,44 @@
}
}
+impl Shr<&i64> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I16Vec4 {
type Output = Self;
#[inline]
@@ -1988,6 +2529,44 @@
}
}
+impl Shl<&u8> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I16Vec4 {
type Output = Self;
#[inline]
@@ -2001,6 +2580,44 @@
}
}
+impl Shr<&u8> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I16Vec4 {
type Output = Self;
#[inline]
@@ -2014,6 +2631,44 @@
}
}
+impl Shl<&u16> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I16Vec4 {
type Output = Self;
#[inline]
@@ -2027,6 +2682,44 @@
}
}
+impl Shr<&u16> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I16Vec4 {
type Output = Self;
#[inline]
@@ -2040,6 +2733,44 @@
}
}
+impl Shl<&u32> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I16Vec4 {
type Output = Self;
#[inline]
@@ -2053,6 +2784,44 @@
}
}
+impl Shr<&u32> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I16Vec4 {
type Output = Self;
#[inline]
@@ -2066,6 +2835,44 @@
}
}
+impl Shl<&u64> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I16Vec4 {
type Output = Self;
#[inline]
@@ -2079,10 +2886,48 @@
}
}
-impl Shl<crate::IVec4> for I16Vec4 {
+impl Shr<&u64> for I16Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec4> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -2092,10 +2937,34 @@
}
}
-impl Shr<crate::IVec4> for I16Vec4 {
+impl Shl<&IVec4> for I16Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &IVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec4> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -2105,10 +2974,34 @@
}
}
-impl Shl<crate::UVec4> for I16Vec4 {
+impl Shr<&IVec4> for I16Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &IVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec4> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -2118,10 +3011,34 @@
}
}
-impl Shr<crate::UVec4> for I16Vec4 {
+impl Shl<&UVec4> for I16Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &UVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> I16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> I16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec4> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -2131,6 +3048,30 @@
}
}
+impl Shr<&UVec4> for I16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> I16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &I16Vec4 {
+ type Output = I16Vec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> I16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I16Vec4 {
type Output = i16;
#[inline]
diff --git a/crates/glam/src/i32/ivec2.rs b/crates/glam/src/i32/ivec2.rs
index 384c2ee..8e0e797 100644
--- a/crates/glam/src/i32/ivec2.rs
+++ b/crates/glam/src/i32/ivec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(8)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -416,8 +417,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u32 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> u32 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -427,9 +428,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u32> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u32> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -437,9 +438,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u32 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u32 {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -808,7 +809,7 @@
}
}
-impl Div<IVec2> for IVec2 {
+impl Div for IVec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -819,10 +820,10 @@
}
}
-impl Div<&IVec2> for IVec2 {
- type Output = IVec2;
+impl Div<&Self> for IVec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &IVec2) -> IVec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -843,7 +844,7 @@
}
}
-impl DivAssign<IVec2> for IVec2 {
+impl DivAssign for IVec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -851,10 +852,10 @@
}
}
-impl DivAssign<&IVec2> for IVec2 {
+impl DivAssign<&Self> for IVec2 {
#[inline]
- fn div_assign(&mut self, rhs: &IVec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -870,9 +871,9 @@
}
impl Div<&i32> for IVec2 {
- type Output = IVec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i32) -> IVec2 {
+ fn div(self, rhs: &i32) -> Self {
self.div(*rhs)
}
}
@@ -904,7 +905,7 @@
impl DivAssign<&i32> for IVec2 {
#[inline]
fn div_assign(&mut self, rhs: &i32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -943,7 +944,7 @@
}
}
-impl Mul<IVec2> for IVec2 {
+impl Mul for IVec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -954,10 +955,10 @@
}
}
-impl Mul<&IVec2> for IVec2 {
- type Output = IVec2;
+impl Mul<&Self> for IVec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &IVec2) -> IVec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -978,7 +979,7 @@
}
}
-impl MulAssign<IVec2> for IVec2 {
+impl MulAssign for IVec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -986,10 +987,10 @@
}
}
-impl MulAssign<&IVec2> for IVec2 {
+impl MulAssign<&Self> for IVec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &IVec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1005,9 +1006,9 @@
}
impl Mul<&i32> for IVec2 {
- type Output = IVec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i32) -> IVec2 {
+ fn mul(self, rhs: &i32) -> Self {
self.mul(*rhs)
}
}
@@ -1039,7 +1040,7 @@
impl MulAssign<&i32> for IVec2 {
#[inline]
fn mul_assign(&mut self, rhs: &i32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1078,7 +1079,7 @@
}
}
-impl Add<IVec2> for IVec2 {
+impl Add for IVec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1089,10 +1090,10 @@
}
}
-impl Add<&IVec2> for IVec2 {
- type Output = IVec2;
+impl Add<&Self> for IVec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &IVec2) -> IVec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1113,7 +1114,7 @@
}
}
-impl AddAssign<IVec2> for IVec2 {
+impl AddAssign for IVec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1121,10 +1122,10 @@
}
}
-impl AddAssign<&IVec2> for IVec2 {
+impl AddAssign<&Self> for IVec2 {
#[inline]
- fn add_assign(&mut self, rhs: &IVec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1140,9 +1141,9 @@
}
impl Add<&i32> for IVec2 {
- type Output = IVec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i32) -> IVec2 {
+ fn add(self, rhs: &i32) -> Self {
self.add(*rhs)
}
}
@@ -1174,7 +1175,7 @@
impl AddAssign<&i32> for IVec2 {
#[inline]
fn add_assign(&mut self, rhs: &i32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1213,7 +1214,7 @@
}
}
-impl Sub<IVec2> for IVec2 {
+impl Sub for IVec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1224,10 +1225,10 @@
}
}
-impl Sub<&IVec2> for IVec2 {
- type Output = IVec2;
+impl Sub<&Self> for IVec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &IVec2) -> IVec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1248,18 +1249,18 @@
}
}
-impl SubAssign<IVec2> for IVec2 {
+impl SubAssign for IVec2 {
#[inline]
- fn sub_assign(&mut self, rhs: IVec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&IVec2> for IVec2 {
+impl SubAssign<&Self> for IVec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &IVec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1275,9 +1276,9 @@
}
impl Sub<&i32> for IVec2 {
- type Output = IVec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i32) -> IVec2 {
+ fn sub(self, rhs: &i32) -> Self {
self.sub(*rhs)
}
}
@@ -1309,7 +1310,7 @@
impl SubAssign<&i32> for IVec2 {
#[inline]
fn sub_assign(&mut self, rhs: &i32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1348,7 +1349,7 @@
}
}
-impl Rem<IVec2> for IVec2 {
+impl Rem for IVec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1359,10 +1360,10 @@
}
}
-impl Rem<&IVec2> for IVec2 {
- type Output = IVec2;
+impl Rem<&Self> for IVec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &IVec2) -> IVec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1383,7 +1384,7 @@
}
}
-impl RemAssign<IVec2> for IVec2 {
+impl RemAssign for IVec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1391,10 +1392,10 @@
}
}
-impl RemAssign<&IVec2> for IVec2 {
+impl RemAssign<&Self> for IVec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &IVec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1410,9 +1411,9 @@
}
impl Rem<&i32> for IVec2 {
- type Output = IVec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i32) -> IVec2 {
+ fn rem(self, rhs: &i32) -> Self {
self.rem(*rhs)
}
}
@@ -1444,7 +1445,7 @@
impl RemAssign<&i32> for IVec2 {
#[inline]
fn rem_assign(&mut self, rhs: &i32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1487,7 +1488,7 @@
impl AsRef<[i32; 2]> for IVec2 {
#[inline]
fn as_ref(&self) -> &[i32; 2] {
- unsafe { &*(self as *const IVec2 as *const [i32; 2]) }
+ unsafe { &*(self as *const Self as *const [i32; 2]) }
}
}
@@ -1495,7 +1496,7 @@
impl AsMut<[i32; 2]> for IVec2 {
#[inline]
fn as_mut(&mut self) -> &mut [i32; 2] {
- unsafe { &mut *(self as *mut IVec2 as *mut [i32; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [i32; 2]) }
}
}
@@ -1561,7 +1562,7 @@
impl Not for IVec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1569,6 +1570,14 @@
}
}
+impl Not for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn not(self) -> IVec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for IVec2 {
type Output = Self;
#[inline]
@@ -1580,6 +1589,44 @@
}
}
+impl BitAnd<&Self> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitand(self, rhs: &IVec2) -> IVec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitand(self, rhs: IVec2) -> IVec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for IVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for IVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for IVec2 {
type Output = Self;
#[inline]
@@ -1591,6 +1638,44 @@
}
}
+impl BitOr<&Self> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitor(self, rhs: &IVec2) -> IVec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitor(self, rhs: IVec2) -> IVec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for IVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for IVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for IVec2 {
type Output = Self;
#[inline]
@@ -1602,6 +1687,44 @@
}
}
+impl BitXor<&Self> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitxor(self, rhs: &IVec2) -> IVec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitxor(self, rhs: IVec2) -> IVec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for IVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for IVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i32> for IVec2 {
type Output = Self;
#[inline]
@@ -1613,6 +1736,44 @@
}
}
+impl BitAnd<&i32> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i32) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitand(self, rhs: &i32) -> IVec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitand(self, rhs: i32) -> IVec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i32> for IVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i32) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i32> for IVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i32) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i32> for IVec2 {
type Output = Self;
#[inline]
@@ -1624,6 +1785,44 @@
}
}
+impl BitOr<&i32> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i32) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitor(self, rhs: &i32) -> IVec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitor(self, rhs: i32) -> IVec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i32> for IVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i32) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i32> for IVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i32) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i32> for IVec2 {
type Output = Self;
#[inline]
@@ -1635,6 +1834,44 @@
}
}
+impl BitXor<&i32> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i32) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitxor(self, rhs: &i32) -> IVec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn bitxor(self, rhs: i32) -> IVec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i32> for IVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i32) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i32> for IVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i32) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for IVec2 {
type Output = Self;
#[inline]
@@ -1646,6 +1883,44 @@
}
}
+impl Shl<&i8> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for IVec2 {
type Output = Self;
#[inline]
@@ -1657,6 +1932,44 @@
}
}
+impl Shr<&i8> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for IVec2 {
type Output = Self;
#[inline]
@@ -1668,6 +1981,44 @@
}
}
+impl Shl<&i16> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for IVec2 {
type Output = Self;
#[inline]
@@ -1679,6 +2030,44 @@
}
}
+impl Shr<&i16> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for IVec2 {
type Output = Self;
#[inline]
@@ -1690,6 +2079,44 @@
}
}
+impl Shl<&i32> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for IVec2 {
type Output = Self;
#[inline]
@@ -1701,6 +2128,44 @@
}
}
+impl Shr<&i32> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for IVec2 {
type Output = Self;
#[inline]
@@ -1712,6 +2177,44 @@
}
}
+impl Shl<&i64> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for IVec2 {
type Output = Self;
#[inline]
@@ -1723,6 +2226,44 @@
}
}
+impl Shr<&i64> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for IVec2 {
type Output = Self;
#[inline]
@@ -1734,6 +2275,44 @@
}
}
+impl Shl<&u8> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for IVec2 {
type Output = Self;
#[inline]
@@ -1745,6 +2324,44 @@
}
}
+impl Shr<&u8> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for IVec2 {
type Output = Self;
#[inline]
@@ -1756,6 +2373,44 @@
}
}
+impl Shl<&u16> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for IVec2 {
type Output = Self;
#[inline]
@@ -1767,6 +2422,44 @@
}
}
+impl Shr<&u16> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for IVec2 {
type Output = Self;
#[inline]
@@ -1778,6 +2471,44 @@
}
}
+impl Shl<&u32> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for IVec2 {
type Output = Self;
#[inline]
@@ -1789,6 +2520,44 @@
}
}
+impl Shr<&u32> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for IVec2 {
type Output = Self;
#[inline]
@@ -1800,6 +2569,44 @@
}
}
+impl Shl<&u64> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for IVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for IVec2 {
type Output = Self;
#[inline]
@@ -1811,10 +2618,48 @@
}
}
-impl Shl<crate::IVec2> for IVec2 {
+impl Shr<&u64> for IVec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for IVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: Self) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1822,10 +2667,34 @@
}
}
-impl Shr<crate::IVec2> for IVec2 {
+impl Shl<&Self> for IVec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &Self) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: Self) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1833,10 +2702,34 @@
}
}
-impl Shl<crate::UVec2> for IVec2 {
+impl Shr<&Self> for IVec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &Self) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec2> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1844,10 +2737,34 @@
}
}
-impl Shr<crate::UVec2> for IVec2 {
+impl Shl<&UVec2> for IVec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &UVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> IVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> IVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec2> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1855,6 +2772,30 @@
}
}
+impl Shr<&UVec2> for IVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> IVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &IVec2 {
+ type Output = IVec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> IVec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for IVec2 {
type Output = i32;
#[inline]
diff --git a/crates/glam/src/i32/ivec3.rs b/crates/glam/src/i32/ivec3.rs
index 3817c6b..7a76091 100644
--- a/crates/glam/src/i32/ivec3.rs
+++ b/crates/glam/src/i32/ivec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct IVec3 {
@@ -491,8 +492,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u32 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> u32 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -502,10 +503,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u32> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u32> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -513,12 +514,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u32 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u32 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -898,7 +899,7 @@
}
}
-impl Div<IVec3> for IVec3 {
+impl Div for IVec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -910,10 +911,10 @@
}
}
-impl Div<&IVec3> for IVec3 {
- type Output = IVec3;
+impl Div<&Self> for IVec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &IVec3) -> IVec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -934,7 +935,7 @@
}
}
-impl DivAssign<IVec3> for IVec3 {
+impl DivAssign for IVec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -943,10 +944,10 @@
}
}
-impl DivAssign<&IVec3> for IVec3 {
+impl DivAssign<&Self> for IVec3 {
#[inline]
- fn div_assign(&mut self, rhs: &IVec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -963,9 +964,9 @@
}
impl Div<&i32> for IVec3 {
- type Output = IVec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i32) -> IVec3 {
+ fn div(self, rhs: &i32) -> Self {
self.div(*rhs)
}
}
@@ -998,7 +999,7 @@
impl DivAssign<&i32> for IVec3 {
#[inline]
fn div_assign(&mut self, rhs: &i32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1038,7 +1039,7 @@
}
}
-impl Mul<IVec3> for IVec3 {
+impl Mul for IVec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1050,10 +1051,10 @@
}
}
-impl Mul<&IVec3> for IVec3 {
- type Output = IVec3;
+impl Mul<&Self> for IVec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &IVec3) -> IVec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1074,7 +1075,7 @@
}
}
-impl MulAssign<IVec3> for IVec3 {
+impl MulAssign for IVec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1083,10 +1084,10 @@
}
}
-impl MulAssign<&IVec3> for IVec3 {
+impl MulAssign<&Self> for IVec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &IVec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1103,9 +1104,9 @@
}
impl Mul<&i32> for IVec3 {
- type Output = IVec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i32) -> IVec3 {
+ fn mul(self, rhs: &i32) -> Self {
self.mul(*rhs)
}
}
@@ -1138,7 +1139,7 @@
impl MulAssign<&i32> for IVec3 {
#[inline]
fn mul_assign(&mut self, rhs: &i32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1178,7 +1179,7 @@
}
}
-impl Add<IVec3> for IVec3 {
+impl Add for IVec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1190,10 +1191,10 @@
}
}
-impl Add<&IVec3> for IVec3 {
- type Output = IVec3;
+impl Add<&Self> for IVec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &IVec3) -> IVec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1214,7 +1215,7 @@
}
}
-impl AddAssign<IVec3> for IVec3 {
+impl AddAssign for IVec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1223,10 +1224,10 @@
}
}
-impl AddAssign<&IVec3> for IVec3 {
+impl AddAssign<&Self> for IVec3 {
#[inline]
- fn add_assign(&mut self, rhs: &IVec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1243,9 +1244,9 @@
}
impl Add<&i32> for IVec3 {
- type Output = IVec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i32) -> IVec3 {
+ fn add(self, rhs: &i32) -> Self {
self.add(*rhs)
}
}
@@ -1278,7 +1279,7 @@
impl AddAssign<&i32> for IVec3 {
#[inline]
fn add_assign(&mut self, rhs: &i32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1318,7 +1319,7 @@
}
}
-impl Sub<IVec3> for IVec3 {
+impl Sub for IVec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1330,10 +1331,10 @@
}
}
-impl Sub<&IVec3> for IVec3 {
- type Output = IVec3;
+impl Sub<&Self> for IVec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &IVec3) -> IVec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1354,19 +1355,19 @@
}
}
-impl SubAssign<IVec3> for IVec3 {
+impl SubAssign for IVec3 {
#[inline]
- fn sub_assign(&mut self, rhs: IVec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&IVec3> for IVec3 {
+impl SubAssign<&Self> for IVec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &IVec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1383,9 +1384,9 @@
}
impl Sub<&i32> for IVec3 {
- type Output = IVec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i32) -> IVec3 {
+ fn sub(self, rhs: &i32) -> Self {
self.sub(*rhs)
}
}
@@ -1418,7 +1419,7 @@
impl SubAssign<&i32> for IVec3 {
#[inline]
fn sub_assign(&mut self, rhs: &i32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1458,7 +1459,7 @@
}
}
-impl Rem<IVec3> for IVec3 {
+impl Rem for IVec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1470,10 +1471,10 @@
}
}
-impl Rem<&IVec3> for IVec3 {
- type Output = IVec3;
+impl Rem<&Self> for IVec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &IVec3) -> IVec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1494,7 +1495,7 @@
}
}
-impl RemAssign<IVec3> for IVec3 {
+impl RemAssign for IVec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1503,10 +1504,10 @@
}
}
-impl RemAssign<&IVec3> for IVec3 {
+impl RemAssign<&Self> for IVec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &IVec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1523,9 +1524,9 @@
}
impl Rem<&i32> for IVec3 {
- type Output = IVec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i32) -> IVec3 {
+ fn rem(self, rhs: &i32) -> Self {
self.rem(*rhs)
}
}
@@ -1558,7 +1559,7 @@
impl RemAssign<&i32> for IVec3 {
#[inline]
fn rem_assign(&mut self, rhs: &i32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1602,7 +1603,7 @@
impl AsRef<[i32; 3]> for IVec3 {
#[inline]
fn as_ref(&self) -> &[i32; 3] {
- unsafe { &*(self as *const IVec3 as *const [i32; 3]) }
+ unsafe { &*(self as *const Self as *const [i32; 3]) }
}
}
@@ -1610,7 +1611,7 @@
impl AsMut<[i32; 3]> for IVec3 {
#[inline]
fn as_mut(&mut self) -> &mut [i32; 3] {
- unsafe { &mut *(self as *mut IVec3 as *mut [i32; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [i32; 3]) }
}
}
@@ -1677,7 +1678,7 @@
impl Not for IVec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1686,6 +1687,14 @@
}
}
+impl Not for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn not(self) -> IVec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for IVec3 {
type Output = Self;
#[inline]
@@ -1698,6 +1707,44 @@
}
}
+impl BitAnd<&Self> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitand(self, rhs: &IVec3) -> IVec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitand(self, rhs: IVec3) -> IVec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for IVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for IVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for IVec3 {
type Output = Self;
#[inline]
@@ -1710,6 +1757,44 @@
}
}
+impl BitOr<&Self> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitor(self, rhs: &IVec3) -> IVec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitor(self, rhs: IVec3) -> IVec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for IVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for IVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for IVec3 {
type Output = Self;
#[inline]
@@ -1722,6 +1807,44 @@
}
}
+impl BitXor<&Self> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitxor(self, rhs: &IVec3) -> IVec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitxor(self, rhs: IVec3) -> IVec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for IVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for IVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i32> for IVec3 {
type Output = Self;
#[inline]
@@ -1734,6 +1857,44 @@
}
}
+impl BitAnd<&i32> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i32) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitand(self, rhs: &i32) -> IVec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitand(self, rhs: i32) -> IVec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i32> for IVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i32) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i32> for IVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i32) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i32> for IVec3 {
type Output = Self;
#[inline]
@@ -1746,6 +1907,44 @@
}
}
+impl BitOr<&i32> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i32) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitor(self, rhs: &i32) -> IVec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitor(self, rhs: i32) -> IVec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i32> for IVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i32) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i32> for IVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i32) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i32> for IVec3 {
type Output = Self;
#[inline]
@@ -1758,6 +1957,44 @@
}
}
+impl BitXor<&i32> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i32) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitxor(self, rhs: &i32) -> IVec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn bitxor(self, rhs: i32) -> IVec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i32> for IVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i32) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i32> for IVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i32) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for IVec3 {
type Output = Self;
#[inline]
@@ -1770,6 +2007,44 @@
}
}
+impl Shl<&i8> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for IVec3 {
type Output = Self;
#[inline]
@@ -1782,6 +2057,44 @@
}
}
+impl Shr<&i8> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for IVec3 {
type Output = Self;
#[inline]
@@ -1794,6 +2107,44 @@
}
}
+impl Shl<&i16> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for IVec3 {
type Output = Self;
#[inline]
@@ -1806,6 +2157,44 @@
}
}
+impl Shr<&i16> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for IVec3 {
type Output = Self;
#[inline]
@@ -1818,6 +2207,44 @@
}
}
+impl Shl<&i32> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for IVec3 {
type Output = Self;
#[inline]
@@ -1830,6 +2257,44 @@
}
}
+impl Shr<&i32> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for IVec3 {
type Output = Self;
#[inline]
@@ -1842,6 +2307,44 @@
}
}
+impl Shl<&i64> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for IVec3 {
type Output = Self;
#[inline]
@@ -1854,6 +2357,44 @@
}
}
+impl Shr<&i64> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for IVec3 {
type Output = Self;
#[inline]
@@ -1866,6 +2407,44 @@
}
}
+impl Shl<&u8> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for IVec3 {
type Output = Self;
#[inline]
@@ -1878,6 +2457,44 @@
}
}
+impl Shr<&u8> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for IVec3 {
type Output = Self;
#[inline]
@@ -1890,6 +2507,44 @@
}
}
+impl Shl<&u16> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for IVec3 {
type Output = Self;
#[inline]
@@ -1902,6 +2557,44 @@
}
}
+impl Shr<&u16> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for IVec3 {
type Output = Self;
#[inline]
@@ -1914,6 +2607,44 @@
}
}
+impl Shl<&u32> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for IVec3 {
type Output = Self;
#[inline]
@@ -1926,6 +2657,44 @@
}
}
+impl Shr<&u32> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for IVec3 {
type Output = Self;
#[inline]
@@ -1938,6 +2707,44 @@
}
}
+impl Shl<&u64> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for IVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for IVec3 {
type Output = Self;
#[inline]
@@ -1950,10 +2757,48 @@
}
}
-impl Shl<crate::IVec3> for IVec3 {
+impl Shr<&u64> for IVec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for IVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: Self) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1962,10 +2807,34 @@
}
}
-impl Shr<crate::IVec3> for IVec3 {
+impl Shl<&Self> for IVec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &Self) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: Self) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1974,10 +2843,34 @@
}
}
-impl Shl<crate::UVec3> for IVec3 {
+impl Shr<&Self> for IVec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &Self) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec3> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1986,10 +2879,34 @@
}
}
-impl Shr<crate::UVec3> for IVec3 {
+impl Shl<&UVec3> for IVec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &UVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> IVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> IVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec3> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1998,6 +2915,30 @@
}
}
+impl Shr<&UVec3> for IVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> IVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &IVec3 {
+ type Output = IVec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> IVec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for IVec3 {
type Output = i32;
#[inline]
diff --git a/crates/glam/src/i32/ivec4.rs b/crates/glam/src/i32/ivec4.rs
index 7bebf94..cc0790a 100644
--- a/crates/glam/src/i32/ivec4.rs
+++ b/crates/glam/src/i32/ivec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -532,11 +533,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u32 {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> u32 {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -546,11 +547,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u32> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u32> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -558,13 +559,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u32 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u32 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -978,7 +979,7 @@
}
}
-impl Div<IVec4> for IVec4 {
+impl Div for IVec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -991,10 +992,10 @@
}
}
-impl Div<&IVec4> for IVec4 {
- type Output = IVec4;
+impl Div<&Self> for IVec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &IVec4) -> IVec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1015,7 +1016,7 @@
}
}
-impl DivAssign<IVec4> for IVec4 {
+impl DivAssign for IVec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1025,10 +1026,10 @@
}
}
-impl DivAssign<&IVec4> for IVec4 {
+impl DivAssign<&Self> for IVec4 {
#[inline]
- fn div_assign(&mut self, rhs: &IVec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1046,9 +1047,9 @@
}
impl Div<&i32> for IVec4 {
- type Output = IVec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i32) -> IVec4 {
+ fn div(self, rhs: &i32) -> Self {
self.div(*rhs)
}
}
@@ -1082,7 +1083,7 @@
impl DivAssign<&i32> for IVec4 {
#[inline]
fn div_assign(&mut self, rhs: &i32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1123,7 +1124,7 @@
}
}
-impl Mul<IVec4> for IVec4 {
+impl Mul for IVec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1136,10 +1137,10 @@
}
}
-impl Mul<&IVec4> for IVec4 {
- type Output = IVec4;
+impl Mul<&Self> for IVec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &IVec4) -> IVec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1160,7 +1161,7 @@
}
}
-impl MulAssign<IVec4> for IVec4 {
+impl MulAssign for IVec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1170,10 +1171,10 @@
}
}
-impl MulAssign<&IVec4> for IVec4 {
+impl MulAssign<&Self> for IVec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &IVec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1191,9 +1192,9 @@
}
impl Mul<&i32> for IVec4 {
- type Output = IVec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i32) -> IVec4 {
+ fn mul(self, rhs: &i32) -> Self {
self.mul(*rhs)
}
}
@@ -1227,7 +1228,7 @@
impl MulAssign<&i32> for IVec4 {
#[inline]
fn mul_assign(&mut self, rhs: &i32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1268,7 +1269,7 @@
}
}
-impl Add<IVec4> for IVec4 {
+impl Add for IVec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1281,10 +1282,10 @@
}
}
-impl Add<&IVec4> for IVec4 {
- type Output = IVec4;
+impl Add<&Self> for IVec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &IVec4) -> IVec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1305,7 +1306,7 @@
}
}
-impl AddAssign<IVec4> for IVec4 {
+impl AddAssign for IVec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1315,10 +1316,10 @@
}
}
-impl AddAssign<&IVec4> for IVec4 {
+impl AddAssign<&Self> for IVec4 {
#[inline]
- fn add_assign(&mut self, rhs: &IVec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1336,9 +1337,9 @@
}
impl Add<&i32> for IVec4 {
- type Output = IVec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i32) -> IVec4 {
+ fn add(self, rhs: &i32) -> Self {
self.add(*rhs)
}
}
@@ -1372,7 +1373,7 @@
impl AddAssign<&i32> for IVec4 {
#[inline]
fn add_assign(&mut self, rhs: &i32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1413,7 +1414,7 @@
}
}
-impl Sub<IVec4> for IVec4 {
+impl Sub for IVec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1426,10 +1427,10 @@
}
}
-impl Sub<&IVec4> for IVec4 {
- type Output = IVec4;
+impl Sub<&Self> for IVec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &IVec4) -> IVec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1450,9 +1451,9 @@
}
}
-impl SubAssign<IVec4> for IVec4 {
+impl SubAssign for IVec4 {
#[inline]
- fn sub_assign(&mut self, rhs: IVec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1460,10 +1461,10 @@
}
}
-impl SubAssign<&IVec4> for IVec4 {
+impl SubAssign<&Self> for IVec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &IVec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1481,9 +1482,9 @@
}
impl Sub<&i32> for IVec4 {
- type Output = IVec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i32) -> IVec4 {
+ fn sub(self, rhs: &i32) -> Self {
self.sub(*rhs)
}
}
@@ -1517,7 +1518,7 @@
impl SubAssign<&i32> for IVec4 {
#[inline]
fn sub_assign(&mut self, rhs: &i32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1558,7 +1559,7 @@
}
}
-impl Rem<IVec4> for IVec4 {
+impl Rem for IVec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1571,10 +1572,10 @@
}
}
-impl Rem<&IVec4> for IVec4 {
- type Output = IVec4;
+impl Rem<&Self> for IVec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &IVec4) -> IVec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1595,7 +1596,7 @@
}
}
-impl RemAssign<IVec4> for IVec4 {
+impl RemAssign for IVec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1605,10 +1606,10 @@
}
}
-impl RemAssign<&IVec4> for IVec4 {
+impl RemAssign<&Self> for IVec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &IVec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1626,9 +1627,9 @@
}
impl Rem<&i32> for IVec4 {
- type Output = IVec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i32) -> IVec4 {
+ fn rem(self, rhs: &i32) -> Self {
self.rem(*rhs)
}
}
@@ -1662,7 +1663,7 @@
impl RemAssign<&i32> for IVec4 {
#[inline]
fn rem_assign(&mut self, rhs: &i32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1707,7 +1708,7 @@
impl AsRef<[i32; 4]> for IVec4 {
#[inline]
fn as_ref(&self) -> &[i32; 4] {
- unsafe { &*(self as *const IVec4 as *const [i32; 4]) }
+ unsafe { &*(self as *const Self as *const [i32; 4]) }
}
}
@@ -1715,7 +1716,7 @@
impl AsMut<[i32; 4]> for IVec4 {
#[inline]
fn as_mut(&mut self) -> &mut [i32; 4] {
- unsafe { &mut *(self as *mut IVec4 as *mut [i32; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [i32; 4]) }
}
}
@@ -1783,7 +1784,7 @@
impl Not for IVec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1793,6 +1794,14 @@
}
}
+impl Not for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn not(self) -> IVec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for IVec4 {
type Output = Self;
#[inline]
@@ -1806,6 +1815,44 @@
}
}
+impl BitAnd<&Self> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitand(self, rhs: &IVec4) -> IVec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitand(self, rhs: IVec4) -> IVec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for IVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for IVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for IVec4 {
type Output = Self;
#[inline]
@@ -1819,6 +1866,44 @@
}
}
+impl BitOr<&Self> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitor(self, rhs: &IVec4) -> IVec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitor(self, rhs: IVec4) -> IVec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for IVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for IVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for IVec4 {
type Output = Self;
#[inline]
@@ -1832,6 +1917,44 @@
}
}
+impl BitXor<&Self> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitxor(self, rhs: &IVec4) -> IVec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitxor(self, rhs: IVec4) -> IVec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for IVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for IVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i32> for IVec4 {
type Output = Self;
#[inline]
@@ -1845,6 +1968,44 @@
}
}
+impl BitAnd<&i32> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i32) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitand(self, rhs: &i32) -> IVec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitand(self, rhs: i32) -> IVec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i32> for IVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i32) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i32> for IVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i32) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i32> for IVec4 {
type Output = Self;
#[inline]
@@ -1858,6 +2019,44 @@
}
}
+impl BitOr<&i32> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i32) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitor(self, rhs: &i32) -> IVec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitor(self, rhs: i32) -> IVec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i32> for IVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i32) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i32> for IVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i32) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i32> for IVec4 {
type Output = Self;
#[inline]
@@ -1871,6 +2070,44 @@
}
}
+impl BitXor<&i32> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i32) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitxor(self, rhs: &i32) -> IVec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn bitxor(self, rhs: i32) -> IVec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i32> for IVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i32) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i32> for IVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i32) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for IVec4 {
type Output = Self;
#[inline]
@@ -1884,6 +2121,44 @@
}
}
+impl Shl<&i8> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for IVec4 {
type Output = Self;
#[inline]
@@ -1897,6 +2172,44 @@
}
}
+impl Shr<&i8> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for IVec4 {
type Output = Self;
#[inline]
@@ -1910,6 +2223,44 @@
}
}
+impl Shl<&i16> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for IVec4 {
type Output = Self;
#[inline]
@@ -1923,6 +2274,44 @@
}
}
+impl Shr<&i16> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for IVec4 {
type Output = Self;
#[inline]
@@ -1936,6 +2325,44 @@
}
}
+impl Shl<&i32> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for IVec4 {
type Output = Self;
#[inline]
@@ -1949,6 +2376,44 @@
}
}
+impl Shr<&i32> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for IVec4 {
type Output = Self;
#[inline]
@@ -1962,6 +2427,44 @@
}
}
+impl Shl<&i64> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for IVec4 {
type Output = Self;
#[inline]
@@ -1975,6 +2478,44 @@
}
}
+impl Shr<&i64> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for IVec4 {
type Output = Self;
#[inline]
@@ -1988,6 +2529,44 @@
}
}
+impl Shl<&u8> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for IVec4 {
type Output = Self;
#[inline]
@@ -2001,6 +2580,44 @@
}
}
+impl Shr<&u8> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for IVec4 {
type Output = Self;
#[inline]
@@ -2014,6 +2631,44 @@
}
}
+impl Shl<&u16> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for IVec4 {
type Output = Self;
#[inline]
@@ -2027,6 +2682,44 @@
}
}
+impl Shr<&u16> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for IVec4 {
type Output = Self;
#[inline]
@@ -2040,6 +2733,44 @@
}
}
+impl Shl<&u32> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for IVec4 {
type Output = Self;
#[inline]
@@ -2053,6 +2784,44 @@
}
}
+impl Shr<&u32> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for IVec4 {
type Output = Self;
#[inline]
@@ -2066,6 +2835,44 @@
}
}
+impl Shl<&u64> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for IVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for IVec4 {
type Output = Self;
#[inline]
@@ -2079,10 +2886,48 @@
}
}
-impl Shl<crate::IVec4> for IVec4 {
+impl Shr<&u64> for IVec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for IVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: Self) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -2092,10 +2937,34 @@
}
}
-impl Shr<crate::IVec4> for IVec4 {
+impl Shl<&Self> for IVec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &Self) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: Self) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -2105,10 +2974,34 @@
}
}
-impl Shl<crate::UVec4> for IVec4 {
+impl Shr<&Self> for IVec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &Self) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec4> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -2118,10 +3011,34 @@
}
}
-impl Shr<crate::UVec4> for IVec4 {
+impl Shl<&UVec4> for IVec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &UVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> IVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> IVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec4> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -2131,6 +3048,30 @@
}
}
+impl Shr<&UVec4> for IVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> IVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &IVec4 {
+ type Output = IVec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> IVec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for IVec4 {
type Output = i32;
#[inline]
diff --git a/crates/glam/src/i64/i64vec2.rs b/crates/glam/src/i64/i64vec2.rs
index 0328239..2c078b4 100644
--- a/crates/glam/src/i64/i64vec2.rs
+++ b/crates/glam/src/i64/i64vec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -416,8 +417,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u64 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> u64 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -427,9 +428,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u64> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -437,9 +438,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u64 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u64 {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -808,7 +809,7 @@
}
}
-impl Div<I64Vec2> for I64Vec2 {
+impl Div for I64Vec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -819,10 +820,10 @@
}
}
-impl Div<&I64Vec2> for I64Vec2 {
- type Output = I64Vec2;
+impl Div<&Self> for I64Vec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I64Vec2) -> I64Vec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -843,7 +844,7 @@
}
}
-impl DivAssign<I64Vec2> for I64Vec2 {
+impl DivAssign for I64Vec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -851,10 +852,10 @@
}
}
-impl DivAssign<&I64Vec2> for I64Vec2 {
+impl DivAssign<&Self> for I64Vec2 {
#[inline]
- fn div_assign(&mut self, rhs: &I64Vec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -870,9 +871,9 @@
}
impl Div<&i64> for I64Vec2 {
- type Output = I64Vec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i64) -> I64Vec2 {
+ fn div(self, rhs: &i64) -> Self {
self.div(*rhs)
}
}
@@ -904,7 +905,7 @@
impl DivAssign<&i64> for I64Vec2 {
#[inline]
fn div_assign(&mut self, rhs: &i64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -943,7 +944,7 @@
}
}
-impl Mul<I64Vec2> for I64Vec2 {
+impl Mul for I64Vec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -954,10 +955,10 @@
}
}
-impl Mul<&I64Vec2> for I64Vec2 {
- type Output = I64Vec2;
+impl Mul<&Self> for I64Vec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I64Vec2) -> I64Vec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -978,7 +979,7 @@
}
}
-impl MulAssign<I64Vec2> for I64Vec2 {
+impl MulAssign for I64Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -986,10 +987,10 @@
}
}
-impl MulAssign<&I64Vec2> for I64Vec2 {
+impl MulAssign<&Self> for I64Vec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &I64Vec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1005,9 +1006,9 @@
}
impl Mul<&i64> for I64Vec2 {
- type Output = I64Vec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i64) -> I64Vec2 {
+ fn mul(self, rhs: &i64) -> Self {
self.mul(*rhs)
}
}
@@ -1039,7 +1040,7 @@
impl MulAssign<&i64> for I64Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: &i64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1078,7 +1079,7 @@
}
}
-impl Add<I64Vec2> for I64Vec2 {
+impl Add for I64Vec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1089,10 +1090,10 @@
}
}
-impl Add<&I64Vec2> for I64Vec2 {
- type Output = I64Vec2;
+impl Add<&Self> for I64Vec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I64Vec2) -> I64Vec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1113,7 +1114,7 @@
}
}
-impl AddAssign<I64Vec2> for I64Vec2 {
+impl AddAssign for I64Vec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1121,10 +1122,10 @@
}
}
-impl AddAssign<&I64Vec2> for I64Vec2 {
+impl AddAssign<&Self> for I64Vec2 {
#[inline]
- fn add_assign(&mut self, rhs: &I64Vec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1140,9 +1141,9 @@
}
impl Add<&i64> for I64Vec2 {
- type Output = I64Vec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i64) -> I64Vec2 {
+ fn add(self, rhs: &i64) -> Self {
self.add(*rhs)
}
}
@@ -1174,7 +1175,7 @@
impl AddAssign<&i64> for I64Vec2 {
#[inline]
fn add_assign(&mut self, rhs: &i64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1213,7 +1214,7 @@
}
}
-impl Sub<I64Vec2> for I64Vec2 {
+impl Sub for I64Vec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1224,10 +1225,10 @@
}
}
-impl Sub<&I64Vec2> for I64Vec2 {
- type Output = I64Vec2;
+impl Sub<&Self> for I64Vec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I64Vec2) -> I64Vec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1248,18 +1249,18 @@
}
}
-impl SubAssign<I64Vec2> for I64Vec2 {
+impl SubAssign for I64Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: I64Vec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&I64Vec2> for I64Vec2 {
+impl SubAssign<&Self> for I64Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &I64Vec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1275,9 +1276,9 @@
}
impl Sub<&i64> for I64Vec2 {
- type Output = I64Vec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i64) -> I64Vec2 {
+ fn sub(self, rhs: &i64) -> Self {
self.sub(*rhs)
}
}
@@ -1309,7 +1310,7 @@
impl SubAssign<&i64> for I64Vec2 {
#[inline]
fn sub_assign(&mut self, rhs: &i64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1348,7 +1349,7 @@
}
}
-impl Rem<I64Vec2> for I64Vec2 {
+impl Rem for I64Vec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1359,10 +1360,10 @@
}
}
-impl Rem<&I64Vec2> for I64Vec2 {
- type Output = I64Vec2;
+impl Rem<&Self> for I64Vec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I64Vec2) -> I64Vec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1383,7 +1384,7 @@
}
}
-impl RemAssign<I64Vec2> for I64Vec2 {
+impl RemAssign for I64Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1391,10 +1392,10 @@
}
}
-impl RemAssign<&I64Vec2> for I64Vec2 {
+impl RemAssign<&Self> for I64Vec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &I64Vec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1410,9 +1411,9 @@
}
impl Rem<&i64> for I64Vec2 {
- type Output = I64Vec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i64) -> I64Vec2 {
+ fn rem(self, rhs: &i64) -> Self {
self.rem(*rhs)
}
}
@@ -1444,7 +1445,7 @@
impl RemAssign<&i64> for I64Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: &i64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1487,7 +1488,7 @@
impl AsRef<[i64; 2]> for I64Vec2 {
#[inline]
fn as_ref(&self) -> &[i64; 2] {
- unsafe { &*(self as *const I64Vec2 as *const [i64; 2]) }
+ unsafe { &*(self as *const Self as *const [i64; 2]) }
}
}
@@ -1495,7 +1496,7 @@
impl AsMut<[i64; 2]> for I64Vec2 {
#[inline]
fn as_mut(&mut self) -> &mut [i64; 2] {
- unsafe { &mut *(self as *mut I64Vec2 as *mut [i64; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [i64; 2]) }
}
}
@@ -1561,7 +1562,7 @@
impl Not for I64Vec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1569,6 +1570,14 @@
}
}
+impl Not for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn not(self) -> I64Vec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I64Vec2 {
type Output = Self;
#[inline]
@@ -1580,6 +1589,44 @@
}
}
+impl BitAnd<&Self> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I64Vec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitand(self, rhs: &I64Vec2) -> I64Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I64Vec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitand(self, rhs: I64Vec2) -> I64Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I64Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I64Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I64Vec2 {
type Output = Self;
#[inline]
@@ -1591,6 +1638,44 @@
}
}
+impl BitOr<&Self> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I64Vec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitor(self, rhs: &I64Vec2) -> I64Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I64Vec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitor(self, rhs: I64Vec2) -> I64Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I64Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I64Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I64Vec2 {
type Output = Self;
#[inline]
@@ -1602,6 +1687,44 @@
}
}
+impl BitXor<&Self> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I64Vec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &I64Vec2) -> I64Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I64Vec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitxor(self, rhs: I64Vec2) -> I64Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I64Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I64Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i64> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1613,6 +1736,44 @@
}
}
+impl BitAnd<&i64> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i64) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitand(self, rhs: &i64) -> I64Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitand(self, rhs: i64) -> I64Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i64> for I64Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i64) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i64> for I64Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i64) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i64> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1624,6 +1785,44 @@
}
}
+impl BitOr<&i64> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i64) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitor(self, rhs: &i64) -> I64Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitor(self, rhs: i64) -> I64Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i64> for I64Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i64) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i64> for I64Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i64) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i64> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1635,6 +1834,44 @@
}
}
+impl BitXor<&i64> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i64) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &i64) -> I64Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn bitxor(self, rhs: i64) -> I64Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i64> for I64Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i64) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i64> for I64Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i64) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1646,6 +1883,44 @@
}
}
+impl Shl<&i8> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1657,6 +1932,44 @@
}
}
+impl Shr<&i8> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1668,6 +1981,44 @@
}
}
+impl Shl<&i16> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1679,6 +2030,44 @@
}
}
+impl Shr<&i16> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1690,6 +2079,44 @@
}
}
+impl Shl<&i32> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1701,6 +2128,44 @@
}
}
+impl Shr<&i32> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1712,6 +2177,44 @@
}
}
+impl Shl<&i64> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1723,6 +2226,44 @@
}
}
+impl Shr<&i64> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1734,6 +2275,44 @@
}
}
+impl Shl<&u8> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1745,6 +2324,44 @@
}
}
+impl Shr<&u8> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1756,6 +2373,44 @@
}
}
+impl Shl<&u16> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1767,6 +2422,44 @@
}
}
+impl Shr<&u16> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1778,6 +2471,44 @@
}
}
+impl Shl<&u32> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1789,6 +2520,44 @@
}
}
+impl Shr<&u32> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1800,6 +2569,44 @@
}
}
+impl Shl<&u64> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I64Vec2 {
type Output = Self;
#[inline]
@@ -1811,10 +2618,48 @@
}
}
-impl Shl<crate::IVec2> for I64Vec2 {
+impl Shr<&u64> for I64Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec2> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1822,10 +2667,34 @@
}
}
-impl Shr<crate::IVec2> for I64Vec2 {
+impl Shl<&IVec2> for I64Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &IVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec2> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1833,10 +2702,34 @@
}
}
-impl Shl<crate::UVec2> for I64Vec2 {
+impl Shr<&IVec2> for I64Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &IVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec2> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1844,10 +2737,34 @@
}
}
-impl Shr<crate::UVec2> for I64Vec2 {
+impl Shl<&UVec2> for I64Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &UVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> I64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> I64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec2> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1855,6 +2772,30 @@
}
}
+impl Shr<&UVec2> for I64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> I64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &I64Vec2 {
+ type Output = I64Vec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> I64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I64Vec2 {
type Output = i64;
#[inline]
diff --git a/crates/glam/src/i64/i64vec3.rs b/crates/glam/src/i64/i64vec3.rs
index 6779f81..631bb2f 100644
--- a/crates/glam/src/i64/i64vec3.rs
+++ b/crates/glam/src/i64/i64vec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct I64Vec3 {
@@ -491,8 +492,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u64 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> u64 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -502,10 +503,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u64> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -513,12 +514,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u64 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u64 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -898,7 +899,7 @@
}
}
-impl Div<I64Vec3> for I64Vec3 {
+impl Div for I64Vec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -910,10 +911,10 @@
}
}
-impl Div<&I64Vec3> for I64Vec3 {
- type Output = I64Vec3;
+impl Div<&Self> for I64Vec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I64Vec3) -> I64Vec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -934,7 +935,7 @@
}
}
-impl DivAssign<I64Vec3> for I64Vec3 {
+impl DivAssign for I64Vec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -943,10 +944,10 @@
}
}
-impl DivAssign<&I64Vec3> for I64Vec3 {
+impl DivAssign<&Self> for I64Vec3 {
#[inline]
- fn div_assign(&mut self, rhs: &I64Vec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -963,9 +964,9 @@
}
impl Div<&i64> for I64Vec3 {
- type Output = I64Vec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i64) -> I64Vec3 {
+ fn div(self, rhs: &i64) -> Self {
self.div(*rhs)
}
}
@@ -998,7 +999,7 @@
impl DivAssign<&i64> for I64Vec3 {
#[inline]
fn div_assign(&mut self, rhs: &i64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1038,7 +1039,7 @@
}
}
-impl Mul<I64Vec3> for I64Vec3 {
+impl Mul for I64Vec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1050,10 +1051,10 @@
}
}
-impl Mul<&I64Vec3> for I64Vec3 {
- type Output = I64Vec3;
+impl Mul<&Self> for I64Vec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I64Vec3) -> I64Vec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1074,7 +1075,7 @@
}
}
-impl MulAssign<I64Vec3> for I64Vec3 {
+impl MulAssign for I64Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1083,10 +1084,10 @@
}
}
-impl MulAssign<&I64Vec3> for I64Vec3 {
+impl MulAssign<&Self> for I64Vec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &I64Vec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1103,9 +1104,9 @@
}
impl Mul<&i64> for I64Vec3 {
- type Output = I64Vec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i64) -> I64Vec3 {
+ fn mul(self, rhs: &i64) -> Self {
self.mul(*rhs)
}
}
@@ -1138,7 +1139,7 @@
impl MulAssign<&i64> for I64Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: &i64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1178,7 +1179,7 @@
}
}
-impl Add<I64Vec3> for I64Vec3 {
+impl Add for I64Vec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1190,10 +1191,10 @@
}
}
-impl Add<&I64Vec3> for I64Vec3 {
- type Output = I64Vec3;
+impl Add<&Self> for I64Vec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I64Vec3) -> I64Vec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1214,7 +1215,7 @@
}
}
-impl AddAssign<I64Vec3> for I64Vec3 {
+impl AddAssign for I64Vec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1223,10 +1224,10 @@
}
}
-impl AddAssign<&I64Vec3> for I64Vec3 {
+impl AddAssign<&Self> for I64Vec3 {
#[inline]
- fn add_assign(&mut self, rhs: &I64Vec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1243,9 +1244,9 @@
}
impl Add<&i64> for I64Vec3 {
- type Output = I64Vec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i64) -> I64Vec3 {
+ fn add(self, rhs: &i64) -> Self {
self.add(*rhs)
}
}
@@ -1278,7 +1279,7 @@
impl AddAssign<&i64> for I64Vec3 {
#[inline]
fn add_assign(&mut self, rhs: &i64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1318,7 +1319,7 @@
}
}
-impl Sub<I64Vec3> for I64Vec3 {
+impl Sub for I64Vec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1330,10 +1331,10 @@
}
}
-impl Sub<&I64Vec3> for I64Vec3 {
- type Output = I64Vec3;
+impl Sub<&Self> for I64Vec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I64Vec3) -> I64Vec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1354,19 +1355,19 @@
}
}
-impl SubAssign<I64Vec3> for I64Vec3 {
+impl SubAssign for I64Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: I64Vec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&I64Vec3> for I64Vec3 {
+impl SubAssign<&Self> for I64Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &I64Vec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1383,9 +1384,9 @@
}
impl Sub<&i64> for I64Vec3 {
- type Output = I64Vec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i64) -> I64Vec3 {
+ fn sub(self, rhs: &i64) -> Self {
self.sub(*rhs)
}
}
@@ -1418,7 +1419,7 @@
impl SubAssign<&i64> for I64Vec3 {
#[inline]
fn sub_assign(&mut self, rhs: &i64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1458,7 +1459,7 @@
}
}
-impl Rem<I64Vec3> for I64Vec3 {
+impl Rem for I64Vec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1470,10 +1471,10 @@
}
}
-impl Rem<&I64Vec3> for I64Vec3 {
- type Output = I64Vec3;
+impl Rem<&Self> for I64Vec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I64Vec3) -> I64Vec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1494,7 +1495,7 @@
}
}
-impl RemAssign<I64Vec3> for I64Vec3 {
+impl RemAssign for I64Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1503,10 +1504,10 @@
}
}
-impl RemAssign<&I64Vec3> for I64Vec3 {
+impl RemAssign<&Self> for I64Vec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &I64Vec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1523,9 +1524,9 @@
}
impl Rem<&i64> for I64Vec3 {
- type Output = I64Vec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i64) -> I64Vec3 {
+ fn rem(self, rhs: &i64) -> Self {
self.rem(*rhs)
}
}
@@ -1558,7 +1559,7 @@
impl RemAssign<&i64> for I64Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: &i64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1602,7 +1603,7 @@
impl AsRef<[i64; 3]> for I64Vec3 {
#[inline]
fn as_ref(&self) -> &[i64; 3] {
- unsafe { &*(self as *const I64Vec3 as *const [i64; 3]) }
+ unsafe { &*(self as *const Self as *const [i64; 3]) }
}
}
@@ -1610,7 +1611,7 @@
impl AsMut<[i64; 3]> for I64Vec3 {
#[inline]
fn as_mut(&mut self) -> &mut [i64; 3] {
- unsafe { &mut *(self as *mut I64Vec3 as *mut [i64; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [i64; 3]) }
}
}
@@ -1677,7 +1678,7 @@
impl Not for I64Vec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1686,6 +1687,14 @@
}
}
+impl Not for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn not(self) -> I64Vec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I64Vec3 {
type Output = Self;
#[inline]
@@ -1698,6 +1707,44 @@
}
}
+impl BitAnd<&Self> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I64Vec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitand(self, rhs: &I64Vec3) -> I64Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I64Vec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitand(self, rhs: I64Vec3) -> I64Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I64Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I64Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I64Vec3 {
type Output = Self;
#[inline]
@@ -1710,6 +1757,44 @@
}
}
+impl BitOr<&Self> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I64Vec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitor(self, rhs: &I64Vec3) -> I64Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I64Vec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitor(self, rhs: I64Vec3) -> I64Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I64Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I64Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I64Vec3 {
type Output = Self;
#[inline]
@@ -1722,6 +1807,44 @@
}
}
+impl BitXor<&Self> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I64Vec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &I64Vec3) -> I64Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I64Vec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitxor(self, rhs: I64Vec3) -> I64Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I64Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I64Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i64> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1734,6 +1857,44 @@
}
}
+impl BitAnd<&i64> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i64) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitand(self, rhs: &i64) -> I64Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitand(self, rhs: i64) -> I64Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i64> for I64Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i64) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i64> for I64Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i64) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i64> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1746,6 +1907,44 @@
}
}
+impl BitOr<&i64> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i64) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitor(self, rhs: &i64) -> I64Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitor(self, rhs: i64) -> I64Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i64> for I64Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i64) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i64> for I64Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i64) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i64> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1758,6 +1957,44 @@
}
}
+impl BitXor<&i64> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i64) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &i64) -> I64Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn bitxor(self, rhs: i64) -> I64Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i64> for I64Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i64) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i64> for I64Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i64) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1770,6 +2007,44 @@
}
}
+impl Shl<&i8> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1782,6 +2057,44 @@
}
}
+impl Shr<&i8> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1794,6 +2107,44 @@
}
}
+impl Shl<&i16> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1806,6 +2157,44 @@
}
}
+impl Shr<&i16> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1818,6 +2207,44 @@
}
}
+impl Shl<&i32> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1830,6 +2257,44 @@
}
}
+impl Shr<&i32> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1842,6 +2307,44 @@
}
}
+impl Shl<&i64> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1854,6 +2357,44 @@
}
}
+impl Shr<&i64> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1866,6 +2407,44 @@
}
}
+impl Shl<&u8> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1878,6 +2457,44 @@
}
}
+impl Shr<&u8> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1890,6 +2507,44 @@
}
}
+impl Shl<&u16> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1902,6 +2557,44 @@
}
}
+impl Shr<&u16> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1914,6 +2607,44 @@
}
}
+impl Shl<&u32> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1926,6 +2657,44 @@
}
}
+impl Shr<&u32> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1938,6 +2707,44 @@
}
}
+impl Shl<&u64> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I64Vec3 {
type Output = Self;
#[inline]
@@ -1950,10 +2757,48 @@
}
}
-impl Shl<crate::IVec3> for I64Vec3 {
+impl Shr<&u64> for I64Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec3> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1962,10 +2807,34 @@
}
}
-impl Shr<crate::IVec3> for I64Vec3 {
+impl Shl<&IVec3> for I64Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &IVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec3> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1974,10 +2843,34 @@
}
}
-impl Shl<crate::UVec3> for I64Vec3 {
+impl Shr<&IVec3> for I64Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &IVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec3> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1986,10 +2879,34 @@
}
}
-impl Shr<crate::UVec3> for I64Vec3 {
+impl Shl<&UVec3> for I64Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &UVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> I64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> I64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec3> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1998,6 +2915,30 @@
}
}
+impl Shr<&UVec3> for I64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> I64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &I64Vec3 {
+ type Output = I64Vec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> I64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I64Vec3 {
type Output = i64;
#[inline]
diff --git a/crates/glam/src/i64/i64vec4.rs b/crates/glam/src/i64/i64vec4.rs
index 0b202aa..3340cc6 100644
--- a/crates/glam/src/i64/i64vec4.rs
+++ b/crates/glam/src/i64/i64vec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -532,11 +533,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u64 {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> u64 {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -546,11 +547,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u64> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -558,13 +559,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u64 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u64 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -978,7 +979,7 @@
}
}
-impl Div<I64Vec4> for I64Vec4 {
+impl Div for I64Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -991,10 +992,10 @@
}
}
-impl Div<&I64Vec4> for I64Vec4 {
- type Output = I64Vec4;
+impl Div<&Self> for I64Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I64Vec4) -> I64Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1015,7 +1016,7 @@
}
}
-impl DivAssign<I64Vec4> for I64Vec4 {
+impl DivAssign for I64Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1025,10 +1026,10 @@
}
}
-impl DivAssign<&I64Vec4> for I64Vec4 {
+impl DivAssign<&Self> for I64Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &I64Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1046,9 +1047,9 @@
}
impl Div<&i64> for I64Vec4 {
- type Output = I64Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i64) -> I64Vec4 {
+ fn div(self, rhs: &i64) -> Self {
self.div(*rhs)
}
}
@@ -1082,7 +1083,7 @@
impl DivAssign<&i64> for I64Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &i64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1123,7 +1124,7 @@
}
}
-impl Mul<I64Vec4> for I64Vec4 {
+impl Mul for I64Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1136,10 +1137,10 @@
}
}
-impl Mul<&I64Vec4> for I64Vec4 {
- type Output = I64Vec4;
+impl Mul<&Self> for I64Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I64Vec4) -> I64Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1160,7 +1161,7 @@
}
}
-impl MulAssign<I64Vec4> for I64Vec4 {
+impl MulAssign for I64Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1170,10 +1171,10 @@
}
}
-impl MulAssign<&I64Vec4> for I64Vec4 {
+impl MulAssign<&Self> for I64Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &I64Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1191,9 +1192,9 @@
}
impl Mul<&i64> for I64Vec4 {
- type Output = I64Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i64) -> I64Vec4 {
+ fn mul(self, rhs: &i64) -> Self {
self.mul(*rhs)
}
}
@@ -1227,7 +1228,7 @@
impl MulAssign<&i64> for I64Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &i64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1268,7 +1269,7 @@
}
}
-impl Add<I64Vec4> for I64Vec4 {
+impl Add for I64Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1281,10 +1282,10 @@
}
}
-impl Add<&I64Vec4> for I64Vec4 {
- type Output = I64Vec4;
+impl Add<&Self> for I64Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I64Vec4) -> I64Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1305,7 +1306,7 @@
}
}
-impl AddAssign<I64Vec4> for I64Vec4 {
+impl AddAssign for I64Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1315,10 +1316,10 @@
}
}
-impl AddAssign<&I64Vec4> for I64Vec4 {
+impl AddAssign<&Self> for I64Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &I64Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1336,9 +1337,9 @@
}
impl Add<&i64> for I64Vec4 {
- type Output = I64Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i64) -> I64Vec4 {
+ fn add(self, rhs: &i64) -> Self {
self.add(*rhs)
}
}
@@ -1372,7 +1373,7 @@
impl AddAssign<&i64> for I64Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &i64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1413,7 +1414,7 @@
}
}
-impl Sub<I64Vec4> for I64Vec4 {
+impl Sub for I64Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1426,10 +1427,10 @@
}
}
-impl Sub<&I64Vec4> for I64Vec4 {
- type Output = I64Vec4;
+impl Sub<&Self> for I64Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I64Vec4) -> I64Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1450,9 +1451,9 @@
}
}
-impl SubAssign<I64Vec4> for I64Vec4 {
+impl SubAssign for I64Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: I64Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1460,10 +1461,10 @@
}
}
-impl SubAssign<&I64Vec4> for I64Vec4 {
+impl SubAssign<&Self> for I64Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &I64Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1481,9 +1482,9 @@
}
impl Sub<&i64> for I64Vec4 {
- type Output = I64Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i64) -> I64Vec4 {
+ fn sub(self, rhs: &i64) -> Self {
self.sub(*rhs)
}
}
@@ -1517,7 +1518,7 @@
impl SubAssign<&i64> for I64Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &i64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1558,7 +1559,7 @@
}
}
-impl Rem<I64Vec4> for I64Vec4 {
+impl Rem for I64Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1571,10 +1572,10 @@
}
}
-impl Rem<&I64Vec4> for I64Vec4 {
- type Output = I64Vec4;
+impl Rem<&Self> for I64Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I64Vec4) -> I64Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1595,7 +1596,7 @@
}
}
-impl RemAssign<I64Vec4> for I64Vec4 {
+impl RemAssign for I64Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1605,10 +1606,10 @@
}
}
-impl RemAssign<&I64Vec4> for I64Vec4 {
+impl RemAssign<&Self> for I64Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &I64Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1626,9 +1627,9 @@
}
impl Rem<&i64> for I64Vec4 {
- type Output = I64Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i64) -> I64Vec4 {
+ fn rem(self, rhs: &i64) -> Self {
self.rem(*rhs)
}
}
@@ -1662,7 +1663,7 @@
impl RemAssign<&i64> for I64Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &i64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1707,7 +1708,7 @@
impl AsRef<[i64; 4]> for I64Vec4 {
#[inline]
fn as_ref(&self) -> &[i64; 4] {
- unsafe { &*(self as *const I64Vec4 as *const [i64; 4]) }
+ unsafe { &*(self as *const Self as *const [i64; 4]) }
}
}
@@ -1715,7 +1716,7 @@
impl AsMut<[i64; 4]> for I64Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [i64; 4] {
- unsafe { &mut *(self as *mut I64Vec4 as *mut [i64; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [i64; 4]) }
}
}
@@ -1783,7 +1784,7 @@
impl Not for I64Vec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1793,6 +1794,14 @@
}
}
+impl Not for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn not(self) -> I64Vec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I64Vec4 {
type Output = Self;
#[inline]
@@ -1806,6 +1815,44 @@
}
}
+impl BitAnd<&Self> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I64Vec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitand(self, rhs: &I64Vec4) -> I64Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I64Vec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitand(self, rhs: I64Vec4) -> I64Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I64Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I64Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I64Vec4 {
type Output = Self;
#[inline]
@@ -1819,6 +1866,44 @@
}
}
+impl BitOr<&Self> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I64Vec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitor(self, rhs: &I64Vec4) -> I64Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I64Vec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitor(self, rhs: I64Vec4) -> I64Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I64Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I64Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I64Vec4 {
type Output = Self;
#[inline]
@@ -1832,6 +1917,44 @@
}
}
+impl BitXor<&Self> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I64Vec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &I64Vec4) -> I64Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I64Vec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitxor(self, rhs: I64Vec4) -> I64Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I64Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I64Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i64> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1845,6 +1968,44 @@
}
}
+impl BitAnd<&i64> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i64) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitand(self, rhs: &i64) -> I64Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitand(self, rhs: i64) -> I64Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i64> for I64Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i64) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i64> for I64Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i64) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i64> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1858,6 +2019,44 @@
}
}
+impl BitOr<&i64> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i64) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitor(self, rhs: &i64) -> I64Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitor(self, rhs: i64) -> I64Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i64> for I64Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i64) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i64> for I64Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i64) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i64> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1871,6 +2070,44 @@
}
}
+impl BitXor<&i64> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i64) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &i64) -> I64Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn bitxor(self, rhs: i64) -> I64Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i64> for I64Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i64) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i64> for I64Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i64) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1884,6 +2121,44 @@
}
}
+impl Shl<&i8> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1897,6 +2172,44 @@
}
}
+impl Shr<&i8> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1910,6 +2223,44 @@
}
}
+impl Shl<&i16> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1923,6 +2274,44 @@
}
}
+impl Shr<&i16> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1936,6 +2325,44 @@
}
}
+impl Shl<&i32> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1949,6 +2376,44 @@
}
}
+impl Shr<&i32> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1962,6 +2427,44 @@
}
}
+impl Shl<&i64> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1975,6 +2478,44 @@
}
}
+impl Shr<&i64> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I64Vec4 {
type Output = Self;
#[inline]
@@ -1988,6 +2529,44 @@
}
}
+impl Shl<&u8> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I64Vec4 {
type Output = Self;
#[inline]
@@ -2001,6 +2580,44 @@
}
}
+impl Shr<&u8> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I64Vec4 {
type Output = Self;
#[inline]
@@ -2014,6 +2631,44 @@
}
}
+impl Shl<&u16> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I64Vec4 {
type Output = Self;
#[inline]
@@ -2027,6 +2682,44 @@
}
}
+impl Shr<&u16> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I64Vec4 {
type Output = Self;
#[inline]
@@ -2040,6 +2733,44 @@
}
}
+impl Shl<&u32> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I64Vec4 {
type Output = Self;
#[inline]
@@ -2053,6 +2784,44 @@
}
}
+impl Shr<&u32> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I64Vec4 {
type Output = Self;
#[inline]
@@ -2066,6 +2835,44 @@
}
}
+impl Shl<&u64> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I64Vec4 {
type Output = Self;
#[inline]
@@ -2079,10 +2886,48 @@
}
}
-impl Shl<crate::IVec4> for I64Vec4 {
+impl Shr<&u64> for I64Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec4> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -2092,10 +2937,34 @@
}
}
-impl Shr<crate::IVec4> for I64Vec4 {
+impl Shl<&IVec4> for I64Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &IVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec4> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -2105,10 +2974,34 @@
}
}
-impl Shl<crate::UVec4> for I64Vec4 {
+impl Shr<&IVec4> for I64Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &IVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec4> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -2118,10 +3011,34 @@
}
}
-impl Shr<crate::UVec4> for I64Vec4 {
+impl Shl<&UVec4> for I64Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &UVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> I64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> I64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec4> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -2131,6 +3048,30 @@
}
}
+impl Shr<&UVec4> for I64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> I64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &I64Vec4 {
+ type Output = I64Vec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> I64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I64Vec4 {
type Output = i64;
#[inline]
diff --git a/crates/glam/src/i8/i8vec2.rs b/crates/glam/src/i8/i8vec2.rs
index 09913d9..89298c3 100644
--- a/crates/glam/src/i8/i8vec2.rs
+++ b/crates/glam/src/i8/i8vec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(2)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -416,8 +417,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u8 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> u8 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -427,9 +428,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u8> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u8> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -437,9 +438,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u8 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u8 {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -808,7 +809,7 @@
}
}
-impl Div<I8Vec2> for I8Vec2 {
+impl Div for I8Vec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -819,10 +820,10 @@
}
}
-impl Div<&I8Vec2> for I8Vec2 {
- type Output = I8Vec2;
+impl Div<&Self> for I8Vec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I8Vec2) -> I8Vec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -843,7 +844,7 @@
}
}
-impl DivAssign<I8Vec2> for I8Vec2 {
+impl DivAssign for I8Vec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -851,10 +852,10 @@
}
}
-impl DivAssign<&I8Vec2> for I8Vec2 {
+impl DivAssign<&Self> for I8Vec2 {
#[inline]
- fn div_assign(&mut self, rhs: &I8Vec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -870,9 +871,9 @@
}
impl Div<&i8> for I8Vec2 {
- type Output = I8Vec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i8) -> I8Vec2 {
+ fn div(self, rhs: &i8) -> Self {
self.div(*rhs)
}
}
@@ -904,7 +905,7 @@
impl DivAssign<&i8> for I8Vec2 {
#[inline]
fn div_assign(&mut self, rhs: &i8) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -943,7 +944,7 @@
}
}
-impl Mul<I8Vec2> for I8Vec2 {
+impl Mul for I8Vec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -954,10 +955,10 @@
}
}
-impl Mul<&I8Vec2> for I8Vec2 {
- type Output = I8Vec2;
+impl Mul<&Self> for I8Vec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I8Vec2) -> I8Vec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -978,7 +979,7 @@
}
}
-impl MulAssign<I8Vec2> for I8Vec2 {
+impl MulAssign for I8Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -986,10 +987,10 @@
}
}
-impl MulAssign<&I8Vec2> for I8Vec2 {
+impl MulAssign<&Self> for I8Vec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &I8Vec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1005,9 +1006,9 @@
}
impl Mul<&i8> for I8Vec2 {
- type Output = I8Vec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i8) -> I8Vec2 {
+ fn mul(self, rhs: &i8) -> Self {
self.mul(*rhs)
}
}
@@ -1039,7 +1040,7 @@
impl MulAssign<&i8> for I8Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: &i8) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1078,7 +1079,7 @@
}
}
-impl Add<I8Vec2> for I8Vec2 {
+impl Add for I8Vec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1089,10 +1090,10 @@
}
}
-impl Add<&I8Vec2> for I8Vec2 {
- type Output = I8Vec2;
+impl Add<&Self> for I8Vec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I8Vec2) -> I8Vec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1113,7 +1114,7 @@
}
}
-impl AddAssign<I8Vec2> for I8Vec2 {
+impl AddAssign for I8Vec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1121,10 +1122,10 @@
}
}
-impl AddAssign<&I8Vec2> for I8Vec2 {
+impl AddAssign<&Self> for I8Vec2 {
#[inline]
- fn add_assign(&mut self, rhs: &I8Vec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1140,9 +1141,9 @@
}
impl Add<&i8> for I8Vec2 {
- type Output = I8Vec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i8) -> I8Vec2 {
+ fn add(self, rhs: &i8) -> Self {
self.add(*rhs)
}
}
@@ -1174,7 +1175,7 @@
impl AddAssign<&i8> for I8Vec2 {
#[inline]
fn add_assign(&mut self, rhs: &i8) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1213,7 +1214,7 @@
}
}
-impl Sub<I8Vec2> for I8Vec2 {
+impl Sub for I8Vec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1224,10 +1225,10 @@
}
}
-impl Sub<&I8Vec2> for I8Vec2 {
- type Output = I8Vec2;
+impl Sub<&Self> for I8Vec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I8Vec2) -> I8Vec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1248,18 +1249,18 @@
}
}
-impl SubAssign<I8Vec2> for I8Vec2 {
+impl SubAssign for I8Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: I8Vec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&I8Vec2> for I8Vec2 {
+impl SubAssign<&Self> for I8Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &I8Vec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1275,9 +1276,9 @@
}
impl Sub<&i8> for I8Vec2 {
- type Output = I8Vec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i8) -> I8Vec2 {
+ fn sub(self, rhs: &i8) -> Self {
self.sub(*rhs)
}
}
@@ -1309,7 +1310,7 @@
impl SubAssign<&i8> for I8Vec2 {
#[inline]
fn sub_assign(&mut self, rhs: &i8) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1348,7 +1349,7 @@
}
}
-impl Rem<I8Vec2> for I8Vec2 {
+impl Rem for I8Vec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1359,10 +1360,10 @@
}
}
-impl Rem<&I8Vec2> for I8Vec2 {
- type Output = I8Vec2;
+impl Rem<&Self> for I8Vec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I8Vec2) -> I8Vec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1383,7 +1384,7 @@
}
}
-impl RemAssign<I8Vec2> for I8Vec2 {
+impl RemAssign for I8Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1391,10 +1392,10 @@
}
}
-impl RemAssign<&I8Vec2> for I8Vec2 {
+impl RemAssign<&Self> for I8Vec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &I8Vec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1410,9 +1411,9 @@
}
impl Rem<&i8> for I8Vec2 {
- type Output = I8Vec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i8) -> I8Vec2 {
+ fn rem(self, rhs: &i8) -> Self {
self.rem(*rhs)
}
}
@@ -1444,7 +1445,7 @@
impl RemAssign<&i8> for I8Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: &i8) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1487,7 +1488,7 @@
impl AsRef<[i8; 2]> for I8Vec2 {
#[inline]
fn as_ref(&self) -> &[i8; 2] {
- unsafe { &*(self as *const I8Vec2 as *const [i8; 2]) }
+ unsafe { &*(self as *const Self as *const [i8; 2]) }
}
}
@@ -1495,7 +1496,7 @@
impl AsMut<[i8; 2]> for I8Vec2 {
#[inline]
fn as_mut(&mut self) -> &mut [i8; 2] {
- unsafe { &mut *(self as *mut I8Vec2 as *mut [i8; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [i8; 2]) }
}
}
@@ -1561,7 +1562,7 @@
impl Not for I8Vec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1569,6 +1570,14 @@
}
}
+impl Not for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn not(self) -> I8Vec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I8Vec2 {
type Output = Self;
#[inline]
@@ -1580,6 +1589,44 @@
}
}
+impl BitAnd<&Self> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I8Vec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitand(self, rhs: &I8Vec2) -> I8Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I8Vec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitand(self, rhs: I8Vec2) -> I8Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I8Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I8Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I8Vec2 {
type Output = Self;
#[inline]
@@ -1591,6 +1638,44 @@
}
}
+impl BitOr<&Self> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I8Vec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitor(self, rhs: &I8Vec2) -> I8Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I8Vec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitor(self, rhs: I8Vec2) -> I8Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I8Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I8Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I8Vec2 {
type Output = Self;
#[inline]
@@ -1602,6 +1687,44 @@
}
}
+impl BitXor<&Self> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I8Vec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &I8Vec2) -> I8Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I8Vec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitxor(self, rhs: I8Vec2) -> I8Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I8Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I8Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i8> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1613,6 +1736,44 @@
}
}
+impl BitAnd<&i8> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i8) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitand(self, rhs: &i8) -> I8Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitand(self, rhs: i8) -> I8Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i8> for I8Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i8) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i8> for I8Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i8) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i8> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1624,6 +1785,44 @@
}
}
+impl BitOr<&i8> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i8) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitor(self, rhs: &i8) -> I8Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitor(self, rhs: i8) -> I8Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i8> for I8Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i8) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i8> for I8Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i8) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i8> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1635,6 +1834,44 @@
}
}
+impl BitXor<&i8> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i8) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &i8) -> I8Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn bitxor(self, rhs: i8) -> I8Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i8> for I8Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i8) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i8> for I8Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i8) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1646,6 +1883,44 @@
}
}
+impl Shl<&i8> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1657,6 +1932,44 @@
}
}
+impl Shr<&i8> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1668,6 +1981,44 @@
}
}
+impl Shl<&i16> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1679,6 +2030,44 @@
}
}
+impl Shr<&i16> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1690,6 +2079,44 @@
}
}
+impl Shl<&i32> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1701,6 +2128,44 @@
}
}
+impl Shr<&i32> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1712,6 +2177,44 @@
}
}
+impl Shl<&i64> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1723,6 +2226,44 @@
}
}
+impl Shr<&i64> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1734,6 +2275,44 @@
}
}
+impl Shl<&u8> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1745,6 +2324,44 @@
}
}
+impl Shr<&u8> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1756,6 +2373,44 @@
}
}
+impl Shl<&u16> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1767,6 +2422,44 @@
}
}
+impl Shr<&u16> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1778,6 +2471,44 @@
}
}
+impl Shl<&u32> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1789,6 +2520,44 @@
}
}
+impl Shr<&u32> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1800,6 +2569,44 @@
}
}
+impl Shl<&u64> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I8Vec2 {
type Output = Self;
#[inline]
@@ -1811,10 +2618,48 @@
}
}
-impl Shl<crate::IVec2> for I8Vec2 {
+impl Shr<&u64> for I8Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec2> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1822,10 +2667,34 @@
}
}
-impl Shr<crate::IVec2> for I8Vec2 {
+impl Shl<&IVec2> for I8Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &IVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec2> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1833,10 +2702,34 @@
}
}
-impl Shl<crate::UVec2> for I8Vec2 {
+impl Shr<&IVec2> for I8Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &IVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec2> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1844,10 +2737,34 @@
}
}
-impl Shr<crate::UVec2> for I8Vec2 {
+impl Shl<&UVec2> for I8Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &UVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> I8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> I8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec2> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1855,6 +2772,30 @@
}
}
+impl Shr<&UVec2> for I8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> I8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &I8Vec2 {
+ type Output = I8Vec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> I8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I8Vec2 {
type Output = i8;
#[inline]
diff --git a/crates/glam/src/i8/i8vec3.rs b/crates/glam/src/i8/i8vec3.rs
index 5ab01b1..80d38ac 100644
--- a/crates/glam/src/i8/i8vec3.rs
+++ b/crates/glam/src/i8/i8vec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct I8Vec3 {
@@ -491,8 +492,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u8 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> u8 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -502,10 +503,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u8> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u8> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -513,12 +514,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u8 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u8 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -898,7 +899,7 @@
}
}
-impl Div<I8Vec3> for I8Vec3 {
+impl Div for I8Vec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -910,10 +911,10 @@
}
}
-impl Div<&I8Vec3> for I8Vec3 {
- type Output = I8Vec3;
+impl Div<&Self> for I8Vec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I8Vec3) -> I8Vec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -934,7 +935,7 @@
}
}
-impl DivAssign<I8Vec3> for I8Vec3 {
+impl DivAssign for I8Vec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -943,10 +944,10 @@
}
}
-impl DivAssign<&I8Vec3> for I8Vec3 {
+impl DivAssign<&Self> for I8Vec3 {
#[inline]
- fn div_assign(&mut self, rhs: &I8Vec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -963,9 +964,9 @@
}
impl Div<&i8> for I8Vec3 {
- type Output = I8Vec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i8) -> I8Vec3 {
+ fn div(self, rhs: &i8) -> Self {
self.div(*rhs)
}
}
@@ -998,7 +999,7 @@
impl DivAssign<&i8> for I8Vec3 {
#[inline]
fn div_assign(&mut self, rhs: &i8) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1038,7 +1039,7 @@
}
}
-impl Mul<I8Vec3> for I8Vec3 {
+impl Mul for I8Vec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1050,10 +1051,10 @@
}
}
-impl Mul<&I8Vec3> for I8Vec3 {
- type Output = I8Vec3;
+impl Mul<&Self> for I8Vec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I8Vec3) -> I8Vec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1074,7 +1075,7 @@
}
}
-impl MulAssign<I8Vec3> for I8Vec3 {
+impl MulAssign for I8Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1083,10 +1084,10 @@
}
}
-impl MulAssign<&I8Vec3> for I8Vec3 {
+impl MulAssign<&Self> for I8Vec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &I8Vec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1103,9 +1104,9 @@
}
impl Mul<&i8> for I8Vec3 {
- type Output = I8Vec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i8) -> I8Vec3 {
+ fn mul(self, rhs: &i8) -> Self {
self.mul(*rhs)
}
}
@@ -1138,7 +1139,7 @@
impl MulAssign<&i8> for I8Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: &i8) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1178,7 +1179,7 @@
}
}
-impl Add<I8Vec3> for I8Vec3 {
+impl Add for I8Vec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1190,10 +1191,10 @@
}
}
-impl Add<&I8Vec3> for I8Vec3 {
- type Output = I8Vec3;
+impl Add<&Self> for I8Vec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I8Vec3) -> I8Vec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1214,7 +1215,7 @@
}
}
-impl AddAssign<I8Vec3> for I8Vec3 {
+impl AddAssign for I8Vec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1223,10 +1224,10 @@
}
}
-impl AddAssign<&I8Vec3> for I8Vec3 {
+impl AddAssign<&Self> for I8Vec3 {
#[inline]
- fn add_assign(&mut self, rhs: &I8Vec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1243,9 +1244,9 @@
}
impl Add<&i8> for I8Vec3 {
- type Output = I8Vec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i8) -> I8Vec3 {
+ fn add(self, rhs: &i8) -> Self {
self.add(*rhs)
}
}
@@ -1278,7 +1279,7 @@
impl AddAssign<&i8> for I8Vec3 {
#[inline]
fn add_assign(&mut self, rhs: &i8) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1318,7 +1319,7 @@
}
}
-impl Sub<I8Vec3> for I8Vec3 {
+impl Sub for I8Vec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1330,10 +1331,10 @@
}
}
-impl Sub<&I8Vec3> for I8Vec3 {
- type Output = I8Vec3;
+impl Sub<&Self> for I8Vec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I8Vec3) -> I8Vec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1354,19 +1355,19 @@
}
}
-impl SubAssign<I8Vec3> for I8Vec3 {
+impl SubAssign for I8Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: I8Vec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&I8Vec3> for I8Vec3 {
+impl SubAssign<&Self> for I8Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &I8Vec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1383,9 +1384,9 @@
}
impl Sub<&i8> for I8Vec3 {
- type Output = I8Vec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i8) -> I8Vec3 {
+ fn sub(self, rhs: &i8) -> Self {
self.sub(*rhs)
}
}
@@ -1418,7 +1419,7 @@
impl SubAssign<&i8> for I8Vec3 {
#[inline]
fn sub_assign(&mut self, rhs: &i8) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1458,7 +1459,7 @@
}
}
-impl Rem<I8Vec3> for I8Vec3 {
+impl Rem for I8Vec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1470,10 +1471,10 @@
}
}
-impl Rem<&I8Vec3> for I8Vec3 {
- type Output = I8Vec3;
+impl Rem<&Self> for I8Vec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I8Vec3) -> I8Vec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1494,7 +1495,7 @@
}
}
-impl RemAssign<I8Vec3> for I8Vec3 {
+impl RemAssign for I8Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1503,10 +1504,10 @@
}
}
-impl RemAssign<&I8Vec3> for I8Vec3 {
+impl RemAssign<&Self> for I8Vec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &I8Vec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1523,9 +1524,9 @@
}
impl Rem<&i8> for I8Vec3 {
- type Output = I8Vec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i8) -> I8Vec3 {
+ fn rem(self, rhs: &i8) -> Self {
self.rem(*rhs)
}
}
@@ -1558,7 +1559,7 @@
impl RemAssign<&i8> for I8Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: &i8) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1602,7 +1603,7 @@
impl AsRef<[i8; 3]> for I8Vec3 {
#[inline]
fn as_ref(&self) -> &[i8; 3] {
- unsafe { &*(self as *const I8Vec3 as *const [i8; 3]) }
+ unsafe { &*(self as *const Self as *const [i8; 3]) }
}
}
@@ -1610,7 +1611,7 @@
impl AsMut<[i8; 3]> for I8Vec3 {
#[inline]
fn as_mut(&mut self) -> &mut [i8; 3] {
- unsafe { &mut *(self as *mut I8Vec3 as *mut [i8; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [i8; 3]) }
}
}
@@ -1677,7 +1678,7 @@
impl Not for I8Vec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1686,6 +1687,14 @@
}
}
+impl Not for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn not(self) -> I8Vec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I8Vec3 {
type Output = Self;
#[inline]
@@ -1698,6 +1707,44 @@
}
}
+impl BitAnd<&Self> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I8Vec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitand(self, rhs: &I8Vec3) -> I8Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I8Vec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitand(self, rhs: I8Vec3) -> I8Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I8Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I8Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I8Vec3 {
type Output = Self;
#[inline]
@@ -1710,6 +1757,44 @@
}
}
+impl BitOr<&Self> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I8Vec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitor(self, rhs: &I8Vec3) -> I8Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I8Vec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitor(self, rhs: I8Vec3) -> I8Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I8Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I8Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I8Vec3 {
type Output = Self;
#[inline]
@@ -1722,6 +1807,44 @@
}
}
+impl BitXor<&Self> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I8Vec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &I8Vec3) -> I8Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I8Vec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitxor(self, rhs: I8Vec3) -> I8Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I8Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I8Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i8> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1734,6 +1857,44 @@
}
}
+impl BitAnd<&i8> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i8) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitand(self, rhs: &i8) -> I8Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitand(self, rhs: i8) -> I8Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i8> for I8Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i8) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i8> for I8Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i8) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i8> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1746,6 +1907,44 @@
}
}
+impl BitOr<&i8> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i8) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitor(self, rhs: &i8) -> I8Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitor(self, rhs: i8) -> I8Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i8> for I8Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i8) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i8> for I8Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i8) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i8> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1758,6 +1957,44 @@
}
}
+impl BitXor<&i8> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i8) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &i8) -> I8Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn bitxor(self, rhs: i8) -> I8Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i8> for I8Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i8) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i8> for I8Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i8) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1770,6 +2007,44 @@
}
}
+impl Shl<&i8> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1782,6 +2057,44 @@
}
}
+impl Shr<&i8> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1794,6 +2107,44 @@
}
}
+impl Shl<&i16> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1806,6 +2157,44 @@
}
}
+impl Shr<&i16> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1818,6 +2207,44 @@
}
}
+impl Shl<&i32> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1830,6 +2257,44 @@
}
}
+impl Shr<&i32> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1842,6 +2307,44 @@
}
}
+impl Shl<&i64> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1854,6 +2357,44 @@
}
}
+impl Shr<&i64> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1866,6 +2407,44 @@
}
}
+impl Shl<&u8> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1878,6 +2457,44 @@
}
}
+impl Shr<&u8> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1890,6 +2507,44 @@
}
}
+impl Shl<&u16> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1902,6 +2557,44 @@
}
}
+impl Shr<&u16> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1914,6 +2607,44 @@
}
}
+impl Shl<&u32> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1926,6 +2657,44 @@
}
}
+impl Shr<&u32> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1938,6 +2707,44 @@
}
}
+impl Shl<&u64> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I8Vec3 {
type Output = Self;
#[inline]
@@ -1950,10 +2757,48 @@
}
}
-impl Shl<crate::IVec3> for I8Vec3 {
+impl Shr<&u64> for I8Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec3> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1962,10 +2807,34 @@
}
}
-impl Shr<crate::IVec3> for I8Vec3 {
+impl Shl<&IVec3> for I8Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &IVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec3> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1974,10 +2843,34 @@
}
}
-impl Shl<crate::UVec3> for I8Vec3 {
+impl Shr<&IVec3> for I8Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &IVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec3> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1986,10 +2879,34 @@
}
}
-impl Shr<crate::UVec3> for I8Vec3 {
+impl Shl<&UVec3> for I8Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &UVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> I8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> I8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec3> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1998,6 +2915,30 @@
}
}
+impl Shr<&UVec3> for I8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> I8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &I8Vec3 {
+ type Output = I8Vec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> I8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I8Vec3 {
type Output = i8;
#[inline]
diff --git a/crates/glam/src/i8/i8vec4.rs b/crates/glam/src/i8/i8vec4.rs
index 27a40f8..58ed191 100644
--- a/crates/glam/src/i8/i8vec4.rs
+++ b/crates/glam/src/i8/i8vec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(4)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -532,11 +533,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u8 {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> u8 {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -546,11 +547,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u8> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u8> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -558,13 +559,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u8 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u8 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -978,7 +979,7 @@
}
}
-impl Div<I8Vec4> for I8Vec4 {
+impl Div for I8Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -991,10 +992,10 @@
}
}
-impl Div<&I8Vec4> for I8Vec4 {
- type Output = I8Vec4;
+impl Div<&Self> for I8Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &I8Vec4) -> I8Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -1015,7 +1016,7 @@
}
}
-impl DivAssign<I8Vec4> for I8Vec4 {
+impl DivAssign for I8Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -1025,10 +1026,10 @@
}
}
-impl DivAssign<&I8Vec4> for I8Vec4 {
+impl DivAssign<&Self> for I8Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &I8Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -1046,9 +1047,9 @@
}
impl Div<&i8> for I8Vec4 {
- type Output = I8Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &i8) -> I8Vec4 {
+ fn div(self, rhs: &i8) -> Self {
self.div(*rhs)
}
}
@@ -1082,7 +1083,7 @@
impl DivAssign<&i8> for I8Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &i8) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -1123,7 +1124,7 @@
}
}
-impl Mul<I8Vec4> for I8Vec4 {
+impl Mul for I8Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -1136,10 +1137,10 @@
}
}
-impl Mul<&I8Vec4> for I8Vec4 {
- type Output = I8Vec4;
+impl Mul<&Self> for I8Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &I8Vec4) -> I8Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1160,7 +1161,7 @@
}
}
-impl MulAssign<I8Vec4> for I8Vec4 {
+impl MulAssign for I8Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1170,10 +1171,10 @@
}
}
-impl MulAssign<&I8Vec4> for I8Vec4 {
+impl MulAssign<&Self> for I8Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &I8Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1191,9 +1192,9 @@
}
impl Mul<&i8> for I8Vec4 {
- type Output = I8Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &i8) -> I8Vec4 {
+ fn mul(self, rhs: &i8) -> Self {
self.mul(*rhs)
}
}
@@ -1227,7 +1228,7 @@
impl MulAssign<&i8> for I8Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &i8) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1268,7 +1269,7 @@
}
}
-impl Add<I8Vec4> for I8Vec4 {
+impl Add for I8Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1281,10 +1282,10 @@
}
}
-impl Add<&I8Vec4> for I8Vec4 {
- type Output = I8Vec4;
+impl Add<&Self> for I8Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &I8Vec4) -> I8Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1305,7 +1306,7 @@
}
}
-impl AddAssign<I8Vec4> for I8Vec4 {
+impl AddAssign for I8Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1315,10 +1316,10 @@
}
}
-impl AddAssign<&I8Vec4> for I8Vec4 {
+impl AddAssign<&Self> for I8Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &I8Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1336,9 +1337,9 @@
}
impl Add<&i8> for I8Vec4 {
- type Output = I8Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &i8) -> I8Vec4 {
+ fn add(self, rhs: &i8) -> Self {
self.add(*rhs)
}
}
@@ -1372,7 +1373,7 @@
impl AddAssign<&i8> for I8Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &i8) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1413,7 +1414,7 @@
}
}
-impl Sub<I8Vec4> for I8Vec4 {
+impl Sub for I8Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1426,10 +1427,10 @@
}
}
-impl Sub<&I8Vec4> for I8Vec4 {
- type Output = I8Vec4;
+impl Sub<&Self> for I8Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &I8Vec4) -> I8Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1450,9 +1451,9 @@
}
}
-impl SubAssign<I8Vec4> for I8Vec4 {
+impl SubAssign for I8Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: I8Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1460,10 +1461,10 @@
}
}
-impl SubAssign<&I8Vec4> for I8Vec4 {
+impl SubAssign<&Self> for I8Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &I8Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1481,9 +1482,9 @@
}
impl Sub<&i8> for I8Vec4 {
- type Output = I8Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &i8) -> I8Vec4 {
+ fn sub(self, rhs: &i8) -> Self {
self.sub(*rhs)
}
}
@@ -1517,7 +1518,7 @@
impl SubAssign<&i8> for I8Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &i8) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1558,7 +1559,7 @@
}
}
-impl Rem<I8Vec4> for I8Vec4 {
+impl Rem for I8Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1571,10 +1572,10 @@
}
}
-impl Rem<&I8Vec4> for I8Vec4 {
- type Output = I8Vec4;
+impl Rem<&Self> for I8Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &I8Vec4) -> I8Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1595,7 +1596,7 @@
}
}
-impl RemAssign<I8Vec4> for I8Vec4 {
+impl RemAssign for I8Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1605,10 +1606,10 @@
}
}
-impl RemAssign<&I8Vec4> for I8Vec4 {
+impl RemAssign<&Self> for I8Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &I8Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1626,9 +1627,9 @@
}
impl Rem<&i8> for I8Vec4 {
- type Output = I8Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &i8) -> I8Vec4 {
+ fn rem(self, rhs: &i8) -> Self {
self.rem(*rhs)
}
}
@@ -1662,7 +1663,7 @@
impl RemAssign<&i8> for I8Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &i8) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1707,7 +1708,7 @@
impl AsRef<[i8; 4]> for I8Vec4 {
#[inline]
fn as_ref(&self) -> &[i8; 4] {
- unsafe { &*(self as *const I8Vec4 as *const [i8; 4]) }
+ unsafe { &*(self as *const Self as *const [i8; 4]) }
}
}
@@ -1715,7 +1716,7 @@
impl AsMut<[i8; 4]> for I8Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [i8; 4] {
- unsafe { &mut *(self as *mut I8Vec4 as *mut [i8; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [i8; 4]) }
}
}
@@ -1783,7 +1784,7 @@
impl Not for I8Vec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1793,6 +1794,14 @@
}
}
+impl Not for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn not(self) -> I8Vec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for I8Vec4 {
type Output = Self;
#[inline]
@@ -1806,6 +1815,44 @@
}
}
+impl BitAnd<&Self> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&I8Vec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitand(self, rhs: &I8Vec4) -> I8Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<I8Vec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitand(self, rhs: I8Vec4) -> I8Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for I8Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for I8Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for I8Vec4 {
type Output = Self;
#[inline]
@@ -1819,6 +1866,44 @@
}
}
+impl BitOr<&Self> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&I8Vec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitor(self, rhs: &I8Vec4) -> I8Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<I8Vec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitor(self, rhs: I8Vec4) -> I8Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for I8Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for I8Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for I8Vec4 {
type Output = Self;
#[inline]
@@ -1832,6 +1917,44 @@
}
}
+impl BitXor<&Self> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&I8Vec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &I8Vec4) -> I8Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<I8Vec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitxor(self, rhs: I8Vec4) -> I8Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for I8Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for I8Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<i8> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1845,6 +1968,44 @@
}
}
+impl BitAnd<&i8> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &i8) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitand(self, rhs: &i8) -> I8Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitand(self, rhs: i8) -> I8Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<i8> for I8Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: i8) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&i8> for I8Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &i8) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<i8> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1858,6 +2019,44 @@
}
}
+impl BitOr<&i8> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &i8) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitor(self, rhs: &i8) -> I8Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitor(self, rhs: i8) -> I8Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<i8> for I8Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: i8) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&i8> for I8Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &i8) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<i8> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1871,6 +2070,44 @@
}
}
+impl BitXor<&i8> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &i8) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &i8) -> I8Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn bitxor(self, rhs: i8) -> I8Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<i8> for I8Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: i8) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&i8> for I8Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &i8) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1884,6 +2121,44 @@
}
}
+impl Shl<&i8> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1897,6 +2172,44 @@
}
}
+impl Shr<&i8> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1910,6 +2223,44 @@
}
}
+impl Shl<&i16> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1923,6 +2274,44 @@
}
}
+impl Shr<&i16> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1936,6 +2325,44 @@
}
}
+impl Shl<&i32> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1949,6 +2376,44 @@
}
}
+impl Shr<&i32> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1962,6 +2427,44 @@
}
}
+impl Shl<&i64> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1975,6 +2478,44 @@
}
}
+impl Shr<&i64> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for I8Vec4 {
type Output = Self;
#[inline]
@@ -1988,6 +2529,44 @@
}
}
+impl Shl<&u8> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for I8Vec4 {
type Output = Self;
#[inline]
@@ -2001,6 +2580,44 @@
}
}
+impl Shr<&u8> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for I8Vec4 {
type Output = Self;
#[inline]
@@ -2014,6 +2631,44 @@
}
}
+impl Shl<&u16> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for I8Vec4 {
type Output = Self;
#[inline]
@@ -2027,6 +2682,44 @@
}
}
+impl Shr<&u16> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for I8Vec4 {
type Output = Self;
#[inline]
@@ -2040,6 +2733,44 @@
}
}
+impl Shl<&u32> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for I8Vec4 {
type Output = Self;
#[inline]
@@ -2053,6 +2784,44 @@
}
}
+impl Shr<&u32> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for I8Vec4 {
type Output = Self;
#[inline]
@@ -2066,6 +2835,44 @@
}
}
+impl Shl<&u64> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for I8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for I8Vec4 {
type Output = Self;
#[inline]
@@ -2079,10 +2886,48 @@
}
}
-impl Shl<crate::IVec4> for I8Vec4 {
+impl Shr<&u64> for I8Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for I8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec4> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -2092,10 +2937,34 @@
}
}
-impl Shr<crate::IVec4> for I8Vec4 {
+impl Shl<&IVec4> for I8Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &IVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec4> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -2105,10 +2974,34 @@
}
}
-impl Shl<crate::UVec4> for I8Vec4 {
+impl Shr<&IVec4> for I8Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &IVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec4> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -2118,10 +3011,34 @@
}
}
-impl Shr<crate::UVec4> for I8Vec4 {
+impl Shl<&UVec4> for I8Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &UVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> I8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> I8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec4> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -2131,6 +3048,30 @@
}
}
+impl Shr<&UVec4> for I8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> I8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &I8Vec4 {
+ type Output = I8Vec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> I8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for I8Vec4 {
type Output = i8;
#[inline]
diff --git a/crates/glam/src/lib.rs b/crates/glam/src/lib.rs
index aeda7b0..a37668e 100644
--- a/crates/glam/src/lib.rs
+++ b/crates/glam/src/lib.rs
@@ -260,7 +260,7 @@
The minimum supported Rust version is `1.68.2`.
*/
-#![doc(html_root_url = "https://docs.rs/glam/0.30.3")]
+#![doc(html_root_url = "https://docs.rs/glam/0.30.4")]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(target_arch = "spirv", feature(repr_simd))]
#![deny(
diff --git a/crates/glam/src/swizzles/coresimd/vec3a_impl.rs b/crates/glam/src/swizzles/coresimd/vec3a_impl.rs
index 00dae8f..d9261f9 100644
--- a/crates/glam/src/swizzles/coresimd/vec3a_impl.rs
+++ b/crates/glam/src/swizzles/coresimd/vec3a_impl.rs
@@ -114,133 +114,133 @@
}
#[inline]
- fn xxx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [0, 0, 0, 0]).into())
+ fn xxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 0, 0]).into())
}
#[inline]
- fn xxy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [0, 0, 1, 0]).into())
+ fn xxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 1, 0]).into())
}
#[inline]
- fn xxz(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [0, 0, 2, 0]).into())
+ fn xxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 2, 0]).into())
}
#[inline]
- fn xyx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [0, 1, 0, 0]).into())
+ fn xyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 0, 0]).into())
}
#[inline]
- fn xyy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [0, 1, 1, 0]).into())
+ fn xyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 1, 0]).into())
}
#[inline]
- fn xzx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [0, 2, 0, 0]).into())
+ fn xzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 0, 0]).into())
}
#[inline]
- fn xzy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [0, 2, 1, 0]).into())
+ fn xzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 1, 0]).into())
}
#[inline]
- fn xzz(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [0, 2, 2, 0]).into())
+ fn xzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 2, 0]).into())
}
#[inline]
- fn yxx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 0, 0, 0]).into())
+ fn yxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 0, 0]).into())
}
#[inline]
- fn yxy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 0, 1, 0]).into())
+ fn yxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 1, 0]).into())
}
#[inline]
- fn yxz(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 0, 2, 0]).into())
+ fn yxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 2, 0]).into())
}
#[inline]
- fn yyx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 1, 0, 0]).into())
+ fn yyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 0, 0]).into())
}
#[inline]
- fn yyy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 1, 1, 0]).into())
+ fn yyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 1, 0]).into())
}
#[inline]
- fn yyz(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 1, 2, 0]).into())
+ fn yyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 2, 0]).into())
}
#[inline]
- fn yzx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 2, 0, 0]).into())
+ fn yzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 0, 0]).into())
}
#[inline]
- fn yzy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 2, 1, 0]).into())
+ fn yzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 1, 0]).into())
}
#[inline]
- fn yzz(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [1, 2, 2, 0]).into())
+ fn yzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 2, 0]).into())
}
#[inline]
- fn zxx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 0, 0, 0]).into())
+ fn zxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 0, 0]).into())
}
#[inline]
- fn zxy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 0, 1, 0]).into())
+ fn zxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 1, 0]).into())
}
#[inline]
- fn zxz(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 0, 2, 0]).into())
+ fn zxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 2, 0]).into())
}
#[inline]
- fn zyx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 1, 0, 0]).into())
+ fn zyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 0, 0]).into())
}
#[inline]
- fn zyy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 1, 1, 0]).into())
+ fn zyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 1, 0]).into())
}
#[inline]
- fn zyz(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 1, 2, 0]).into())
+ fn zyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 2, 0]).into())
}
#[inline]
- fn zzx(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 2, 0, 0]).into())
+ fn zzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 0, 0]).into())
}
#[inline]
- fn zzy(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 2, 1, 0]).into())
+ fn zzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 1, 0]).into())
}
#[inline]
- fn zzz(self) -> Vec3A {
- Vec3A(simd_swizzle!(self.0, [2, 2, 2, 0]).into())
+ fn zzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 2, 0]).into())
}
#[inline]
diff --git a/crates/glam/src/swizzles/coresimd/vec4_impl.rs b/crates/glam/src/swizzles/coresimd/vec4_impl.rs
index 91f53bd..6a59d5b 100644
--- a/crates/glam/src/swizzles/coresimd/vec4_impl.rs
+++ b/crates/glam/src/swizzles/coresimd/vec4_impl.rs
@@ -640,1277 +640,1277 @@
}
#[inline]
- fn xxxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 0, 0]))
+ fn xxxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 0, 0]))
}
#[inline]
- fn xxxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 0, 1]))
+ fn xxxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 0, 1]))
}
#[inline]
- fn xxxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 0, 2]))
+ fn xxxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 0, 2]))
}
#[inline]
- fn xxxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 0, 3]))
+ fn xxxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 0, 3]))
}
#[inline]
- fn xxyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 1, 0]))
+ fn xxyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 1, 0]))
}
#[inline]
- fn xxyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 1, 1]))
+ fn xxyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 1, 1]))
}
#[inline]
- fn xxyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 1, 2]))
+ fn xxyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 1, 2]))
}
#[inline]
- fn xxyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 1, 3]))
+ fn xxyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 1, 3]))
}
#[inline]
- fn xxzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 2, 0]))
+ fn xxzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 2, 0]))
}
#[inline]
- fn xxzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 2, 1]))
+ fn xxzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 2, 1]))
}
#[inline]
- fn xxzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 2, 2]))
+ fn xxzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 2, 2]))
}
#[inline]
- fn xxzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 2, 3]))
+ fn xxzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 2, 3]))
}
#[inline]
- fn xxwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 3, 0]))
+ fn xxwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 3, 0]))
}
#[inline]
- fn xxwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 3, 1]))
+ fn xxwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 3, 1]))
}
#[inline]
- fn xxwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 3, 2]))
+ fn xxwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 3, 2]))
}
#[inline]
- fn xxww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 0, 3, 3]))
+ fn xxww(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 0, 3, 3]))
}
#[inline]
- fn xyxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 0, 0]))
+ fn xyxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 0, 0]))
}
#[inline]
- fn xyxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 0, 1]))
+ fn xyxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 0, 1]))
}
#[inline]
- fn xyxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 0, 2]))
+ fn xyxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 0, 2]))
}
#[inline]
- fn xyxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 0, 3]))
+ fn xyxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 0, 3]))
}
#[inline]
- fn xyyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 1, 0]))
+ fn xyyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 1, 0]))
}
#[inline]
- fn xyyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 1, 1]))
+ fn xyyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 1, 1]))
}
#[inline]
- fn xyyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 1, 2]))
+ fn xyyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 1, 2]))
}
#[inline]
- fn xyyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 1, 3]))
+ fn xyyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 1, 3]))
}
#[inline]
- fn xyzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 2, 0]))
+ fn xyzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 2, 0]))
}
#[inline]
- fn xyzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 2, 1]))
+ fn xyzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 2, 1]))
}
#[inline]
- fn xyzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 2, 2]))
+ fn xyzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 2, 2]))
}
#[inline]
- fn xywx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 3, 0]))
+ fn xywx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 3, 0]))
}
#[inline]
- fn xywy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 3, 1]))
+ fn xywy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 3, 1]))
}
#[inline]
- fn xywz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 3, 2]))
+ fn xywz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 3, 2]))
}
#[inline]
- fn xyww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 1, 3, 3]))
+ fn xyww(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 1, 3, 3]))
}
#[inline]
- fn xzxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 0, 0]))
+ fn xzxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 0, 0]))
}
#[inline]
- fn xzxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 0, 1]))
+ fn xzxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 0, 1]))
}
#[inline]
- fn xzxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 0, 2]))
+ fn xzxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 0, 2]))
}
#[inline]
- fn xzxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 0, 3]))
+ fn xzxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 0, 3]))
}
#[inline]
- fn xzyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 1, 0]))
+ fn xzyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 1, 0]))
}
#[inline]
- fn xzyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 1, 1]))
+ fn xzyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 1, 1]))
}
#[inline]
- fn xzyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 1, 2]))
+ fn xzyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 1, 2]))
}
#[inline]
- fn xzyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 1, 3]))
+ fn xzyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 1, 3]))
}
#[inline]
- fn xzzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 2, 0]))
+ fn xzzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 2, 0]))
}
#[inline]
- fn xzzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 2, 1]))
+ fn xzzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 2, 1]))
}
#[inline]
- fn xzzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 2, 2]))
+ fn xzzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 2, 2]))
}
#[inline]
- fn xzzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 2, 3]))
+ fn xzzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 2, 3]))
}
#[inline]
- fn xzwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 3, 0]))
+ fn xzwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 3, 0]))
}
#[inline]
- fn xzwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 3, 1]))
+ fn xzwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 3, 1]))
}
#[inline]
- fn xzwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 3, 2]))
+ fn xzwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 3, 2]))
}
#[inline]
- fn xzww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 2, 3, 3]))
+ fn xzww(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 2, 3, 3]))
}
#[inline]
- fn xwxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 0, 0]))
+ fn xwxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 0, 0]))
}
#[inline]
- fn xwxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 0, 1]))
+ fn xwxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 0, 1]))
}
#[inline]
- fn xwxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 0, 2]))
+ fn xwxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 0, 2]))
}
#[inline]
- fn xwxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 0, 3]))
+ fn xwxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 0, 3]))
}
#[inline]
- fn xwyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 1, 0]))
+ fn xwyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 1, 0]))
}
#[inline]
- fn xwyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 1, 1]))
+ fn xwyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 1, 1]))
}
#[inline]
- fn xwyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 1, 2]))
+ fn xwyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 1, 2]))
}
#[inline]
- fn xwyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 1, 3]))
+ fn xwyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 1, 3]))
}
#[inline]
- fn xwzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 2, 0]))
+ fn xwzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 2, 0]))
}
#[inline]
- fn xwzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 2, 1]))
+ fn xwzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 2, 1]))
}
#[inline]
- fn xwzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 2, 2]))
+ fn xwzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 2, 2]))
}
#[inline]
- fn xwzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 2, 3]))
+ fn xwzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 2, 3]))
}
#[inline]
- fn xwwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 3, 0]))
+ fn xwwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 3, 0]))
}
#[inline]
- fn xwwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 3, 1]))
+ fn xwwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 3, 1]))
}
#[inline]
- fn xwwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 3, 2]))
+ fn xwwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 3, 2]))
}
#[inline]
- fn xwww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [0, 3, 3, 3]))
+ fn xwww(self) -> Self {
+ Self(simd_swizzle!(self.0, [0, 3, 3, 3]))
}
#[inline]
- fn yxxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 0, 0]))
+ fn yxxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 0, 0]))
}
#[inline]
- fn yxxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 0, 1]))
+ fn yxxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 0, 1]))
}
#[inline]
- fn yxxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 0, 2]))
+ fn yxxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 0, 2]))
}
#[inline]
- fn yxxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 0, 3]))
+ fn yxxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 0, 3]))
}
#[inline]
- fn yxyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 1, 0]))
+ fn yxyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 1, 0]))
}
#[inline]
- fn yxyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 1, 1]))
+ fn yxyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 1, 1]))
}
#[inline]
- fn yxyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 1, 2]))
+ fn yxyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 1, 2]))
}
#[inline]
- fn yxyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 1, 3]))
+ fn yxyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 1, 3]))
}
#[inline]
- fn yxzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 2, 0]))
+ fn yxzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 2, 0]))
}
#[inline]
- fn yxzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 2, 1]))
+ fn yxzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 2, 1]))
}
#[inline]
- fn yxzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 2, 2]))
+ fn yxzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 2, 2]))
}
#[inline]
- fn yxzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 2, 3]))
+ fn yxzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 2, 3]))
}
#[inline]
- fn yxwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 3, 0]))
+ fn yxwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 3, 0]))
}
#[inline]
- fn yxwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 3, 1]))
+ fn yxwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 3, 1]))
}
#[inline]
- fn yxwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 3, 2]))
+ fn yxwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 3, 2]))
}
#[inline]
- fn yxww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 0, 3, 3]))
+ fn yxww(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 0, 3, 3]))
}
#[inline]
- fn yyxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 0, 0]))
+ fn yyxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 0, 0]))
}
#[inline]
- fn yyxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 0, 1]))
+ fn yyxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 0, 1]))
}
#[inline]
- fn yyxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 0, 2]))
+ fn yyxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 0, 2]))
}
#[inline]
- fn yyxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 0, 3]))
+ fn yyxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 0, 3]))
}
#[inline]
- fn yyyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 1, 0]))
+ fn yyyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 1, 0]))
}
#[inline]
- fn yyyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 1, 1]))
+ fn yyyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 1, 1]))
}
#[inline]
- fn yyyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 1, 2]))
+ fn yyyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 1, 2]))
}
#[inline]
- fn yyyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 1, 3]))
+ fn yyyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 1, 3]))
}
#[inline]
- fn yyzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 2, 0]))
+ fn yyzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 2, 0]))
}
#[inline]
- fn yyzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 2, 1]))
+ fn yyzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 2, 1]))
}
#[inline]
- fn yyzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 2, 2]))
+ fn yyzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 2, 2]))
}
#[inline]
- fn yyzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 2, 3]))
+ fn yyzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 2, 3]))
}
#[inline]
- fn yywx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 3, 0]))
+ fn yywx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 3, 0]))
}
#[inline]
- fn yywy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 3, 1]))
+ fn yywy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 3, 1]))
}
#[inline]
- fn yywz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 3, 2]))
+ fn yywz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 3, 2]))
}
#[inline]
- fn yyww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 1, 3, 3]))
+ fn yyww(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 1, 3, 3]))
}
#[inline]
- fn yzxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 0, 0]))
+ fn yzxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 0, 0]))
}
#[inline]
- fn yzxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 0, 1]))
+ fn yzxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 0, 1]))
}
#[inline]
- fn yzxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 0, 2]))
+ fn yzxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 0, 2]))
}
#[inline]
- fn yzxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 0, 3]))
+ fn yzxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 0, 3]))
}
#[inline]
- fn yzyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 1, 0]))
+ fn yzyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 1, 0]))
}
#[inline]
- fn yzyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 1, 1]))
+ fn yzyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 1, 1]))
}
#[inline]
- fn yzyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 1, 2]))
+ fn yzyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 1, 2]))
}
#[inline]
- fn yzyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 1, 3]))
+ fn yzyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 1, 3]))
}
#[inline]
- fn yzzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 2, 0]))
+ fn yzzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 2, 0]))
}
#[inline]
- fn yzzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 2, 1]))
+ fn yzzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 2, 1]))
}
#[inline]
- fn yzzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 2, 2]))
+ fn yzzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 2, 2]))
}
#[inline]
- fn yzzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 2, 3]))
+ fn yzzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 2, 3]))
}
#[inline]
- fn yzwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 3, 0]))
+ fn yzwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 3, 0]))
}
#[inline]
- fn yzwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 3, 1]))
+ fn yzwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 3, 1]))
}
#[inline]
- fn yzwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 3, 2]))
+ fn yzwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 3, 2]))
}
#[inline]
- fn yzww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 2, 3, 3]))
+ fn yzww(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 2, 3, 3]))
}
#[inline]
- fn ywxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 0, 0]))
+ fn ywxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 0, 0]))
}
#[inline]
- fn ywxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 0, 1]))
+ fn ywxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 0, 1]))
}
#[inline]
- fn ywxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 0, 2]))
+ fn ywxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 0, 2]))
}
#[inline]
- fn ywxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 0, 3]))
+ fn ywxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 0, 3]))
}
#[inline]
- fn ywyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 1, 0]))
+ fn ywyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 1, 0]))
}
#[inline]
- fn ywyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 1, 1]))
+ fn ywyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 1, 1]))
}
#[inline]
- fn ywyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 1, 2]))
+ fn ywyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 1, 2]))
}
#[inline]
- fn ywyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 1, 3]))
+ fn ywyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 1, 3]))
}
#[inline]
- fn ywzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 2, 0]))
+ fn ywzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 2, 0]))
}
#[inline]
- fn ywzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 2, 1]))
+ fn ywzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 2, 1]))
}
#[inline]
- fn ywzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 2, 2]))
+ fn ywzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 2, 2]))
}
#[inline]
- fn ywzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 2, 3]))
+ fn ywzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 2, 3]))
}
#[inline]
- fn ywwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 3, 0]))
+ fn ywwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 3, 0]))
}
#[inline]
- fn ywwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 3, 1]))
+ fn ywwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 3, 1]))
}
#[inline]
- fn ywwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 3, 2]))
+ fn ywwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 3, 2]))
}
#[inline]
- fn ywww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [1, 3, 3, 3]))
+ fn ywww(self) -> Self {
+ Self(simd_swizzle!(self.0, [1, 3, 3, 3]))
}
#[inline]
- fn zxxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 0, 0]))
+ fn zxxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 0, 0]))
}
#[inline]
- fn zxxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 0, 1]))
+ fn zxxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 0, 1]))
}
#[inline]
- fn zxxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 0, 2]))
+ fn zxxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 0, 2]))
}
#[inline]
- fn zxxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 0, 3]))
+ fn zxxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 0, 3]))
}
#[inline]
- fn zxyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 1, 0]))
+ fn zxyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 1, 0]))
}
#[inline]
- fn zxyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 1, 1]))
+ fn zxyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 1, 1]))
}
#[inline]
- fn zxyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 1, 2]))
+ fn zxyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 1, 2]))
}
#[inline]
- fn zxyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 1, 3]))
+ fn zxyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 1, 3]))
}
#[inline]
- fn zxzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 2, 0]))
+ fn zxzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 2, 0]))
}
#[inline]
- fn zxzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 2, 1]))
+ fn zxzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 2, 1]))
}
#[inline]
- fn zxzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 2, 2]))
+ fn zxzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 2, 2]))
}
#[inline]
- fn zxzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 2, 3]))
+ fn zxzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 2, 3]))
}
#[inline]
- fn zxwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 3, 0]))
+ fn zxwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 3, 0]))
}
#[inline]
- fn zxwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 3, 1]))
+ fn zxwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 3, 1]))
}
#[inline]
- fn zxwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 3, 2]))
+ fn zxwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 3, 2]))
}
#[inline]
- fn zxww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 0, 3, 3]))
+ fn zxww(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 0, 3, 3]))
}
#[inline]
- fn zyxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 0, 0]))
+ fn zyxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 0, 0]))
}
#[inline]
- fn zyxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 0, 1]))
+ fn zyxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 0, 1]))
}
#[inline]
- fn zyxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 0, 2]))
+ fn zyxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 0, 2]))
}
#[inline]
- fn zyxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 0, 3]))
+ fn zyxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 0, 3]))
}
#[inline]
- fn zyyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 1, 0]))
+ fn zyyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 1, 0]))
}
#[inline]
- fn zyyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 1, 1]))
+ fn zyyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 1, 1]))
}
#[inline]
- fn zyyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 1, 2]))
+ fn zyyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 1, 2]))
}
#[inline]
- fn zyyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 1, 3]))
+ fn zyyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 1, 3]))
}
#[inline]
- fn zyzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 2, 0]))
+ fn zyzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 2, 0]))
}
#[inline]
- fn zyzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 2, 1]))
+ fn zyzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 2, 1]))
}
#[inline]
- fn zyzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 2, 2]))
+ fn zyzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 2, 2]))
}
#[inline]
- fn zyzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 2, 3]))
+ fn zyzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 2, 3]))
}
#[inline]
- fn zywx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 3, 0]))
+ fn zywx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 3, 0]))
}
#[inline]
- fn zywy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 3, 1]))
+ fn zywy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 3, 1]))
}
#[inline]
- fn zywz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 3, 2]))
+ fn zywz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 3, 2]))
}
#[inline]
- fn zyww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 1, 3, 3]))
+ fn zyww(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 1, 3, 3]))
}
#[inline]
- fn zzxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 0, 0]))
+ fn zzxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 0, 0]))
}
#[inline]
- fn zzxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 0, 1]))
+ fn zzxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 0, 1]))
}
#[inline]
- fn zzxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 0, 2]))
+ fn zzxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 0, 2]))
}
#[inline]
- fn zzxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 0, 3]))
+ fn zzxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 0, 3]))
}
#[inline]
- fn zzyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 1, 0]))
+ fn zzyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 1, 0]))
}
#[inline]
- fn zzyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 1, 1]))
+ fn zzyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 1, 1]))
}
#[inline]
- fn zzyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 1, 2]))
+ fn zzyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 1, 2]))
}
#[inline]
- fn zzyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 1, 3]))
+ fn zzyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 1, 3]))
}
#[inline]
- fn zzzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 2, 0]))
+ fn zzzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 2, 0]))
}
#[inline]
- fn zzzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 2, 1]))
+ fn zzzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 2, 1]))
}
#[inline]
- fn zzzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 2, 2]))
+ fn zzzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 2, 2]))
}
#[inline]
- fn zzzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 2, 3]))
+ fn zzzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 2, 3]))
}
#[inline]
- fn zzwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 3, 0]))
+ fn zzwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 3, 0]))
}
#[inline]
- fn zzwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 3, 1]))
+ fn zzwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 3, 1]))
}
#[inline]
- fn zzwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 3, 2]))
+ fn zzwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 3, 2]))
}
#[inline]
- fn zzww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 2, 3, 3]))
+ fn zzww(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 2, 3, 3]))
}
#[inline]
- fn zwxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 0, 0]))
+ fn zwxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 0, 0]))
}
#[inline]
- fn zwxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 0, 1]))
+ fn zwxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 0, 1]))
}
#[inline]
- fn zwxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 0, 2]))
+ fn zwxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 0, 2]))
}
#[inline]
- fn zwxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 0, 3]))
+ fn zwxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 0, 3]))
}
#[inline]
- fn zwyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 1, 0]))
+ fn zwyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 1, 0]))
}
#[inline]
- fn zwyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 1, 1]))
+ fn zwyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 1, 1]))
}
#[inline]
- fn zwyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 1, 2]))
+ fn zwyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 1, 2]))
}
#[inline]
- fn zwyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 1, 3]))
+ fn zwyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 1, 3]))
}
#[inline]
- fn zwzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 2, 0]))
+ fn zwzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 2, 0]))
}
#[inline]
- fn zwzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 2, 1]))
+ fn zwzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 2, 1]))
}
#[inline]
- fn zwzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 2, 2]))
+ fn zwzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 2, 2]))
}
#[inline]
- fn zwzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 2, 3]))
+ fn zwzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 2, 3]))
}
#[inline]
- fn zwwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 3, 0]))
+ fn zwwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 3, 0]))
}
#[inline]
- fn zwwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 3, 1]))
+ fn zwwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 3, 1]))
}
#[inline]
- fn zwwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 3, 2]))
+ fn zwwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 3, 2]))
}
#[inline]
- fn zwww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [2, 3, 3, 3]))
+ fn zwww(self) -> Self {
+ Self(simd_swizzle!(self.0, [2, 3, 3, 3]))
}
#[inline]
- fn wxxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 0, 0]))
+ fn wxxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 0, 0]))
}
#[inline]
- fn wxxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 0, 1]))
+ fn wxxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 0, 1]))
}
#[inline]
- fn wxxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 0, 2]))
+ fn wxxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 0, 2]))
}
#[inline]
- fn wxxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 0, 3]))
+ fn wxxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 0, 3]))
}
#[inline]
- fn wxyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 1, 0]))
+ fn wxyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 1, 0]))
}
#[inline]
- fn wxyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 1, 1]))
+ fn wxyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 1, 1]))
}
#[inline]
- fn wxyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 1, 2]))
+ fn wxyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 1, 2]))
}
#[inline]
- fn wxyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 1, 3]))
+ fn wxyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 1, 3]))
}
#[inline]
- fn wxzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 2, 0]))
+ fn wxzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 2, 0]))
}
#[inline]
- fn wxzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 2, 1]))
+ fn wxzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 2, 1]))
}
#[inline]
- fn wxzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 2, 2]))
+ fn wxzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 2, 2]))
}
#[inline]
- fn wxzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 2, 3]))
+ fn wxzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 2, 3]))
}
#[inline]
- fn wxwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 3, 0]))
+ fn wxwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 3, 0]))
}
#[inline]
- fn wxwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 3, 1]))
+ fn wxwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 3, 1]))
}
#[inline]
- fn wxwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 3, 2]))
+ fn wxwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 3, 2]))
}
#[inline]
- fn wxww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 0, 3, 3]))
+ fn wxww(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 0, 3, 3]))
}
#[inline]
- fn wyxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 0, 0]))
+ fn wyxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 0, 0]))
}
#[inline]
- fn wyxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 0, 1]))
+ fn wyxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 0, 1]))
}
#[inline]
- fn wyxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 0, 2]))
+ fn wyxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 0, 2]))
}
#[inline]
- fn wyxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 0, 3]))
+ fn wyxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 0, 3]))
}
#[inline]
- fn wyyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 1, 0]))
+ fn wyyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 1, 0]))
}
#[inline]
- fn wyyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 1, 1]))
+ fn wyyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 1, 1]))
}
#[inline]
- fn wyyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 1, 2]))
+ fn wyyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 1, 2]))
}
#[inline]
- fn wyyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 1, 3]))
+ fn wyyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 1, 3]))
}
#[inline]
- fn wyzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 2, 0]))
+ fn wyzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 2, 0]))
}
#[inline]
- fn wyzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 2, 1]))
+ fn wyzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 2, 1]))
}
#[inline]
- fn wyzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 2, 2]))
+ fn wyzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 2, 2]))
}
#[inline]
- fn wyzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 2, 3]))
+ fn wyzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 2, 3]))
}
#[inline]
- fn wywx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 3, 0]))
+ fn wywx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 3, 0]))
}
#[inline]
- fn wywy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 3, 1]))
+ fn wywy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 3, 1]))
}
#[inline]
- fn wywz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 3, 2]))
+ fn wywz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 3, 2]))
}
#[inline]
- fn wyww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 1, 3, 3]))
+ fn wyww(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 1, 3, 3]))
}
#[inline]
- fn wzxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 0, 0]))
+ fn wzxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 0, 0]))
}
#[inline]
- fn wzxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 0, 1]))
+ fn wzxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 0, 1]))
}
#[inline]
- fn wzxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 0, 2]))
+ fn wzxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 0, 2]))
}
#[inline]
- fn wzxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 0, 3]))
+ fn wzxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 0, 3]))
}
#[inline]
- fn wzyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 1, 0]))
+ fn wzyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 1, 0]))
}
#[inline]
- fn wzyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 1, 1]))
+ fn wzyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 1, 1]))
}
#[inline]
- fn wzyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 1, 2]))
+ fn wzyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 1, 2]))
}
#[inline]
- fn wzyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 1, 3]))
+ fn wzyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 1, 3]))
}
#[inline]
- fn wzzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 2, 0]))
+ fn wzzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 2, 0]))
}
#[inline]
- fn wzzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 2, 1]))
+ fn wzzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 2, 1]))
}
#[inline]
- fn wzzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 2, 2]))
+ fn wzzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 2, 2]))
}
#[inline]
- fn wzzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 2, 3]))
+ fn wzzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 2, 3]))
}
#[inline]
- fn wzwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 3, 0]))
+ fn wzwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 3, 0]))
}
#[inline]
- fn wzwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 3, 1]))
+ fn wzwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 3, 1]))
}
#[inline]
- fn wzwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 3, 2]))
+ fn wzwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 3, 2]))
}
#[inline]
- fn wzww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 2, 3, 3]))
+ fn wzww(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 2, 3, 3]))
}
#[inline]
- fn wwxx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 0, 0]))
+ fn wwxx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 0, 0]))
}
#[inline]
- fn wwxy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 0, 1]))
+ fn wwxy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 0, 1]))
}
#[inline]
- fn wwxz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 0, 2]))
+ fn wwxz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 0, 2]))
}
#[inline]
- fn wwxw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 0, 3]))
+ fn wwxw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 0, 3]))
}
#[inline]
- fn wwyx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 1, 0]))
+ fn wwyx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 1, 0]))
}
#[inline]
- fn wwyy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 1, 1]))
+ fn wwyy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 1, 1]))
}
#[inline]
- fn wwyz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 1, 2]))
+ fn wwyz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 1, 2]))
}
#[inline]
- fn wwyw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 1, 3]))
+ fn wwyw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 1, 3]))
}
#[inline]
- fn wwzx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 2, 0]))
+ fn wwzx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 2, 0]))
}
#[inline]
- fn wwzy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 2, 1]))
+ fn wwzy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 2, 1]))
}
#[inline]
- fn wwzz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 2, 2]))
+ fn wwzz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 2, 2]))
}
#[inline]
- fn wwzw(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 2, 3]))
+ fn wwzw(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 2, 3]))
}
#[inline]
- fn wwwx(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 3, 0]))
+ fn wwwx(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 3, 0]))
}
#[inline]
- fn wwwy(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 3, 1]))
+ fn wwwy(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 3, 1]))
}
#[inline]
- fn wwwz(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 3, 2]))
+ fn wwwz(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 3, 2]))
}
#[inline]
- fn wwww(self) -> Vec4 {
- Vec4(simd_swizzle!(self.0, [3, 3, 3, 3]))
+ fn wwww(self) -> Self {
+ Self(simd_swizzle!(self.0, [3, 3, 3, 3]))
}
}
diff --git a/crates/glam/src/swizzles/dvec2_impl.rs b/crates/glam/src/swizzles/dvec2_impl.rs
index f425747..ac52978 100644
--- a/crates/glam/src/swizzles/dvec2_impl.rs
+++ b/crates/glam/src/swizzles/dvec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = DVec4;
#[inline]
- fn xx(self) -> DVec2 {
- DVec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> DVec2 {
- DVec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> DVec2 {
- DVec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/dvec3_impl.rs b/crates/glam/src/swizzles/dvec3_impl.rs
index ea0f68b..76c7280 100644
--- a/crates/glam/src/swizzles/dvec3_impl.rs
+++ b/crates/glam/src/swizzles/dvec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> DVec3 {
- DVec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> DVec3 {
- DVec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> DVec3 {
- DVec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> DVec3 {
- DVec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> DVec3 {
- DVec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> DVec3 {
- DVec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> DVec3 {
- DVec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> DVec3 {
- DVec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> DVec3 {
- DVec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> DVec3 {
- DVec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> DVec3 {
- DVec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> DVec3 {
- DVec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> DVec3 {
- DVec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> DVec3 {
- DVec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> DVec3 {
- DVec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> DVec3 {
- DVec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> DVec3 {
- DVec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> DVec3 {
- DVec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> DVec3 {
- DVec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> DVec3 {
- DVec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> DVec3 {
- DVec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> DVec3 {
- DVec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> DVec3 {
- DVec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> DVec3 {
- DVec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> DVec3 {
- DVec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> DVec3 {
- DVec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/dvec4_impl.rs b/crates/glam/src/swizzles/dvec4_impl.rs
index 803eed5..92527a2 100644
--- a/crates/glam/src/swizzles/dvec4_impl.rs
+++ b/crates/glam/src/swizzles/dvec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> DVec4 {
- DVec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> DVec4 {
- DVec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> DVec4 {
- DVec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> DVec4 {
- DVec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> DVec4 {
- DVec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> DVec4 {
- DVec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> DVec4 {
- DVec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> DVec4 {
- DVec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> DVec4 {
- DVec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> DVec4 {
- DVec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> DVec4 {
- DVec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> DVec4 {
- DVec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> DVec4 {
- DVec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> DVec4 {
- DVec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> DVec4 {
- DVec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> DVec4 {
- DVec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/i16vec2_impl.rs b/crates/glam/src/swizzles/i16vec2_impl.rs
index e459d40..204d6d5 100644
--- a/crates/glam/src/swizzles/i16vec2_impl.rs
+++ b/crates/glam/src/swizzles/i16vec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = I16Vec4;
#[inline]
- fn xx(self) -> I16Vec2 {
- I16Vec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> I16Vec2 {
- I16Vec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> I16Vec2 {
- I16Vec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/i16vec3_impl.rs b/crates/glam/src/swizzles/i16vec3_impl.rs
index 847051d..fa2ee28 100644
--- a/crates/glam/src/swizzles/i16vec3_impl.rs
+++ b/crates/glam/src/swizzles/i16vec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> I16Vec3 {
- I16Vec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> I16Vec3 {
- I16Vec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> I16Vec3 {
- I16Vec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> I16Vec3 {
- I16Vec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> I16Vec3 {
- I16Vec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> I16Vec3 {
- I16Vec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> I16Vec3 {
- I16Vec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> I16Vec3 {
- I16Vec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> I16Vec3 {
- I16Vec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> I16Vec3 {
- I16Vec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/i16vec4_impl.rs b/crates/glam/src/swizzles/i16vec4_impl.rs
index aec6ab6..20ae8a1 100644
--- a/crates/glam/src/swizzles/i16vec4_impl.rs
+++ b/crates/glam/src/swizzles/i16vec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> I16Vec4 {
- I16Vec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> I16Vec4 {
- I16Vec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> I16Vec4 {
- I16Vec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> I16Vec4 {
- I16Vec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/i64vec2_impl.rs b/crates/glam/src/swizzles/i64vec2_impl.rs
index 6bce5ca..941cb3a 100644
--- a/crates/glam/src/swizzles/i64vec2_impl.rs
+++ b/crates/glam/src/swizzles/i64vec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = I64Vec4;
#[inline]
- fn xx(self) -> I64Vec2 {
- I64Vec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> I64Vec2 {
- I64Vec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> I64Vec2 {
- I64Vec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/i64vec3_impl.rs b/crates/glam/src/swizzles/i64vec3_impl.rs
index 1b7f9a3..bc6c6e4 100644
--- a/crates/glam/src/swizzles/i64vec3_impl.rs
+++ b/crates/glam/src/swizzles/i64vec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> I64Vec3 {
- I64Vec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> I64Vec3 {
- I64Vec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> I64Vec3 {
- I64Vec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> I64Vec3 {
- I64Vec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> I64Vec3 {
- I64Vec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> I64Vec3 {
- I64Vec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> I64Vec3 {
- I64Vec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> I64Vec3 {
- I64Vec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> I64Vec3 {
- I64Vec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> I64Vec3 {
- I64Vec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/i64vec4_impl.rs b/crates/glam/src/swizzles/i64vec4_impl.rs
index 0638877..387d0fc 100644
--- a/crates/glam/src/swizzles/i64vec4_impl.rs
+++ b/crates/glam/src/swizzles/i64vec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> I64Vec4 {
- I64Vec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> I64Vec4 {
- I64Vec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> I64Vec4 {
- I64Vec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> I64Vec4 {
- I64Vec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/i8vec2_impl.rs b/crates/glam/src/swizzles/i8vec2_impl.rs
index 5844f7c..f886739 100644
--- a/crates/glam/src/swizzles/i8vec2_impl.rs
+++ b/crates/glam/src/swizzles/i8vec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = I8Vec4;
#[inline]
- fn xx(self) -> I8Vec2 {
- I8Vec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> I8Vec2 {
- I8Vec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> I8Vec2 {
- I8Vec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/i8vec3_impl.rs b/crates/glam/src/swizzles/i8vec3_impl.rs
index 7cda9f0..c120d3b 100644
--- a/crates/glam/src/swizzles/i8vec3_impl.rs
+++ b/crates/glam/src/swizzles/i8vec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> I8Vec3 {
- I8Vec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> I8Vec3 {
- I8Vec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> I8Vec3 {
- I8Vec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> I8Vec3 {
- I8Vec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> I8Vec3 {
- I8Vec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> I8Vec3 {
- I8Vec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> I8Vec3 {
- I8Vec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> I8Vec3 {
- I8Vec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> I8Vec3 {
- I8Vec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> I8Vec3 {
- I8Vec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/i8vec4_impl.rs b/crates/glam/src/swizzles/i8vec4_impl.rs
index 0a7de2b..0ede70f 100644
--- a/crates/glam/src/swizzles/i8vec4_impl.rs
+++ b/crates/glam/src/swizzles/i8vec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> I8Vec4 {
- I8Vec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> I8Vec4 {
- I8Vec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> I8Vec4 {
- I8Vec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> I8Vec4 {
- I8Vec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/ivec2_impl.rs b/crates/glam/src/swizzles/ivec2_impl.rs
index 2719f88..8f45d7f 100644
--- a/crates/glam/src/swizzles/ivec2_impl.rs
+++ b/crates/glam/src/swizzles/ivec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = IVec4;
#[inline]
- fn xx(self) -> IVec2 {
- IVec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> IVec2 {
- IVec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> IVec2 {
- IVec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/ivec3_impl.rs b/crates/glam/src/swizzles/ivec3_impl.rs
index eab582d..4a5d391 100644
--- a/crates/glam/src/swizzles/ivec3_impl.rs
+++ b/crates/glam/src/swizzles/ivec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> IVec3 {
- IVec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> IVec3 {
- IVec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> IVec3 {
- IVec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> IVec3 {
- IVec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> IVec3 {
- IVec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> IVec3 {
- IVec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> IVec3 {
- IVec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> IVec3 {
- IVec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> IVec3 {
- IVec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> IVec3 {
- IVec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> IVec3 {
- IVec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> IVec3 {
- IVec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> IVec3 {
- IVec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> IVec3 {
- IVec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> IVec3 {
- IVec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> IVec3 {
- IVec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> IVec3 {
- IVec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> IVec3 {
- IVec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> IVec3 {
- IVec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> IVec3 {
- IVec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> IVec3 {
- IVec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> IVec3 {
- IVec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> IVec3 {
- IVec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> IVec3 {
- IVec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> IVec3 {
- IVec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> IVec3 {
- IVec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/ivec4_impl.rs b/crates/glam/src/swizzles/ivec4_impl.rs
index 9f2b361..600ad01 100644
--- a/crates/glam/src/swizzles/ivec4_impl.rs
+++ b/crates/glam/src/swizzles/ivec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> IVec4 {
- IVec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> IVec4 {
- IVec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> IVec4 {
- IVec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> IVec4 {
- IVec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> IVec4 {
- IVec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> IVec4 {
- IVec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> IVec4 {
- IVec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> IVec4 {
- IVec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> IVec4 {
- IVec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> IVec4 {
- IVec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> IVec4 {
- IVec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> IVec4 {
- IVec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> IVec4 {
- IVec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> IVec4 {
- IVec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> IVec4 {
- IVec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> IVec4 {
- IVec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/neon/vec3a_impl.rs b/crates/glam/src/swizzles/neon/vec3a_impl.rs
index 95aefc6..982586d 100644
--- a/crates/glam/src/swizzles/neon/vec3a_impl.rs
+++ b/crates/glam/src/swizzles/neon/vec3a_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> Vec3A {
- Vec3A::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> Vec3A {
- Vec3A::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> Vec3A {
- Vec3A::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> Vec3A {
- Vec3A::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> Vec3A {
- Vec3A::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> Vec3A {
- Vec3A::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> Vec3A {
- Vec3A::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> Vec3A {
- Vec3A::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> Vec3A {
- Vec3A::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> Vec3A {
- Vec3A::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> Vec3A {
- Vec3A::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> Vec3A {
- Vec3A::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> Vec3A {
- Vec3A::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> Vec3A {
- Vec3A::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> Vec3A {
- Vec3A::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> Vec3A {
- Vec3A::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> Vec3A {
- Vec3A::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> Vec3A {
- Vec3A::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> Vec3A {
- Vec3A::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> Vec3A {
- Vec3A::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> Vec3A {
- Vec3A::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> Vec3A {
- Vec3A::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> Vec3A {
- Vec3A::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> Vec3A {
- Vec3A::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> Vec3A {
- Vec3A::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> Vec3A {
- Vec3A::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/neon/vec4_impl.rs b/crates/glam/src/swizzles/neon/vec4_impl.rs
index 93feb10..1b64e6d 100644
--- a/crates/glam/src/swizzles/neon/vec4_impl.rs
+++ b/crates/glam/src/swizzles/neon/vec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/scalar/vec3a_impl.rs b/crates/glam/src/swizzles/scalar/vec3a_impl.rs
index 95aefc6..982586d 100644
--- a/crates/glam/src/swizzles/scalar/vec3a_impl.rs
+++ b/crates/glam/src/swizzles/scalar/vec3a_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> Vec3A {
- Vec3A::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> Vec3A {
- Vec3A::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> Vec3A {
- Vec3A::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> Vec3A {
- Vec3A::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> Vec3A {
- Vec3A::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> Vec3A {
- Vec3A::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> Vec3A {
- Vec3A::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> Vec3A {
- Vec3A::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> Vec3A {
- Vec3A::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> Vec3A {
- Vec3A::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> Vec3A {
- Vec3A::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> Vec3A {
- Vec3A::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> Vec3A {
- Vec3A::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> Vec3A {
- Vec3A::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> Vec3A {
- Vec3A::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> Vec3A {
- Vec3A::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> Vec3A {
- Vec3A::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> Vec3A {
- Vec3A::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> Vec3A {
- Vec3A::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> Vec3A {
- Vec3A::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> Vec3A {
- Vec3A::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> Vec3A {
- Vec3A::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> Vec3A {
- Vec3A::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> Vec3A {
- Vec3A::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> Vec3A {
- Vec3A::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> Vec3A {
- Vec3A::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/scalar/vec4_impl.rs b/crates/glam/src/swizzles/scalar/vec4_impl.rs
index 93feb10..1b64e6d 100644
--- a/crates/glam/src/swizzles/scalar/vec4_impl.rs
+++ b/crates/glam/src/swizzles/scalar/vec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> Vec4 {
- Vec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> Vec4 {
- Vec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> Vec4 {
- Vec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> Vec4 {
- Vec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> Vec4 {
- Vec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> Vec4 {
- Vec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> Vec4 {
- Vec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> Vec4 {
- Vec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> Vec4 {
- Vec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> Vec4 {
- Vec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> Vec4 {
- Vec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> Vec4 {
- Vec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> Vec4 {
- Vec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> Vec4 {
- Vec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> Vec4 {
- Vec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> Vec4 {
- Vec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/sse2/vec3a_impl.rs b/crates/glam/src/swizzles/sse2/vec3a_impl.rs
index 5186d42..3ac3d51 100644
--- a/crates/glam/src/swizzles/sse2/vec3a_impl.rs
+++ b/crates/glam/src/swizzles/sse2/vec3a_impl.rs
@@ -117,133 +117,133 @@
}
#[inline]
- fn xxx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) }).into())
+ fn xxx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) }).into())
}
#[inline]
- fn xxy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) }).into())
+ fn xxy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) }).into())
}
#[inline]
- fn xxz(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) }).into())
+ fn xxz(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) }).into())
}
#[inline]
- fn xyx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) }).into())
+ fn xyx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) }).into())
}
#[inline]
- fn xyy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) }).into())
+ fn xyy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) }).into())
}
#[inline]
- fn xzx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) }).into())
+ fn xzx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) }).into())
}
#[inline]
- fn xzy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) }).into())
+ fn xzy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) }).into())
}
#[inline]
- fn xzz(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) }).into())
+ fn xzz(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) }).into())
}
#[inline]
- fn yxx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) }).into())
+ fn yxx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) }).into())
}
#[inline]
- fn yxy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) }).into())
+ fn yxy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) }).into())
}
#[inline]
- fn yxz(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) }).into())
+ fn yxz(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) }).into())
}
#[inline]
- fn yyx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) }).into())
+ fn yyx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) }).into())
}
#[inline]
- fn yyy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) }).into())
+ fn yyy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) }).into())
}
#[inline]
- fn yyz(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) }).into())
+ fn yyz(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) }).into())
}
#[inline]
- fn yzx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) }).into())
+ fn yzx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) }).into())
}
#[inline]
- fn yzy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) }).into())
+ fn yzy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) }).into())
}
#[inline]
- fn yzz(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) }).into())
+ fn yzz(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) }).into())
}
#[inline]
- fn zxx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) }).into())
+ fn zxx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) }).into())
}
#[inline]
- fn zxy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) }).into())
+ fn zxy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) }).into())
}
#[inline]
- fn zxz(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) }).into())
+ fn zxz(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) }).into())
}
#[inline]
- fn zyx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) }).into())
+ fn zyx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) }).into())
}
#[inline]
- fn zyy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) }).into())
+ fn zyy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) }).into())
}
#[inline]
- fn zyz(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) }).into())
+ fn zyz(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) }).into())
}
#[inline]
- fn zzx(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) }).into())
+ fn zzx(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) }).into())
}
#[inline]
- fn zzy(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) }).into())
+ fn zzy(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) }).into())
}
#[inline]
- fn zzz(self) -> Vec3A {
- Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) }).into())
+ fn zzz(self) -> Self {
+ Self((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) }).into())
}
#[inline]
diff --git a/crates/glam/src/swizzles/sse2/vec4_impl.rs b/crates/glam/src/swizzles/sse2/vec4_impl.rs
index e0a9efd..c4fb299 100644
--- a/crates/glam/src/swizzles/sse2/vec4_impl.rs
+++ b/crates/glam/src/swizzles/sse2/vec4_impl.rs
@@ -643,1277 +643,1277 @@
}
#[inline]
- fn xxxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) })
+ fn xxxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) })
}
#[inline]
- fn xxxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_00) })
+ fn xxxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_00) })
}
#[inline]
- fn xxxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_00) })
+ fn xxxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_00) })
}
#[inline]
- fn xxxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_00_00) })
+ fn xxxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_00_00) })
}
#[inline]
- fn xxyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) })
+ fn xxyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) })
}
#[inline]
- fn xxyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_00) })
+ fn xxyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_00) })
}
#[inline]
- fn xxyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_00) })
+ fn xxyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_00) })
}
#[inline]
- fn xxyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_00_00) })
+ fn xxyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_00_00) })
}
#[inline]
- fn xxzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) })
+ fn xxzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) })
}
#[inline]
- fn xxzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_00) })
+ fn xxzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_00) })
}
#[inline]
- fn xxzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_00) })
+ fn xxzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_00) })
}
#[inline]
- fn xxzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_00_00) })
+ fn xxzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_00_00) })
}
#[inline]
- fn xxwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_00) })
+ fn xxwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_00) })
}
#[inline]
- fn xxwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_00_00) })
+ fn xxwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_00_00) })
}
#[inline]
- fn xxwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_00_00) })
+ fn xxwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_00_00) })
}
#[inline]
- fn xxww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_00_00) })
+ fn xxww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_00_00) })
}
#[inline]
- fn xyxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) })
+ fn xyxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) })
}
#[inline]
- fn xyxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_00) })
+ fn xyxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_00) })
}
#[inline]
- fn xyxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_00) })
+ fn xyxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_00) })
}
#[inline]
- fn xyxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_01_00) })
+ fn xyxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_01_00) })
}
#[inline]
- fn xyyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) })
+ fn xyyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) })
}
#[inline]
- fn xyyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_00) })
+ fn xyyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_00) })
}
#[inline]
- fn xyyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_00) })
+ fn xyyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_00) })
}
#[inline]
- fn xyyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_01_00) })
+ fn xyyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_01_00) })
}
#[inline]
- fn xyzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_00) })
+ fn xyzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_00) })
}
#[inline]
- fn xyzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_00) })
+ fn xyzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_00) })
}
#[inline]
- fn xyzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_00) })
+ fn xyzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_00) })
}
#[inline]
- fn xywx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_00) })
+ fn xywx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_00) })
}
#[inline]
- fn xywy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_01_00) })
+ fn xywy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_01_00) })
}
#[inline]
- fn xywz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_01_00) })
+ fn xywz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_01_00) })
}
#[inline]
- fn xyww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_01_00) })
+ fn xyww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_01_00) })
}
#[inline]
- fn xzxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) })
+ fn xzxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) })
}
#[inline]
- fn xzxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_00) })
+ fn xzxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_00) })
}
#[inline]
- fn xzxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_00) })
+ fn xzxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_00) })
}
#[inline]
- fn xzxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_10_00) })
+ fn xzxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_10_00) })
}
#[inline]
- fn xzyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) })
+ fn xzyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) })
}
#[inline]
- fn xzyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_00) })
+ fn xzyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_00) })
}
#[inline]
- fn xzyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_00) })
+ fn xzyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_00) })
}
#[inline]
- fn xzyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_10_00) })
+ fn xzyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_10_00) })
}
#[inline]
- fn xzzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) })
+ fn xzzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) })
}
#[inline]
- fn xzzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_00) })
+ fn xzzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_00) })
}
#[inline]
- fn xzzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_00) })
+ fn xzzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_00) })
}
#[inline]
- fn xzzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_10_00) })
+ fn xzzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_10_00) })
}
#[inline]
- fn xzwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_00) })
+ fn xzwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_00) })
}
#[inline]
- fn xzwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_10_00) })
+ fn xzwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_10_00) })
}
#[inline]
- fn xzwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_10_00) })
+ fn xzwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_10_00) })
}
#[inline]
- fn xzww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_10_00) })
+ fn xzww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_10_00) })
}
#[inline]
- fn xwxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_00) })
+ fn xwxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_00) })
}
#[inline]
- fn xwxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_11_00) })
+ fn xwxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_11_00) })
}
#[inline]
- fn xwxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_11_00) })
+ fn xwxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_11_00) })
}
#[inline]
- fn xwxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_11_00) })
+ fn xwxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_11_00) })
}
#[inline]
- fn xwyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_00) })
+ fn xwyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_00) })
}
#[inline]
- fn xwyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_11_00) })
+ fn xwyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_11_00) })
}
#[inline]
- fn xwyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_11_00) })
+ fn xwyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_11_00) })
}
#[inline]
- fn xwyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_11_00) })
+ fn xwyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_11_00) })
}
#[inline]
- fn xwzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_00) })
+ fn xwzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_00) })
}
#[inline]
- fn xwzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_11_00) })
+ fn xwzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_11_00) })
}
#[inline]
- fn xwzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_11_00) })
+ fn xwzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_11_00) })
}
#[inline]
- fn xwzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_11_00) })
+ fn xwzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_11_00) })
}
#[inline]
- fn xwwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_00) })
+ fn xwwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_00) })
}
#[inline]
- fn xwwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_11_00) })
+ fn xwwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_11_00) })
}
#[inline]
- fn xwwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_11_00) })
+ fn xwwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_11_00) })
}
#[inline]
- fn xwww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_11_00) })
+ fn xwww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_11_00) })
}
#[inline]
- fn yxxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) })
+ fn yxxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) })
}
#[inline]
- fn yxxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_01) })
+ fn yxxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_01) })
}
#[inline]
- fn yxxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_01) })
+ fn yxxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_01) })
}
#[inline]
- fn yxxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_00_01) })
+ fn yxxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_00_01) })
}
#[inline]
- fn yxyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) })
+ fn yxyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) })
}
#[inline]
- fn yxyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_01) })
+ fn yxyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_01) })
}
#[inline]
- fn yxyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_01) })
+ fn yxyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_01) })
}
#[inline]
- fn yxyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_00_01) })
+ fn yxyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_00_01) })
}
#[inline]
- fn yxzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) })
+ fn yxzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) })
}
#[inline]
- fn yxzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_01) })
+ fn yxzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_01) })
}
#[inline]
- fn yxzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_01) })
+ fn yxzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_01) })
}
#[inline]
- fn yxzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_00_01) })
+ fn yxzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_00_01) })
}
#[inline]
- fn yxwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_01) })
+ fn yxwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_01) })
}
#[inline]
- fn yxwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_00_01) })
+ fn yxwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_00_01) })
}
#[inline]
- fn yxwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_00_01) })
+ fn yxwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_00_01) })
}
#[inline]
- fn yxww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_00_01) })
+ fn yxww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_00_01) })
}
#[inline]
- fn yyxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) })
+ fn yyxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) })
}
#[inline]
- fn yyxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_01) })
+ fn yyxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_01) })
}
#[inline]
- fn yyxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_01) })
+ fn yyxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_01) })
}
#[inline]
- fn yyxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_01_01) })
+ fn yyxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_01_01) })
}
#[inline]
- fn yyyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) })
+ fn yyyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) })
}
#[inline]
- fn yyyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_01) })
+ fn yyyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_01) })
}
#[inline]
- fn yyyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_01) })
+ fn yyyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_01) })
}
#[inline]
- fn yyyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_01_01) })
+ fn yyyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_01_01) })
}
#[inline]
- fn yyzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) })
+ fn yyzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) })
}
#[inline]
- fn yyzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_01) })
+ fn yyzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_01) })
}
#[inline]
- fn yyzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_01) })
+ fn yyzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_01) })
}
#[inline]
- fn yyzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_01_01) })
+ fn yyzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_01_01) })
}
#[inline]
- fn yywx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_01) })
+ fn yywx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_01) })
}
#[inline]
- fn yywy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_01_01) })
+ fn yywy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_01_01) })
}
#[inline]
- fn yywz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_01_01) })
+ fn yywz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_01_01) })
}
#[inline]
- fn yyww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_01_01) })
+ fn yyww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_01_01) })
}
#[inline]
- fn yzxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) })
+ fn yzxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) })
}
#[inline]
- fn yzxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_01) })
+ fn yzxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_01) })
}
#[inline]
- fn yzxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_01) })
+ fn yzxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_01) })
}
#[inline]
- fn yzxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_10_01) })
+ fn yzxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_10_01) })
}
#[inline]
- fn yzyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) })
+ fn yzyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) })
}
#[inline]
- fn yzyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_01) })
+ fn yzyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_01) })
}
#[inline]
- fn yzyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_01) })
+ fn yzyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_01) })
}
#[inline]
- fn yzyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_10_01) })
+ fn yzyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_10_01) })
}
#[inline]
- fn yzzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) })
+ fn yzzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) })
}
#[inline]
- fn yzzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_01) })
+ fn yzzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_01) })
}
#[inline]
- fn yzzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_01) })
+ fn yzzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_01) })
}
#[inline]
- fn yzzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_10_01) })
+ fn yzzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_10_01) })
}
#[inline]
- fn yzwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_01) })
+ fn yzwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_01) })
}
#[inline]
- fn yzwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_10_01) })
+ fn yzwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_10_01) })
}
#[inline]
- fn yzwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_10_01) })
+ fn yzwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_10_01) })
}
#[inline]
- fn yzww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_10_01) })
+ fn yzww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_10_01) })
}
#[inline]
- fn ywxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_01) })
+ fn ywxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_01) })
}
#[inline]
- fn ywxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_11_01) })
+ fn ywxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_11_01) })
}
#[inline]
- fn ywxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_11_01) })
+ fn ywxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_11_01) })
}
#[inline]
- fn ywxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_11_01) })
+ fn ywxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_11_01) })
}
#[inline]
- fn ywyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_01) })
+ fn ywyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_01) })
}
#[inline]
- fn ywyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_11_01) })
+ fn ywyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_11_01) })
}
#[inline]
- fn ywyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_11_01) })
+ fn ywyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_11_01) })
}
#[inline]
- fn ywyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_11_01) })
+ fn ywyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_11_01) })
}
#[inline]
- fn ywzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_01) })
+ fn ywzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_01) })
}
#[inline]
- fn ywzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_11_01) })
+ fn ywzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_11_01) })
}
#[inline]
- fn ywzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_11_01) })
+ fn ywzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_11_01) })
}
#[inline]
- fn ywzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_11_01) })
+ fn ywzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_11_01) })
}
#[inline]
- fn ywwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_01) })
+ fn ywwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_01) })
}
#[inline]
- fn ywwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_11_01) })
+ fn ywwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_11_01) })
}
#[inline]
- fn ywwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_11_01) })
+ fn ywwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_11_01) })
}
#[inline]
- fn ywww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_11_01) })
+ fn ywww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_11_01) })
}
#[inline]
- fn zxxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) })
+ fn zxxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) })
}
#[inline]
- fn zxxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_10) })
+ fn zxxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_10) })
}
#[inline]
- fn zxxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_10) })
+ fn zxxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_10) })
}
#[inline]
- fn zxxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_00_10) })
+ fn zxxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_00_10) })
}
#[inline]
- fn zxyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) })
+ fn zxyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) })
}
#[inline]
- fn zxyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_10) })
+ fn zxyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_10) })
}
#[inline]
- fn zxyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_10) })
+ fn zxyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_10) })
}
#[inline]
- fn zxyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_00_10) })
+ fn zxyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_00_10) })
}
#[inline]
- fn zxzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) })
+ fn zxzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) })
}
#[inline]
- fn zxzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_10) })
+ fn zxzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_10) })
}
#[inline]
- fn zxzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_10) })
+ fn zxzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_10) })
}
#[inline]
- fn zxzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_00_10) })
+ fn zxzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_00_10) })
}
#[inline]
- fn zxwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_10) })
+ fn zxwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_10) })
}
#[inline]
- fn zxwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_00_10) })
+ fn zxwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_00_10) })
}
#[inline]
- fn zxwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_00_10) })
+ fn zxwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_00_10) })
}
#[inline]
- fn zxww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_00_10) })
+ fn zxww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_00_10) })
}
#[inline]
- fn zyxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) })
+ fn zyxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) })
}
#[inline]
- fn zyxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_10) })
+ fn zyxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_10) })
}
#[inline]
- fn zyxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_10) })
+ fn zyxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_10) })
}
#[inline]
- fn zyxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_01_10) })
+ fn zyxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_01_10) })
}
#[inline]
- fn zyyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) })
+ fn zyyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) })
}
#[inline]
- fn zyyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_10) })
+ fn zyyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_10) })
}
#[inline]
- fn zyyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_10) })
+ fn zyyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_10) })
}
#[inline]
- fn zyyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_01_10) })
+ fn zyyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_01_10) })
}
#[inline]
- fn zyzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) })
+ fn zyzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) })
}
#[inline]
- fn zyzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_10) })
+ fn zyzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_10) })
}
#[inline]
- fn zyzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_10) })
+ fn zyzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_10) })
}
#[inline]
- fn zyzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_01_10) })
+ fn zyzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_01_10) })
}
#[inline]
- fn zywx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_10) })
+ fn zywx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_10) })
}
#[inline]
- fn zywy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_01_10) })
+ fn zywy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_01_10) })
}
#[inline]
- fn zywz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_01_10) })
+ fn zywz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_01_10) })
}
#[inline]
- fn zyww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_01_10) })
+ fn zyww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_01_10) })
}
#[inline]
- fn zzxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) })
+ fn zzxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) })
}
#[inline]
- fn zzxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_10) })
+ fn zzxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_10) })
}
#[inline]
- fn zzxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_10) })
+ fn zzxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_10) })
}
#[inline]
- fn zzxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_10_10) })
+ fn zzxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_10_10) })
}
#[inline]
- fn zzyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) })
+ fn zzyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) })
}
#[inline]
- fn zzyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_10) })
+ fn zzyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_10) })
}
#[inline]
- fn zzyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_10) })
+ fn zzyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_10) })
}
#[inline]
- fn zzyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_10_10) })
+ fn zzyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_10_10) })
}
#[inline]
- fn zzzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) })
+ fn zzzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) })
}
#[inline]
- fn zzzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_10) })
+ fn zzzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_10) })
}
#[inline]
- fn zzzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_10) })
+ fn zzzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_10) })
}
#[inline]
- fn zzzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_10_10) })
+ fn zzzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_10_10) })
}
#[inline]
- fn zzwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_10) })
+ fn zzwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_10) })
}
#[inline]
- fn zzwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_10_10) })
+ fn zzwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_10_10) })
}
#[inline]
- fn zzwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_10_10) })
+ fn zzwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_10_10) })
}
#[inline]
- fn zzww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_10_10) })
+ fn zzww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_10_10) })
}
#[inline]
- fn zwxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_10) })
+ fn zwxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_10) })
}
#[inline]
- fn zwxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_11_10) })
+ fn zwxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_11_10) })
}
#[inline]
- fn zwxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_11_10) })
+ fn zwxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_11_10) })
}
#[inline]
- fn zwxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_11_10) })
+ fn zwxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_11_10) })
}
#[inline]
- fn zwyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_10) })
+ fn zwyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_10) })
}
#[inline]
- fn zwyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_11_10) })
+ fn zwyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_11_10) })
}
#[inline]
- fn zwyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_11_10) })
+ fn zwyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_11_10) })
}
#[inline]
- fn zwyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_11_10) })
+ fn zwyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_11_10) })
}
#[inline]
- fn zwzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_10) })
+ fn zwzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_10) })
}
#[inline]
- fn zwzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_11_10) })
+ fn zwzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_11_10) })
}
#[inline]
- fn zwzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_11_10) })
+ fn zwzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_11_10) })
}
#[inline]
- fn zwzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_11_10) })
+ fn zwzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_11_10) })
}
#[inline]
- fn zwwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_10) })
+ fn zwwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_10) })
}
#[inline]
- fn zwwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_11_10) })
+ fn zwwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_11_10) })
}
#[inline]
- fn zwwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_11_10) })
+ fn zwwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_11_10) })
}
#[inline]
- fn zwww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_11_10) })
+ fn zwww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_11_10) })
}
#[inline]
- fn wxxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_11) })
+ fn wxxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_11) })
}
#[inline]
- fn wxxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_11) })
+ fn wxxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_11) })
}
#[inline]
- fn wxxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_11) })
+ fn wxxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_11) })
}
#[inline]
- fn wxxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_00_11) })
+ fn wxxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_00_11) })
}
#[inline]
- fn wxyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_11) })
+ fn wxyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_11) })
}
#[inline]
- fn wxyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_11) })
+ fn wxyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_11) })
}
#[inline]
- fn wxyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_11) })
+ fn wxyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_11) })
}
#[inline]
- fn wxyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_00_11) })
+ fn wxyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_00_11) })
}
#[inline]
- fn wxzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_11) })
+ fn wxzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_11) })
}
#[inline]
- fn wxzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_11) })
+ fn wxzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_11) })
}
#[inline]
- fn wxzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_11) })
+ fn wxzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_11) })
}
#[inline]
- fn wxzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_00_11) })
+ fn wxzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_00_11) })
}
#[inline]
- fn wxwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_11) })
+ fn wxwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_11) })
}
#[inline]
- fn wxwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_00_11) })
+ fn wxwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_00_11) })
}
#[inline]
- fn wxwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_00_11) })
+ fn wxwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_00_11) })
}
#[inline]
- fn wxww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_00_11) })
+ fn wxww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_00_11) })
}
#[inline]
- fn wyxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_11) })
+ fn wyxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_11) })
}
#[inline]
- fn wyxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_11) })
+ fn wyxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_11) })
}
#[inline]
- fn wyxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_11) })
+ fn wyxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_11) })
}
#[inline]
- fn wyxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_01_11) })
+ fn wyxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_01_11) })
}
#[inline]
- fn wyyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_11) })
+ fn wyyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_11) })
}
#[inline]
- fn wyyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_11) })
+ fn wyyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_11) })
}
#[inline]
- fn wyyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_11) })
+ fn wyyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_11) })
}
#[inline]
- fn wyyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_01_11) })
+ fn wyyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_01_11) })
}
#[inline]
- fn wyzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_11) })
+ fn wyzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_11) })
}
#[inline]
- fn wyzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_11) })
+ fn wyzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_11) })
}
#[inline]
- fn wyzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_11) })
+ fn wyzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_11) })
}
#[inline]
- fn wyzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_01_11) })
+ fn wyzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_01_11) })
}
#[inline]
- fn wywx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_11) })
+ fn wywx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_11) })
}
#[inline]
- fn wywy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_01_11) })
+ fn wywy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_01_11) })
}
#[inline]
- fn wywz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_01_11) })
+ fn wywz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_01_11) })
}
#[inline]
- fn wyww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_01_11) })
+ fn wyww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_01_11) })
}
#[inline]
- fn wzxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_11) })
+ fn wzxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_11) })
}
#[inline]
- fn wzxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_11) })
+ fn wzxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_11) })
}
#[inline]
- fn wzxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_11) })
+ fn wzxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_11) })
}
#[inline]
- fn wzxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_10_11) })
+ fn wzxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_10_11) })
}
#[inline]
- fn wzyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_11) })
+ fn wzyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_11) })
}
#[inline]
- fn wzyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_11) })
+ fn wzyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_11) })
}
#[inline]
- fn wzyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_11) })
+ fn wzyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_11) })
}
#[inline]
- fn wzyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_10_11) })
+ fn wzyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_10_11) })
}
#[inline]
- fn wzzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_11) })
+ fn wzzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_11) })
}
#[inline]
- fn wzzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_11) })
+ fn wzzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_11) })
}
#[inline]
- fn wzzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_11) })
+ fn wzzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_11) })
}
#[inline]
- fn wzzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_10_11) })
+ fn wzzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_10_11) })
}
#[inline]
- fn wzwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_11) })
+ fn wzwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_11) })
}
#[inline]
- fn wzwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_10_11) })
+ fn wzwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_10_11) })
}
#[inline]
- fn wzwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_10_11) })
+ fn wzwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_10_11) })
}
#[inline]
- fn wzww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_10_11) })
+ fn wzww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_10_11) })
}
#[inline]
- fn wwxx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_11) })
+ fn wwxx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_11) })
}
#[inline]
- fn wwxy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_11_11) })
+ fn wwxy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_11_11) })
}
#[inline]
- fn wwxz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_11_11) })
+ fn wwxz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_11_11) })
}
#[inline]
- fn wwxw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_11_11) })
+ fn wwxw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_00_11_11) })
}
#[inline]
- fn wwyx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_11) })
+ fn wwyx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_11) })
}
#[inline]
- fn wwyy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_11_11) })
+ fn wwyy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_11_11) })
}
#[inline]
- fn wwyz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_11_11) })
+ fn wwyz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_11_11) })
}
#[inline]
- fn wwyw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_11_11) })
+ fn wwyw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_01_11_11) })
}
#[inline]
- fn wwzx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_11) })
+ fn wwzx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_11) })
}
#[inline]
- fn wwzy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_11_11) })
+ fn wwzy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_11_11) })
}
#[inline]
- fn wwzz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_11_11) })
+ fn wwzz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_11_11) })
}
#[inline]
- fn wwzw(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_11_11) })
+ fn wwzw(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_10_11_11) })
}
#[inline]
- fn wwwx(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_11) })
+ fn wwwx(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_11) })
}
#[inline]
- fn wwwy(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_11_11) })
+ fn wwwy(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_11_11_11) })
}
#[inline]
- fn wwwz(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_11_11) })
+ fn wwwz(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_11_11_11) })
}
#[inline]
- fn wwww(self) -> Vec4 {
- Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_11_11) })
+ fn wwww(self) -> Self {
+ Self(unsafe { _mm_shuffle_ps(self.0, self.0, 0b11_11_11_11) })
}
}
diff --git a/crates/glam/src/swizzles/u16vec2_impl.rs b/crates/glam/src/swizzles/u16vec2_impl.rs
index fc3c45c..2462f55 100644
--- a/crates/glam/src/swizzles/u16vec2_impl.rs
+++ b/crates/glam/src/swizzles/u16vec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = U16Vec4;
#[inline]
- fn xx(self) -> U16Vec2 {
- U16Vec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> U16Vec2 {
- U16Vec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> U16Vec2 {
- U16Vec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/u16vec3_impl.rs b/crates/glam/src/swizzles/u16vec3_impl.rs
index ca762d8..e21c419 100644
--- a/crates/glam/src/swizzles/u16vec3_impl.rs
+++ b/crates/glam/src/swizzles/u16vec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> U16Vec3 {
- U16Vec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> U16Vec3 {
- U16Vec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> U16Vec3 {
- U16Vec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> U16Vec3 {
- U16Vec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> U16Vec3 {
- U16Vec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> U16Vec3 {
- U16Vec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> U16Vec3 {
- U16Vec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> U16Vec3 {
- U16Vec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> U16Vec3 {
- U16Vec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> U16Vec3 {
- U16Vec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/u16vec4_impl.rs b/crates/glam/src/swizzles/u16vec4_impl.rs
index 2b393b3..968e36f 100644
--- a/crates/glam/src/swizzles/u16vec4_impl.rs
+++ b/crates/glam/src/swizzles/u16vec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> U16Vec4 {
- U16Vec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> U16Vec4 {
- U16Vec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> U16Vec4 {
- U16Vec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> U16Vec4 {
- U16Vec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/u64vec2_impl.rs b/crates/glam/src/swizzles/u64vec2_impl.rs
index e2b2d29..a33ac0d 100644
--- a/crates/glam/src/swizzles/u64vec2_impl.rs
+++ b/crates/glam/src/swizzles/u64vec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = U64Vec4;
#[inline]
- fn xx(self) -> U64Vec2 {
- U64Vec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> U64Vec2 {
- U64Vec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> U64Vec2 {
- U64Vec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/u64vec3_impl.rs b/crates/glam/src/swizzles/u64vec3_impl.rs
index c9a853f..1b21e87 100644
--- a/crates/glam/src/swizzles/u64vec3_impl.rs
+++ b/crates/glam/src/swizzles/u64vec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> U64Vec3 {
- U64Vec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> U64Vec3 {
- U64Vec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> U64Vec3 {
- U64Vec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> U64Vec3 {
- U64Vec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> U64Vec3 {
- U64Vec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> U64Vec3 {
- U64Vec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> U64Vec3 {
- U64Vec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> U64Vec3 {
- U64Vec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> U64Vec3 {
- U64Vec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> U64Vec3 {
- U64Vec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/u64vec4_impl.rs b/crates/glam/src/swizzles/u64vec4_impl.rs
index 3afa40e..36c2eef 100644
--- a/crates/glam/src/swizzles/u64vec4_impl.rs
+++ b/crates/glam/src/swizzles/u64vec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> U64Vec4 {
- U64Vec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> U64Vec4 {
- U64Vec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> U64Vec4 {
- U64Vec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> U64Vec4 {
- U64Vec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/u8vec2_impl.rs b/crates/glam/src/swizzles/u8vec2_impl.rs
index df96903..d09c586 100644
--- a/crates/glam/src/swizzles/u8vec2_impl.rs
+++ b/crates/glam/src/swizzles/u8vec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = U8Vec4;
#[inline]
- fn xx(self) -> U8Vec2 {
- U8Vec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> U8Vec2 {
- U8Vec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> U8Vec2 {
- U8Vec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/u8vec3_impl.rs b/crates/glam/src/swizzles/u8vec3_impl.rs
index 410825c..6d5418b 100644
--- a/crates/glam/src/swizzles/u8vec3_impl.rs
+++ b/crates/glam/src/swizzles/u8vec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> U8Vec3 {
- U8Vec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> U8Vec3 {
- U8Vec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> U8Vec3 {
- U8Vec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> U8Vec3 {
- U8Vec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> U8Vec3 {
- U8Vec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> U8Vec3 {
- U8Vec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> U8Vec3 {
- U8Vec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> U8Vec3 {
- U8Vec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> U8Vec3 {
- U8Vec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> U8Vec3 {
- U8Vec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/u8vec4_impl.rs b/crates/glam/src/swizzles/u8vec4_impl.rs
index 4739b02..5f80205 100644
--- a/crates/glam/src/swizzles/u8vec4_impl.rs
+++ b/crates/glam/src/swizzles/u8vec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> U8Vec4 {
- U8Vec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> U8Vec4 {
- U8Vec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> U8Vec4 {
- U8Vec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> U8Vec4 {
- U8Vec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/usizevec2_impl.rs b/crates/glam/src/swizzles/usizevec2_impl.rs
index c85a1a6..855b54a 100644
--- a/crates/glam/src/swizzles/usizevec2_impl.rs
+++ b/crates/glam/src/swizzles/usizevec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = USizeVec4;
#[inline]
- fn xx(self) -> USizeVec2 {
- USizeVec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> USizeVec2 {
- USizeVec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> USizeVec2 {
- USizeVec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/usizevec3_impl.rs b/crates/glam/src/swizzles/usizevec3_impl.rs
index 859160d..dbda07b 100644
--- a/crates/glam/src/swizzles/usizevec3_impl.rs
+++ b/crates/glam/src/swizzles/usizevec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> USizeVec3 {
- USizeVec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> USizeVec3 {
- USizeVec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> USizeVec3 {
- USizeVec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> USizeVec3 {
- USizeVec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> USizeVec3 {
- USizeVec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> USizeVec3 {
- USizeVec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> USizeVec3 {
- USizeVec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> USizeVec3 {
- USizeVec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> USizeVec3 {
- USizeVec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> USizeVec3 {
- USizeVec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/usizevec4_impl.rs b/crates/glam/src/swizzles/usizevec4_impl.rs
index 813c9d1..f6eff33 100644
--- a/crates/glam/src/swizzles/usizevec4_impl.rs
+++ b/crates/glam/src/swizzles/usizevec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> USizeVec4 {
- USizeVec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> USizeVec4 {
- USizeVec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> USizeVec4 {
- USizeVec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> USizeVec4 {
- USizeVec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/uvec2_impl.rs b/crates/glam/src/swizzles/uvec2_impl.rs
index 7580db7..e03e891 100644
--- a/crates/glam/src/swizzles/uvec2_impl.rs
+++ b/crates/glam/src/swizzles/uvec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = UVec4;
#[inline]
- fn xx(self) -> UVec2 {
- UVec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> UVec2 {
- UVec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> UVec2 {
- UVec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/uvec3_impl.rs b/crates/glam/src/swizzles/uvec3_impl.rs
index e864c96..a182291 100644
--- a/crates/glam/src/swizzles/uvec3_impl.rs
+++ b/crates/glam/src/swizzles/uvec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> UVec3 {
- UVec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> UVec3 {
- UVec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> UVec3 {
- UVec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> UVec3 {
- UVec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> UVec3 {
- UVec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> UVec3 {
- UVec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> UVec3 {
- UVec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> UVec3 {
- UVec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> UVec3 {
- UVec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> UVec3 {
- UVec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> UVec3 {
- UVec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> UVec3 {
- UVec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> UVec3 {
- UVec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> UVec3 {
- UVec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> UVec3 {
- UVec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> UVec3 {
- UVec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> UVec3 {
- UVec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> UVec3 {
- UVec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> UVec3 {
- UVec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> UVec3 {
- UVec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> UVec3 {
- UVec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> UVec3 {
- UVec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> UVec3 {
- UVec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> UVec3 {
- UVec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> UVec3 {
- UVec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> UVec3 {
- UVec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/uvec4_impl.rs b/crates/glam/src/swizzles/uvec4_impl.rs
index ab1e7b8..23d1a73 100644
--- a/crates/glam/src/swizzles/uvec4_impl.rs
+++ b/crates/glam/src/swizzles/uvec4_impl.rs
@@ -636,1277 +636,1277 @@
}
#[inline]
- fn xxxx(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.x, self.x)
+ fn xxxx(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.x)
}
#[inline]
- fn xxxy(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.x, self.y)
+ fn xxxy(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.y)
}
#[inline]
- fn xxxz(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.x, self.z)
+ fn xxxz(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.z)
}
#[inline]
- fn xxxw(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.x, self.w)
+ fn xxxw(self) -> Self {
+ Self::new(self.x, self.x, self.x, self.w)
}
#[inline]
- fn xxyx(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.y, self.x)
+ fn xxyx(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.x)
}
#[inline]
- fn xxyy(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.y, self.y)
+ fn xxyy(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.y)
}
#[inline]
- fn xxyz(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.y, self.z)
+ fn xxyz(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.z)
}
#[inline]
- fn xxyw(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.y, self.w)
+ fn xxyw(self) -> Self {
+ Self::new(self.x, self.x, self.y, self.w)
}
#[inline]
- fn xxzx(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.z, self.x)
+ fn xxzx(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.x)
}
#[inline]
- fn xxzy(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.z, self.y)
+ fn xxzy(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.y)
}
#[inline]
- fn xxzz(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.z, self.z)
+ fn xxzz(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.z)
}
#[inline]
- fn xxzw(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.z, self.w)
+ fn xxzw(self) -> Self {
+ Self::new(self.x, self.x, self.z, self.w)
}
#[inline]
- fn xxwx(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.w, self.x)
+ fn xxwx(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.x)
}
#[inline]
- fn xxwy(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.w, self.y)
+ fn xxwy(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.y)
}
#[inline]
- fn xxwz(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.w, self.z)
+ fn xxwz(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.z)
}
#[inline]
- fn xxww(self) -> UVec4 {
- UVec4::new(self.x, self.x, self.w, self.w)
+ fn xxww(self) -> Self {
+ Self::new(self.x, self.x, self.w, self.w)
}
#[inline]
- fn xyxx(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.x, self.x)
+ fn xyxx(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.x)
}
#[inline]
- fn xyxy(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.x, self.y)
+ fn xyxy(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.y)
}
#[inline]
- fn xyxz(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.x, self.z)
+ fn xyxz(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.z)
}
#[inline]
- fn xyxw(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.x, self.w)
+ fn xyxw(self) -> Self {
+ Self::new(self.x, self.y, self.x, self.w)
}
#[inline]
- fn xyyx(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.y, self.x)
+ fn xyyx(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.x)
}
#[inline]
- fn xyyy(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.y, self.y)
+ fn xyyy(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.y)
}
#[inline]
- fn xyyz(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.y, self.z)
+ fn xyyz(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.z)
}
#[inline]
- fn xyyw(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.y, self.w)
+ fn xyyw(self) -> Self {
+ Self::new(self.x, self.y, self.y, self.w)
}
#[inline]
- fn xyzx(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.z, self.x)
+ fn xyzx(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.x)
}
#[inline]
- fn xyzy(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.z, self.y)
+ fn xyzy(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.y)
}
#[inline]
- fn xyzz(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.z, self.z)
+ fn xyzz(self) -> Self {
+ Self::new(self.x, self.y, self.z, self.z)
}
#[inline]
- fn xywx(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.w, self.x)
+ fn xywx(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.x)
}
#[inline]
- fn xywy(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.w, self.y)
+ fn xywy(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.y)
}
#[inline]
- fn xywz(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.w, self.z)
+ fn xywz(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.z)
}
#[inline]
- fn xyww(self) -> UVec4 {
- UVec4::new(self.x, self.y, self.w, self.w)
+ fn xyww(self) -> Self {
+ Self::new(self.x, self.y, self.w, self.w)
}
#[inline]
- fn xzxx(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.x, self.x)
+ fn xzxx(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.x)
}
#[inline]
- fn xzxy(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.x, self.y)
+ fn xzxy(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.y)
}
#[inline]
- fn xzxz(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.x, self.z)
+ fn xzxz(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.z)
}
#[inline]
- fn xzxw(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.x, self.w)
+ fn xzxw(self) -> Self {
+ Self::new(self.x, self.z, self.x, self.w)
}
#[inline]
- fn xzyx(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.y, self.x)
+ fn xzyx(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.x)
}
#[inline]
- fn xzyy(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.y, self.y)
+ fn xzyy(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.y)
}
#[inline]
- fn xzyz(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.y, self.z)
+ fn xzyz(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.z)
}
#[inline]
- fn xzyw(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.y, self.w)
+ fn xzyw(self) -> Self {
+ Self::new(self.x, self.z, self.y, self.w)
}
#[inline]
- fn xzzx(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.z, self.x)
+ fn xzzx(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.x)
}
#[inline]
- fn xzzy(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.z, self.y)
+ fn xzzy(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.y)
}
#[inline]
- fn xzzz(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.z, self.z)
+ fn xzzz(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.z)
}
#[inline]
- fn xzzw(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.z, self.w)
+ fn xzzw(self) -> Self {
+ Self::new(self.x, self.z, self.z, self.w)
}
#[inline]
- fn xzwx(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.w, self.x)
+ fn xzwx(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.x)
}
#[inline]
- fn xzwy(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.w, self.y)
+ fn xzwy(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.y)
}
#[inline]
- fn xzwz(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.w, self.z)
+ fn xzwz(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.z)
}
#[inline]
- fn xzww(self) -> UVec4 {
- UVec4::new(self.x, self.z, self.w, self.w)
+ fn xzww(self) -> Self {
+ Self::new(self.x, self.z, self.w, self.w)
}
#[inline]
- fn xwxx(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.x, self.x)
+ fn xwxx(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.x)
}
#[inline]
- fn xwxy(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.x, self.y)
+ fn xwxy(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.y)
}
#[inline]
- fn xwxz(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.x, self.z)
+ fn xwxz(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.z)
}
#[inline]
- fn xwxw(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.x, self.w)
+ fn xwxw(self) -> Self {
+ Self::new(self.x, self.w, self.x, self.w)
}
#[inline]
- fn xwyx(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.y, self.x)
+ fn xwyx(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.x)
}
#[inline]
- fn xwyy(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.y, self.y)
+ fn xwyy(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.y)
}
#[inline]
- fn xwyz(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.y, self.z)
+ fn xwyz(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.z)
}
#[inline]
- fn xwyw(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.y, self.w)
+ fn xwyw(self) -> Self {
+ Self::new(self.x, self.w, self.y, self.w)
}
#[inline]
- fn xwzx(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.z, self.x)
+ fn xwzx(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.x)
}
#[inline]
- fn xwzy(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.z, self.y)
+ fn xwzy(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.y)
}
#[inline]
- fn xwzz(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.z, self.z)
+ fn xwzz(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.z)
}
#[inline]
- fn xwzw(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.z, self.w)
+ fn xwzw(self) -> Self {
+ Self::new(self.x, self.w, self.z, self.w)
}
#[inline]
- fn xwwx(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.w, self.x)
+ fn xwwx(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.x)
}
#[inline]
- fn xwwy(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.w, self.y)
+ fn xwwy(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.y)
}
#[inline]
- fn xwwz(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.w, self.z)
+ fn xwwz(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.z)
}
#[inline]
- fn xwww(self) -> UVec4 {
- UVec4::new(self.x, self.w, self.w, self.w)
+ fn xwww(self) -> Self {
+ Self::new(self.x, self.w, self.w, self.w)
}
#[inline]
- fn yxxx(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.x, self.x)
+ fn yxxx(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.x)
}
#[inline]
- fn yxxy(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.x, self.y)
+ fn yxxy(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.y)
}
#[inline]
- fn yxxz(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.x, self.z)
+ fn yxxz(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.z)
}
#[inline]
- fn yxxw(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.x, self.w)
+ fn yxxw(self) -> Self {
+ Self::new(self.y, self.x, self.x, self.w)
}
#[inline]
- fn yxyx(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.y, self.x)
+ fn yxyx(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.x)
}
#[inline]
- fn yxyy(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.y, self.y)
+ fn yxyy(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.y)
}
#[inline]
- fn yxyz(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.y, self.z)
+ fn yxyz(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.z)
}
#[inline]
- fn yxyw(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.y, self.w)
+ fn yxyw(self) -> Self {
+ Self::new(self.y, self.x, self.y, self.w)
}
#[inline]
- fn yxzx(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.z, self.x)
+ fn yxzx(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.x)
}
#[inline]
- fn yxzy(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.z, self.y)
+ fn yxzy(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.y)
}
#[inline]
- fn yxzz(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.z, self.z)
+ fn yxzz(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.z)
}
#[inline]
- fn yxzw(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.z, self.w)
+ fn yxzw(self) -> Self {
+ Self::new(self.y, self.x, self.z, self.w)
}
#[inline]
- fn yxwx(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.w, self.x)
+ fn yxwx(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.x)
}
#[inline]
- fn yxwy(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.w, self.y)
+ fn yxwy(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.y)
}
#[inline]
- fn yxwz(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.w, self.z)
+ fn yxwz(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.z)
}
#[inline]
- fn yxww(self) -> UVec4 {
- UVec4::new(self.y, self.x, self.w, self.w)
+ fn yxww(self) -> Self {
+ Self::new(self.y, self.x, self.w, self.w)
}
#[inline]
- fn yyxx(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.x, self.x)
+ fn yyxx(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.x)
}
#[inline]
- fn yyxy(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.x, self.y)
+ fn yyxy(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.y)
}
#[inline]
- fn yyxz(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.x, self.z)
+ fn yyxz(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.z)
}
#[inline]
- fn yyxw(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.x, self.w)
+ fn yyxw(self) -> Self {
+ Self::new(self.y, self.y, self.x, self.w)
}
#[inline]
- fn yyyx(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.y, self.x)
+ fn yyyx(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.x)
}
#[inline]
- fn yyyy(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.y, self.y)
+ fn yyyy(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.y)
}
#[inline]
- fn yyyz(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.y, self.z)
+ fn yyyz(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.z)
}
#[inline]
- fn yyyw(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.y, self.w)
+ fn yyyw(self) -> Self {
+ Self::new(self.y, self.y, self.y, self.w)
}
#[inline]
- fn yyzx(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.z, self.x)
+ fn yyzx(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.x)
}
#[inline]
- fn yyzy(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.z, self.y)
+ fn yyzy(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.y)
}
#[inline]
- fn yyzz(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.z, self.z)
+ fn yyzz(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.z)
}
#[inline]
- fn yyzw(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.z, self.w)
+ fn yyzw(self) -> Self {
+ Self::new(self.y, self.y, self.z, self.w)
}
#[inline]
- fn yywx(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.w, self.x)
+ fn yywx(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.x)
}
#[inline]
- fn yywy(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.w, self.y)
+ fn yywy(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.y)
}
#[inline]
- fn yywz(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.w, self.z)
+ fn yywz(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.z)
}
#[inline]
- fn yyww(self) -> UVec4 {
- UVec4::new(self.y, self.y, self.w, self.w)
+ fn yyww(self) -> Self {
+ Self::new(self.y, self.y, self.w, self.w)
}
#[inline]
- fn yzxx(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.x, self.x)
+ fn yzxx(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.x)
}
#[inline]
- fn yzxy(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.x, self.y)
+ fn yzxy(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.y)
}
#[inline]
- fn yzxz(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.x, self.z)
+ fn yzxz(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.z)
}
#[inline]
- fn yzxw(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.x, self.w)
+ fn yzxw(self) -> Self {
+ Self::new(self.y, self.z, self.x, self.w)
}
#[inline]
- fn yzyx(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.y, self.x)
+ fn yzyx(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.x)
}
#[inline]
- fn yzyy(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.y, self.y)
+ fn yzyy(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.y)
}
#[inline]
- fn yzyz(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.y, self.z)
+ fn yzyz(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.z)
}
#[inline]
- fn yzyw(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.y, self.w)
+ fn yzyw(self) -> Self {
+ Self::new(self.y, self.z, self.y, self.w)
}
#[inline]
- fn yzzx(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.z, self.x)
+ fn yzzx(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.x)
}
#[inline]
- fn yzzy(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.z, self.y)
+ fn yzzy(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.y)
}
#[inline]
- fn yzzz(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.z, self.z)
+ fn yzzz(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.z)
}
#[inline]
- fn yzzw(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.z, self.w)
+ fn yzzw(self) -> Self {
+ Self::new(self.y, self.z, self.z, self.w)
}
#[inline]
- fn yzwx(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.w, self.x)
+ fn yzwx(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.x)
}
#[inline]
- fn yzwy(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.w, self.y)
+ fn yzwy(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.y)
}
#[inline]
- fn yzwz(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.w, self.z)
+ fn yzwz(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.z)
}
#[inline]
- fn yzww(self) -> UVec4 {
- UVec4::new(self.y, self.z, self.w, self.w)
+ fn yzww(self) -> Self {
+ Self::new(self.y, self.z, self.w, self.w)
}
#[inline]
- fn ywxx(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.x, self.x)
+ fn ywxx(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.x)
}
#[inline]
- fn ywxy(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.x, self.y)
+ fn ywxy(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.y)
}
#[inline]
- fn ywxz(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.x, self.z)
+ fn ywxz(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.z)
}
#[inline]
- fn ywxw(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.x, self.w)
+ fn ywxw(self) -> Self {
+ Self::new(self.y, self.w, self.x, self.w)
}
#[inline]
- fn ywyx(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.y, self.x)
+ fn ywyx(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.x)
}
#[inline]
- fn ywyy(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.y, self.y)
+ fn ywyy(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.y)
}
#[inline]
- fn ywyz(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.y, self.z)
+ fn ywyz(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.z)
}
#[inline]
- fn ywyw(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.y, self.w)
+ fn ywyw(self) -> Self {
+ Self::new(self.y, self.w, self.y, self.w)
}
#[inline]
- fn ywzx(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.z, self.x)
+ fn ywzx(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.x)
}
#[inline]
- fn ywzy(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.z, self.y)
+ fn ywzy(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.y)
}
#[inline]
- fn ywzz(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.z, self.z)
+ fn ywzz(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.z)
}
#[inline]
- fn ywzw(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.z, self.w)
+ fn ywzw(self) -> Self {
+ Self::new(self.y, self.w, self.z, self.w)
}
#[inline]
- fn ywwx(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.w, self.x)
+ fn ywwx(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.x)
}
#[inline]
- fn ywwy(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.w, self.y)
+ fn ywwy(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.y)
}
#[inline]
- fn ywwz(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.w, self.z)
+ fn ywwz(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.z)
}
#[inline]
- fn ywww(self) -> UVec4 {
- UVec4::new(self.y, self.w, self.w, self.w)
+ fn ywww(self) -> Self {
+ Self::new(self.y, self.w, self.w, self.w)
}
#[inline]
- fn zxxx(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.x, self.x)
+ fn zxxx(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.x)
}
#[inline]
- fn zxxy(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.x, self.y)
+ fn zxxy(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.y)
}
#[inline]
- fn zxxz(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.x, self.z)
+ fn zxxz(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.z)
}
#[inline]
- fn zxxw(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.x, self.w)
+ fn zxxw(self) -> Self {
+ Self::new(self.z, self.x, self.x, self.w)
}
#[inline]
- fn zxyx(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.y, self.x)
+ fn zxyx(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.x)
}
#[inline]
- fn zxyy(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.y, self.y)
+ fn zxyy(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.y)
}
#[inline]
- fn zxyz(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.y, self.z)
+ fn zxyz(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.z)
}
#[inline]
- fn zxyw(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.y, self.w)
+ fn zxyw(self) -> Self {
+ Self::new(self.z, self.x, self.y, self.w)
}
#[inline]
- fn zxzx(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.z, self.x)
+ fn zxzx(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.x)
}
#[inline]
- fn zxzy(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.z, self.y)
+ fn zxzy(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.y)
}
#[inline]
- fn zxzz(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.z, self.z)
+ fn zxzz(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.z)
}
#[inline]
- fn zxzw(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.z, self.w)
+ fn zxzw(self) -> Self {
+ Self::new(self.z, self.x, self.z, self.w)
}
#[inline]
- fn zxwx(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.w, self.x)
+ fn zxwx(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.x)
}
#[inline]
- fn zxwy(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.w, self.y)
+ fn zxwy(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.y)
}
#[inline]
- fn zxwz(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.w, self.z)
+ fn zxwz(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.z)
}
#[inline]
- fn zxww(self) -> UVec4 {
- UVec4::new(self.z, self.x, self.w, self.w)
+ fn zxww(self) -> Self {
+ Self::new(self.z, self.x, self.w, self.w)
}
#[inline]
- fn zyxx(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.x, self.x)
+ fn zyxx(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.x)
}
#[inline]
- fn zyxy(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.x, self.y)
+ fn zyxy(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.y)
}
#[inline]
- fn zyxz(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.x, self.z)
+ fn zyxz(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.z)
}
#[inline]
- fn zyxw(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.x, self.w)
+ fn zyxw(self) -> Self {
+ Self::new(self.z, self.y, self.x, self.w)
}
#[inline]
- fn zyyx(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.y, self.x)
+ fn zyyx(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.x)
}
#[inline]
- fn zyyy(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.y, self.y)
+ fn zyyy(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.y)
}
#[inline]
- fn zyyz(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.y, self.z)
+ fn zyyz(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.z)
}
#[inline]
- fn zyyw(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.y, self.w)
+ fn zyyw(self) -> Self {
+ Self::new(self.z, self.y, self.y, self.w)
}
#[inline]
- fn zyzx(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.z, self.x)
+ fn zyzx(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.x)
}
#[inline]
- fn zyzy(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.z, self.y)
+ fn zyzy(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.y)
}
#[inline]
- fn zyzz(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.z, self.z)
+ fn zyzz(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.z)
}
#[inline]
- fn zyzw(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.z, self.w)
+ fn zyzw(self) -> Self {
+ Self::new(self.z, self.y, self.z, self.w)
}
#[inline]
- fn zywx(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.w, self.x)
+ fn zywx(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.x)
}
#[inline]
- fn zywy(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.w, self.y)
+ fn zywy(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.y)
}
#[inline]
- fn zywz(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.w, self.z)
+ fn zywz(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.z)
}
#[inline]
- fn zyww(self) -> UVec4 {
- UVec4::new(self.z, self.y, self.w, self.w)
+ fn zyww(self) -> Self {
+ Self::new(self.z, self.y, self.w, self.w)
}
#[inline]
- fn zzxx(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.x, self.x)
+ fn zzxx(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.x)
}
#[inline]
- fn zzxy(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.x, self.y)
+ fn zzxy(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.y)
}
#[inline]
- fn zzxz(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.x, self.z)
+ fn zzxz(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.z)
}
#[inline]
- fn zzxw(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.x, self.w)
+ fn zzxw(self) -> Self {
+ Self::new(self.z, self.z, self.x, self.w)
}
#[inline]
- fn zzyx(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.y, self.x)
+ fn zzyx(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.x)
}
#[inline]
- fn zzyy(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.y, self.y)
+ fn zzyy(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.y)
}
#[inline]
- fn zzyz(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.y, self.z)
+ fn zzyz(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.z)
}
#[inline]
- fn zzyw(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.y, self.w)
+ fn zzyw(self) -> Self {
+ Self::new(self.z, self.z, self.y, self.w)
}
#[inline]
- fn zzzx(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.z, self.x)
+ fn zzzx(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.x)
}
#[inline]
- fn zzzy(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.z, self.y)
+ fn zzzy(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.y)
}
#[inline]
- fn zzzz(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.z, self.z)
+ fn zzzz(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.z)
}
#[inline]
- fn zzzw(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.z, self.w)
+ fn zzzw(self) -> Self {
+ Self::new(self.z, self.z, self.z, self.w)
}
#[inline]
- fn zzwx(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.w, self.x)
+ fn zzwx(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.x)
}
#[inline]
- fn zzwy(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.w, self.y)
+ fn zzwy(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.y)
}
#[inline]
- fn zzwz(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.w, self.z)
+ fn zzwz(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.z)
}
#[inline]
- fn zzww(self) -> UVec4 {
- UVec4::new(self.z, self.z, self.w, self.w)
+ fn zzww(self) -> Self {
+ Self::new(self.z, self.z, self.w, self.w)
}
#[inline]
- fn zwxx(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.x, self.x)
+ fn zwxx(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.x)
}
#[inline]
- fn zwxy(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.x, self.y)
+ fn zwxy(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.y)
}
#[inline]
- fn zwxz(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.x, self.z)
+ fn zwxz(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.z)
}
#[inline]
- fn zwxw(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.x, self.w)
+ fn zwxw(self) -> Self {
+ Self::new(self.z, self.w, self.x, self.w)
}
#[inline]
- fn zwyx(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.y, self.x)
+ fn zwyx(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.x)
}
#[inline]
- fn zwyy(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.y, self.y)
+ fn zwyy(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.y)
}
#[inline]
- fn zwyz(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.y, self.z)
+ fn zwyz(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.z)
}
#[inline]
- fn zwyw(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.y, self.w)
+ fn zwyw(self) -> Self {
+ Self::new(self.z, self.w, self.y, self.w)
}
#[inline]
- fn zwzx(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.z, self.x)
+ fn zwzx(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.x)
}
#[inline]
- fn zwzy(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.z, self.y)
+ fn zwzy(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.y)
}
#[inline]
- fn zwzz(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.z, self.z)
+ fn zwzz(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.z)
}
#[inline]
- fn zwzw(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.z, self.w)
+ fn zwzw(self) -> Self {
+ Self::new(self.z, self.w, self.z, self.w)
}
#[inline]
- fn zwwx(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.w, self.x)
+ fn zwwx(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.x)
}
#[inline]
- fn zwwy(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.w, self.y)
+ fn zwwy(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.y)
}
#[inline]
- fn zwwz(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.w, self.z)
+ fn zwwz(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.z)
}
#[inline]
- fn zwww(self) -> UVec4 {
- UVec4::new(self.z, self.w, self.w, self.w)
+ fn zwww(self) -> Self {
+ Self::new(self.z, self.w, self.w, self.w)
}
#[inline]
- fn wxxx(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.x, self.x)
+ fn wxxx(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.x)
}
#[inline]
- fn wxxy(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.x, self.y)
+ fn wxxy(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.y)
}
#[inline]
- fn wxxz(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.x, self.z)
+ fn wxxz(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.z)
}
#[inline]
- fn wxxw(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.x, self.w)
+ fn wxxw(self) -> Self {
+ Self::new(self.w, self.x, self.x, self.w)
}
#[inline]
- fn wxyx(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.y, self.x)
+ fn wxyx(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.x)
}
#[inline]
- fn wxyy(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.y, self.y)
+ fn wxyy(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.y)
}
#[inline]
- fn wxyz(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.y, self.z)
+ fn wxyz(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.z)
}
#[inline]
- fn wxyw(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.y, self.w)
+ fn wxyw(self) -> Self {
+ Self::new(self.w, self.x, self.y, self.w)
}
#[inline]
- fn wxzx(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.z, self.x)
+ fn wxzx(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.x)
}
#[inline]
- fn wxzy(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.z, self.y)
+ fn wxzy(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.y)
}
#[inline]
- fn wxzz(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.z, self.z)
+ fn wxzz(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.z)
}
#[inline]
- fn wxzw(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.z, self.w)
+ fn wxzw(self) -> Self {
+ Self::new(self.w, self.x, self.z, self.w)
}
#[inline]
- fn wxwx(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.w, self.x)
+ fn wxwx(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.x)
}
#[inline]
- fn wxwy(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.w, self.y)
+ fn wxwy(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.y)
}
#[inline]
- fn wxwz(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.w, self.z)
+ fn wxwz(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.z)
}
#[inline]
- fn wxww(self) -> UVec4 {
- UVec4::new(self.w, self.x, self.w, self.w)
+ fn wxww(self) -> Self {
+ Self::new(self.w, self.x, self.w, self.w)
}
#[inline]
- fn wyxx(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.x, self.x)
+ fn wyxx(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.x)
}
#[inline]
- fn wyxy(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.x, self.y)
+ fn wyxy(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.y)
}
#[inline]
- fn wyxz(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.x, self.z)
+ fn wyxz(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.z)
}
#[inline]
- fn wyxw(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.x, self.w)
+ fn wyxw(self) -> Self {
+ Self::new(self.w, self.y, self.x, self.w)
}
#[inline]
- fn wyyx(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.y, self.x)
+ fn wyyx(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.x)
}
#[inline]
- fn wyyy(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.y, self.y)
+ fn wyyy(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.y)
}
#[inline]
- fn wyyz(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.y, self.z)
+ fn wyyz(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.z)
}
#[inline]
- fn wyyw(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.y, self.w)
+ fn wyyw(self) -> Self {
+ Self::new(self.w, self.y, self.y, self.w)
}
#[inline]
- fn wyzx(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.z, self.x)
+ fn wyzx(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.x)
}
#[inline]
- fn wyzy(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.z, self.y)
+ fn wyzy(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.y)
}
#[inline]
- fn wyzz(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.z, self.z)
+ fn wyzz(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.z)
}
#[inline]
- fn wyzw(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.z, self.w)
+ fn wyzw(self) -> Self {
+ Self::new(self.w, self.y, self.z, self.w)
}
#[inline]
- fn wywx(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.w, self.x)
+ fn wywx(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.x)
}
#[inline]
- fn wywy(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.w, self.y)
+ fn wywy(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.y)
}
#[inline]
- fn wywz(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.w, self.z)
+ fn wywz(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.z)
}
#[inline]
- fn wyww(self) -> UVec4 {
- UVec4::new(self.w, self.y, self.w, self.w)
+ fn wyww(self) -> Self {
+ Self::new(self.w, self.y, self.w, self.w)
}
#[inline]
- fn wzxx(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.x, self.x)
+ fn wzxx(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.x)
}
#[inline]
- fn wzxy(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.x, self.y)
+ fn wzxy(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.y)
}
#[inline]
- fn wzxz(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.x, self.z)
+ fn wzxz(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.z)
}
#[inline]
- fn wzxw(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.x, self.w)
+ fn wzxw(self) -> Self {
+ Self::new(self.w, self.z, self.x, self.w)
}
#[inline]
- fn wzyx(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.y, self.x)
+ fn wzyx(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.x)
}
#[inline]
- fn wzyy(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.y, self.y)
+ fn wzyy(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.y)
}
#[inline]
- fn wzyz(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.y, self.z)
+ fn wzyz(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.z)
}
#[inline]
- fn wzyw(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.y, self.w)
+ fn wzyw(self) -> Self {
+ Self::new(self.w, self.z, self.y, self.w)
}
#[inline]
- fn wzzx(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.z, self.x)
+ fn wzzx(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.x)
}
#[inline]
- fn wzzy(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.z, self.y)
+ fn wzzy(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.y)
}
#[inline]
- fn wzzz(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.z, self.z)
+ fn wzzz(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.z)
}
#[inline]
- fn wzzw(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.z, self.w)
+ fn wzzw(self) -> Self {
+ Self::new(self.w, self.z, self.z, self.w)
}
#[inline]
- fn wzwx(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.w, self.x)
+ fn wzwx(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.x)
}
#[inline]
- fn wzwy(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.w, self.y)
+ fn wzwy(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.y)
}
#[inline]
- fn wzwz(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.w, self.z)
+ fn wzwz(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.z)
}
#[inline]
- fn wzww(self) -> UVec4 {
- UVec4::new(self.w, self.z, self.w, self.w)
+ fn wzww(self) -> Self {
+ Self::new(self.w, self.z, self.w, self.w)
}
#[inline]
- fn wwxx(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.x, self.x)
+ fn wwxx(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.x)
}
#[inline]
- fn wwxy(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.x, self.y)
+ fn wwxy(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.y)
}
#[inline]
- fn wwxz(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.x, self.z)
+ fn wwxz(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.z)
}
#[inline]
- fn wwxw(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.x, self.w)
+ fn wwxw(self) -> Self {
+ Self::new(self.w, self.w, self.x, self.w)
}
#[inline]
- fn wwyx(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.y, self.x)
+ fn wwyx(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.x)
}
#[inline]
- fn wwyy(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.y, self.y)
+ fn wwyy(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.y)
}
#[inline]
- fn wwyz(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.y, self.z)
+ fn wwyz(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.z)
}
#[inline]
- fn wwyw(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.y, self.w)
+ fn wwyw(self) -> Self {
+ Self::new(self.w, self.w, self.y, self.w)
}
#[inline]
- fn wwzx(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.z, self.x)
+ fn wwzx(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.x)
}
#[inline]
- fn wwzy(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.z, self.y)
+ fn wwzy(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.y)
}
#[inline]
- fn wwzz(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.z, self.z)
+ fn wwzz(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.z)
}
#[inline]
- fn wwzw(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.z, self.w)
+ fn wwzw(self) -> Self {
+ Self::new(self.w, self.w, self.z, self.w)
}
#[inline]
- fn wwwx(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.w, self.x)
+ fn wwwx(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.x)
}
#[inline]
- fn wwwy(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.w, self.y)
+ fn wwwy(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.y)
}
#[inline]
- fn wwwz(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.w, self.z)
+ fn wwwz(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.z)
}
#[inline]
- fn wwww(self) -> UVec4 {
- UVec4::new(self.w, self.w, self.w, self.w)
+ fn wwww(self) -> Self {
+ Self::new(self.w, self.w, self.w, self.w)
}
}
diff --git a/crates/glam/src/swizzles/vec2_impl.rs b/crates/glam/src/swizzles/vec2_impl.rs
index 6cb9e47..912fa77 100644
--- a/crates/glam/src/swizzles/vec2_impl.rs
+++ b/crates/glam/src/swizzles/vec2_impl.rs
@@ -8,24 +8,24 @@
type Vec4 = Vec4;
#[inline]
- fn xx(self) -> Vec2 {
- Vec2 {
+ fn xx(self) -> Self {
+ Self {
x: self.x,
y: self.x,
}
}
#[inline]
- fn yx(self) -> Vec2 {
- Vec2 {
+ fn yx(self) -> Self {
+ Self {
x: self.y,
y: self.x,
}
}
#[inline]
- fn yy(self) -> Vec2 {
- Vec2 {
+ fn yy(self) -> Self {
+ Self {
x: self.y,
y: self.y,
}
diff --git a/crates/glam/src/swizzles/vec3_impl.rs b/crates/glam/src/swizzles/vec3_impl.rs
index 0a5988c..fc20efe 100644
--- a/crates/glam/src/swizzles/vec3_impl.rs
+++ b/crates/glam/src/swizzles/vec3_impl.rs
@@ -110,133 +110,133 @@
}
#[inline]
- fn xxx(self) -> Vec3 {
- Vec3::new(self.x, self.x, self.x)
+ fn xxx(self) -> Self {
+ Self::new(self.x, self.x, self.x)
}
#[inline]
- fn xxy(self) -> Vec3 {
- Vec3::new(self.x, self.x, self.y)
+ fn xxy(self) -> Self {
+ Self::new(self.x, self.x, self.y)
}
#[inline]
- fn xxz(self) -> Vec3 {
- Vec3::new(self.x, self.x, self.z)
+ fn xxz(self) -> Self {
+ Self::new(self.x, self.x, self.z)
}
#[inline]
- fn xyx(self) -> Vec3 {
- Vec3::new(self.x, self.y, self.x)
+ fn xyx(self) -> Self {
+ Self::new(self.x, self.y, self.x)
}
#[inline]
- fn xyy(self) -> Vec3 {
- Vec3::new(self.x, self.y, self.y)
+ fn xyy(self) -> Self {
+ Self::new(self.x, self.y, self.y)
}
#[inline]
- fn xzx(self) -> Vec3 {
- Vec3::new(self.x, self.z, self.x)
+ fn xzx(self) -> Self {
+ Self::new(self.x, self.z, self.x)
}
#[inline]
- fn xzy(self) -> Vec3 {
- Vec3::new(self.x, self.z, self.y)
+ fn xzy(self) -> Self {
+ Self::new(self.x, self.z, self.y)
}
#[inline]
- fn xzz(self) -> Vec3 {
- Vec3::new(self.x, self.z, self.z)
+ fn xzz(self) -> Self {
+ Self::new(self.x, self.z, self.z)
}
#[inline]
- fn yxx(self) -> Vec3 {
- Vec3::new(self.y, self.x, self.x)
+ fn yxx(self) -> Self {
+ Self::new(self.y, self.x, self.x)
}
#[inline]
- fn yxy(self) -> Vec3 {
- Vec3::new(self.y, self.x, self.y)
+ fn yxy(self) -> Self {
+ Self::new(self.y, self.x, self.y)
}
#[inline]
- fn yxz(self) -> Vec3 {
- Vec3::new(self.y, self.x, self.z)
+ fn yxz(self) -> Self {
+ Self::new(self.y, self.x, self.z)
}
#[inline]
- fn yyx(self) -> Vec3 {
- Vec3::new(self.y, self.y, self.x)
+ fn yyx(self) -> Self {
+ Self::new(self.y, self.y, self.x)
}
#[inline]
- fn yyy(self) -> Vec3 {
- Vec3::new(self.y, self.y, self.y)
+ fn yyy(self) -> Self {
+ Self::new(self.y, self.y, self.y)
}
#[inline]
- fn yyz(self) -> Vec3 {
- Vec3::new(self.y, self.y, self.z)
+ fn yyz(self) -> Self {
+ Self::new(self.y, self.y, self.z)
}
#[inline]
- fn yzx(self) -> Vec3 {
- Vec3::new(self.y, self.z, self.x)
+ fn yzx(self) -> Self {
+ Self::new(self.y, self.z, self.x)
}
#[inline]
- fn yzy(self) -> Vec3 {
- Vec3::new(self.y, self.z, self.y)
+ fn yzy(self) -> Self {
+ Self::new(self.y, self.z, self.y)
}
#[inline]
- fn yzz(self) -> Vec3 {
- Vec3::new(self.y, self.z, self.z)
+ fn yzz(self) -> Self {
+ Self::new(self.y, self.z, self.z)
}
#[inline]
- fn zxx(self) -> Vec3 {
- Vec3::new(self.z, self.x, self.x)
+ fn zxx(self) -> Self {
+ Self::new(self.z, self.x, self.x)
}
#[inline]
- fn zxy(self) -> Vec3 {
- Vec3::new(self.z, self.x, self.y)
+ fn zxy(self) -> Self {
+ Self::new(self.z, self.x, self.y)
}
#[inline]
- fn zxz(self) -> Vec3 {
- Vec3::new(self.z, self.x, self.z)
+ fn zxz(self) -> Self {
+ Self::new(self.z, self.x, self.z)
}
#[inline]
- fn zyx(self) -> Vec3 {
- Vec3::new(self.z, self.y, self.x)
+ fn zyx(self) -> Self {
+ Self::new(self.z, self.y, self.x)
}
#[inline]
- fn zyy(self) -> Vec3 {
- Vec3::new(self.z, self.y, self.y)
+ fn zyy(self) -> Self {
+ Self::new(self.z, self.y, self.y)
}
#[inline]
- fn zyz(self) -> Vec3 {
- Vec3::new(self.z, self.y, self.z)
+ fn zyz(self) -> Self {
+ Self::new(self.z, self.y, self.z)
}
#[inline]
- fn zzx(self) -> Vec3 {
- Vec3::new(self.z, self.z, self.x)
+ fn zzx(self) -> Self {
+ Self::new(self.z, self.z, self.x)
}
#[inline]
- fn zzy(self) -> Vec3 {
- Vec3::new(self.z, self.z, self.y)
+ fn zzy(self) -> Self {
+ Self::new(self.z, self.z, self.y)
}
#[inline]
- fn zzz(self) -> Vec3 {
- Vec3::new(self.z, self.z, self.z)
+ fn zzz(self) -> Self {
+ Self::new(self.z, self.z, self.z)
}
#[inline]
diff --git a/crates/glam/src/swizzles/wasm32/vec3a_impl.rs b/crates/glam/src/swizzles/wasm32/vec3a_impl.rs
index b029459..fd33f44 100644
--- a/crates/glam/src/swizzles/wasm32/vec3a_impl.rs
+++ b/crates/glam/src/swizzles/wasm32/vec3a_impl.rs
@@ -114,133 +114,133 @@
}
#[inline]
- fn xxx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<0, 0, 4, 4>(self.0, self.0).into())
+ fn xxx(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn xxy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<0, 0, 5, 4>(self.0, self.0).into())
+ fn xxy(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn xxz(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<0, 0, 6, 4>(self.0, self.0).into())
+ fn xxz(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 6, 4>(self.0, self.0).into())
}
#[inline]
- fn xyx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<0, 1, 4, 4>(self.0, self.0).into())
+ fn xyx(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn xyy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<0, 1, 5, 4>(self.0, self.0).into())
+ fn xyy(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn xzx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<0, 2, 4, 4>(self.0, self.0).into())
+ fn xzx(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn xzy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<0, 2, 5, 4>(self.0, self.0).into())
+ fn xzy(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn xzz(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<0, 2, 6, 4>(self.0, self.0).into())
+ fn xzz(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 6, 4>(self.0, self.0).into())
}
#[inline]
- fn yxx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 0, 4, 4>(self.0, self.0).into())
+ fn yxx(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn yxy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 0, 5, 4>(self.0, self.0).into())
+ fn yxy(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn yxz(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 0, 6, 4>(self.0, self.0).into())
+ fn yxz(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 6, 4>(self.0, self.0).into())
}
#[inline]
- fn yyx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 1, 4, 4>(self.0, self.0).into())
+ fn yyx(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn yyy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 1, 5, 4>(self.0, self.0).into())
+ fn yyy(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn yyz(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 1, 6, 4>(self.0, self.0).into())
+ fn yyz(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 6, 4>(self.0, self.0).into())
}
#[inline]
- fn yzx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 2, 4, 4>(self.0, self.0).into())
+ fn yzx(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn yzy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 2, 5, 4>(self.0, self.0).into())
+ fn yzy(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn yzz(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<1, 2, 6, 4>(self.0, self.0).into())
+ fn yzz(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 6, 4>(self.0, self.0).into())
}
#[inline]
- fn zxx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 0, 4, 4>(self.0, self.0).into())
+ fn zxx(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn zxy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 0, 5, 4>(self.0, self.0).into())
+ fn zxy(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn zxz(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 0, 6, 4>(self.0, self.0).into())
+ fn zxz(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 6, 4>(self.0, self.0).into())
}
#[inline]
- fn zyx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 1, 4, 4>(self.0, self.0).into())
+ fn zyx(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn zyy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 1, 5, 4>(self.0, self.0).into())
+ fn zyy(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn zyz(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 1, 6, 4>(self.0, self.0).into())
+ fn zyz(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 6, 4>(self.0, self.0).into())
}
#[inline]
- fn zzx(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 2, 4, 4>(self.0, self.0).into())
+ fn zzx(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 4, 4>(self.0, self.0).into())
}
#[inline]
- fn zzy(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 2, 5, 4>(self.0, self.0).into())
+ fn zzy(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 5, 4>(self.0, self.0).into())
}
#[inline]
- fn zzz(self) -> Vec3A {
- Vec3A(i32x4_shuffle::<2, 2, 6, 4>(self.0, self.0).into())
+ fn zzz(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 6, 4>(self.0, self.0).into())
}
#[inline]
diff --git a/crates/glam/src/swizzles/wasm32/vec4_impl.rs b/crates/glam/src/swizzles/wasm32/vec4_impl.rs
index 9948a8d..9377e1e 100644
--- a/crates/glam/src/swizzles/wasm32/vec4_impl.rs
+++ b/crates/glam/src/swizzles/wasm32/vec4_impl.rs
@@ -640,1277 +640,1277 @@
}
#[inline]
- fn xxxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 4, 4>(self.0, self.0))
+ fn xxxx(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 4, 4>(self.0, self.0))
}
#[inline]
- fn xxxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 4, 5>(self.0, self.0))
+ fn xxxy(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 4, 5>(self.0, self.0))
}
#[inline]
- fn xxxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 4, 6>(self.0, self.0))
+ fn xxxz(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 4, 6>(self.0, self.0))
}
#[inline]
- fn xxxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 4, 7>(self.0, self.0))
+ fn xxxw(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 4, 7>(self.0, self.0))
}
#[inline]
- fn xxyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 5, 4>(self.0, self.0))
+ fn xxyx(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 5, 4>(self.0, self.0))
}
#[inline]
- fn xxyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 5, 5>(self.0, self.0))
+ fn xxyy(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 5, 5>(self.0, self.0))
}
#[inline]
- fn xxyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 5, 6>(self.0, self.0))
+ fn xxyz(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 5, 6>(self.0, self.0))
}
#[inline]
- fn xxyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 5, 7>(self.0, self.0))
+ fn xxyw(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 5, 7>(self.0, self.0))
}
#[inline]
- fn xxzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 6, 4>(self.0, self.0))
+ fn xxzx(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 6, 4>(self.0, self.0))
}
#[inline]
- fn xxzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 6, 5>(self.0, self.0))
+ fn xxzy(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 6, 5>(self.0, self.0))
}
#[inline]
- fn xxzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 6, 6>(self.0, self.0))
+ fn xxzz(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 6, 6>(self.0, self.0))
}
#[inline]
- fn xxzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 6, 7>(self.0, self.0))
+ fn xxzw(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 6, 7>(self.0, self.0))
}
#[inline]
- fn xxwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 7, 4>(self.0, self.0))
+ fn xxwx(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 7, 4>(self.0, self.0))
}
#[inline]
- fn xxwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 7, 5>(self.0, self.0))
+ fn xxwy(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 7, 5>(self.0, self.0))
}
#[inline]
- fn xxwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 7, 6>(self.0, self.0))
+ fn xxwz(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 7, 6>(self.0, self.0))
}
#[inline]
- fn xxww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 0, 7, 7>(self.0, self.0))
+ fn xxww(self) -> Self {
+ Self(i32x4_shuffle::<0, 0, 7, 7>(self.0, self.0))
}
#[inline]
- fn xyxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 4, 4>(self.0, self.0))
+ fn xyxx(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 4, 4>(self.0, self.0))
}
#[inline]
- fn xyxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 4, 5>(self.0, self.0))
+ fn xyxy(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 4, 5>(self.0, self.0))
}
#[inline]
- fn xyxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 4, 6>(self.0, self.0))
+ fn xyxz(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 4, 6>(self.0, self.0))
}
#[inline]
- fn xyxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 4, 7>(self.0, self.0))
+ fn xyxw(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 4, 7>(self.0, self.0))
}
#[inline]
- fn xyyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 5, 4>(self.0, self.0))
+ fn xyyx(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 5, 4>(self.0, self.0))
}
#[inline]
- fn xyyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 5, 5>(self.0, self.0))
+ fn xyyy(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 5, 5>(self.0, self.0))
}
#[inline]
- fn xyyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 5, 6>(self.0, self.0))
+ fn xyyz(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 5, 6>(self.0, self.0))
}
#[inline]
- fn xyyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 5, 7>(self.0, self.0))
+ fn xyyw(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 5, 7>(self.0, self.0))
}
#[inline]
- fn xyzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 6, 4>(self.0, self.0))
+ fn xyzx(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 6, 4>(self.0, self.0))
}
#[inline]
- fn xyzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 6, 5>(self.0, self.0))
+ fn xyzy(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 6, 5>(self.0, self.0))
}
#[inline]
- fn xyzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 6, 6>(self.0, self.0))
+ fn xyzz(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 6, 6>(self.0, self.0))
}
#[inline]
- fn xywx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 7, 4>(self.0, self.0))
+ fn xywx(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 7, 4>(self.0, self.0))
}
#[inline]
- fn xywy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 7, 5>(self.0, self.0))
+ fn xywy(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 7, 5>(self.0, self.0))
}
#[inline]
- fn xywz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 7, 6>(self.0, self.0))
+ fn xywz(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 7, 6>(self.0, self.0))
}
#[inline]
- fn xyww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 1, 7, 7>(self.0, self.0))
+ fn xyww(self) -> Self {
+ Self(i32x4_shuffle::<0, 1, 7, 7>(self.0, self.0))
}
#[inline]
- fn xzxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 4, 4>(self.0, self.0))
+ fn xzxx(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 4, 4>(self.0, self.0))
}
#[inline]
- fn xzxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 4, 5>(self.0, self.0))
+ fn xzxy(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 4, 5>(self.0, self.0))
}
#[inline]
- fn xzxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 4, 6>(self.0, self.0))
+ fn xzxz(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 4, 6>(self.0, self.0))
}
#[inline]
- fn xzxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 4, 7>(self.0, self.0))
+ fn xzxw(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 4, 7>(self.0, self.0))
}
#[inline]
- fn xzyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 5, 4>(self.0, self.0))
+ fn xzyx(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 5, 4>(self.0, self.0))
}
#[inline]
- fn xzyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 5, 5>(self.0, self.0))
+ fn xzyy(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 5, 5>(self.0, self.0))
}
#[inline]
- fn xzyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 5, 6>(self.0, self.0))
+ fn xzyz(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 5, 6>(self.0, self.0))
}
#[inline]
- fn xzyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 5, 7>(self.0, self.0))
+ fn xzyw(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 5, 7>(self.0, self.0))
}
#[inline]
- fn xzzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 6, 4>(self.0, self.0))
+ fn xzzx(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 6, 4>(self.0, self.0))
}
#[inline]
- fn xzzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 6, 5>(self.0, self.0))
+ fn xzzy(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 6, 5>(self.0, self.0))
}
#[inline]
- fn xzzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 6, 6>(self.0, self.0))
+ fn xzzz(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 6, 6>(self.0, self.0))
}
#[inline]
- fn xzzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 6, 7>(self.0, self.0))
+ fn xzzw(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 6, 7>(self.0, self.0))
}
#[inline]
- fn xzwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 7, 4>(self.0, self.0))
+ fn xzwx(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 7, 4>(self.0, self.0))
}
#[inline]
- fn xzwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 7, 5>(self.0, self.0))
+ fn xzwy(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 7, 5>(self.0, self.0))
}
#[inline]
- fn xzwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 7, 6>(self.0, self.0))
+ fn xzwz(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 7, 6>(self.0, self.0))
}
#[inline]
- fn xzww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 2, 7, 7>(self.0, self.0))
+ fn xzww(self) -> Self {
+ Self(i32x4_shuffle::<0, 2, 7, 7>(self.0, self.0))
}
#[inline]
- fn xwxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 4, 4>(self.0, self.0))
+ fn xwxx(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 4, 4>(self.0, self.0))
}
#[inline]
- fn xwxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 4, 5>(self.0, self.0))
+ fn xwxy(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 4, 5>(self.0, self.0))
}
#[inline]
- fn xwxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 4, 6>(self.0, self.0))
+ fn xwxz(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 4, 6>(self.0, self.0))
}
#[inline]
- fn xwxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 4, 7>(self.0, self.0))
+ fn xwxw(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 4, 7>(self.0, self.0))
}
#[inline]
- fn xwyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 5, 4>(self.0, self.0))
+ fn xwyx(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 5, 4>(self.0, self.0))
}
#[inline]
- fn xwyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 5, 5>(self.0, self.0))
+ fn xwyy(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 5, 5>(self.0, self.0))
}
#[inline]
- fn xwyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 5, 6>(self.0, self.0))
+ fn xwyz(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 5, 6>(self.0, self.0))
}
#[inline]
- fn xwyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 5, 7>(self.0, self.0))
+ fn xwyw(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 5, 7>(self.0, self.0))
}
#[inline]
- fn xwzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 6, 4>(self.0, self.0))
+ fn xwzx(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 6, 4>(self.0, self.0))
}
#[inline]
- fn xwzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 6, 5>(self.0, self.0))
+ fn xwzy(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 6, 5>(self.0, self.0))
}
#[inline]
- fn xwzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 6, 6>(self.0, self.0))
+ fn xwzz(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 6, 6>(self.0, self.0))
}
#[inline]
- fn xwzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 6, 7>(self.0, self.0))
+ fn xwzw(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 6, 7>(self.0, self.0))
}
#[inline]
- fn xwwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 7, 4>(self.0, self.0))
+ fn xwwx(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 7, 4>(self.0, self.0))
}
#[inline]
- fn xwwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 7, 5>(self.0, self.0))
+ fn xwwy(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 7, 5>(self.0, self.0))
}
#[inline]
- fn xwwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 7, 6>(self.0, self.0))
+ fn xwwz(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 7, 6>(self.0, self.0))
}
#[inline]
- fn xwww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<0, 3, 7, 7>(self.0, self.0))
+ fn xwww(self) -> Self {
+ Self(i32x4_shuffle::<0, 3, 7, 7>(self.0, self.0))
}
#[inline]
- fn yxxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 4, 4>(self.0, self.0))
+ fn yxxx(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 4, 4>(self.0, self.0))
}
#[inline]
- fn yxxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 4, 5>(self.0, self.0))
+ fn yxxy(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 4, 5>(self.0, self.0))
}
#[inline]
- fn yxxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 4, 6>(self.0, self.0))
+ fn yxxz(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 4, 6>(self.0, self.0))
}
#[inline]
- fn yxxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 4, 7>(self.0, self.0))
+ fn yxxw(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 4, 7>(self.0, self.0))
}
#[inline]
- fn yxyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 5, 4>(self.0, self.0))
+ fn yxyx(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 5, 4>(self.0, self.0))
}
#[inline]
- fn yxyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 5, 5>(self.0, self.0))
+ fn yxyy(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 5, 5>(self.0, self.0))
}
#[inline]
- fn yxyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 5, 6>(self.0, self.0))
+ fn yxyz(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 5, 6>(self.0, self.0))
}
#[inline]
- fn yxyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 5, 7>(self.0, self.0))
+ fn yxyw(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 5, 7>(self.0, self.0))
}
#[inline]
- fn yxzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 6, 4>(self.0, self.0))
+ fn yxzx(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 6, 4>(self.0, self.0))
}
#[inline]
- fn yxzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 6, 5>(self.0, self.0))
+ fn yxzy(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 6, 5>(self.0, self.0))
}
#[inline]
- fn yxzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 6, 6>(self.0, self.0))
+ fn yxzz(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 6, 6>(self.0, self.0))
}
#[inline]
- fn yxzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 6, 7>(self.0, self.0))
+ fn yxzw(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 6, 7>(self.0, self.0))
}
#[inline]
- fn yxwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 7, 4>(self.0, self.0))
+ fn yxwx(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 7, 4>(self.0, self.0))
}
#[inline]
- fn yxwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 7, 5>(self.0, self.0))
+ fn yxwy(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 7, 5>(self.0, self.0))
}
#[inline]
- fn yxwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 7, 6>(self.0, self.0))
+ fn yxwz(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 7, 6>(self.0, self.0))
}
#[inline]
- fn yxww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 0, 7, 7>(self.0, self.0))
+ fn yxww(self) -> Self {
+ Self(i32x4_shuffle::<1, 0, 7, 7>(self.0, self.0))
}
#[inline]
- fn yyxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 4, 4>(self.0, self.0))
+ fn yyxx(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 4, 4>(self.0, self.0))
}
#[inline]
- fn yyxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 4, 5>(self.0, self.0))
+ fn yyxy(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 4, 5>(self.0, self.0))
}
#[inline]
- fn yyxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 4, 6>(self.0, self.0))
+ fn yyxz(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 4, 6>(self.0, self.0))
}
#[inline]
- fn yyxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 4, 7>(self.0, self.0))
+ fn yyxw(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 4, 7>(self.0, self.0))
}
#[inline]
- fn yyyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 5, 4>(self.0, self.0))
+ fn yyyx(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 5, 4>(self.0, self.0))
}
#[inline]
- fn yyyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 5, 5>(self.0, self.0))
+ fn yyyy(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 5, 5>(self.0, self.0))
}
#[inline]
- fn yyyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 5, 6>(self.0, self.0))
+ fn yyyz(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 5, 6>(self.0, self.0))
}
#[inline]
- fn yyyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 5, 7>(self.0, self.0))
+ fn yyyw(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 5, 7>(self.0, self.0))
}
#[inline]
- fn yyzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 6, 4>(self.0, self.0))
+ fn yyzx(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 6, 4>(self.0, self.0))
}
#[inline]
- fn yyzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 6, 5>(self.0, self.0))
+ fn yyzy(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 6, 5>(self.0, self.0))
}
#[inline]
- fn yyzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 6, 6>(self.0, self.0))
+ fn yyzz(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 6, 6>(self.0, self.0))
}
#[inline]
- fn yyzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 6, 7>(self.0, self.0))
+ fn yyzw(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 6, 7>(self.0, self.0))
}
#[inline]
- fn yywx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 7, 4>(self.0, self.0))
+ fn yywx(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 7, 4>(self.0, self.0))
}
#[inline]
- fn yywy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 7, 5>(self.0, self.0))
+ fn yywy(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 7, 5>(self.0, self.0))
}
#[inline]
- fn yywz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 7, 6>(self.0, self.0))
+ fn yywz(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 7, 6>(self.0, self.0))
}
#[inline]
- fn yyww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 1, 7, 7>(self.0, self.0))
+ fn yyww(self) -> Self {
+ Self(i32x4_shuffle::<1, 1, 7, 7>(self.0, self.0))
}
#[inline]
- fn yzxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 4, 4>(self.0, self.0))
+ fn yzxx(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 4, 4>(self.0, self.0))
}
#[inline]
- fn yzxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 4, 5>(self.0, self.0))
+ fn yzxy(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 4, 5>(self.0, self.0))
}
#[inline]
- fn yzxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 4, 6>(self.0, self.0))
+ fn yzxz(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 4, 6>(self.0, self.0))
}
#[inline]
- fn yzxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 4, 7>(self.0, self.0))
+ fn yzxw(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 4, 7>(self.0, self.0))
}
#[inline]
- fn yzyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 5, 4>(self.0, self.0))
+ fn yzyx(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 5, 4>(self.0, self.0))
}
#[inline]
- fn yzyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 5, 5>(self.0, self.0))
+ fn yzyy(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 5, 5>(self.0, self.0))
}
#[inline]
- fn yzyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 5, 6>(self.0, self.0))
+ fn yzyz(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 5, 6>(self.0, self.0))
}
#[inline]
- fn yzyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 5, 7>(self.0, self.0))
+ fn yzyw(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 5, 7>(self.0, self.0))
}
#[inline]
- fn yzzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 6, 4>(self.0, self.0))
+ fn yzzx(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 6, 4>(self.0, self.0))
}
#[inline]
- fn yzzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 6, 5>(self.0, self.0))
+ fn yzzy(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 6, 5>(self.0, self.0))
}
#[inline]
- fn yzzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 6, 6>(self.0, self.0))
+ fn yzzz(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 6, 6>(self.0, self.0))
}
#[inline]
- fn yzzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 6, 7>(self.0, self.0))
+ fn yzzw(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 6, 7>(self.0, self.0))
}
#[inline]
- fn yzwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 7, 4>(self.0, self.0))
+ fn yzwx(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 7, 4>(self.0, self.0))
}
#[inline]
- fn yzwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 7, 5>(self.0, self.0))
+ fn yzwy(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 7, 5>(self.0, self.0))
}
#[inline]
- fn yzwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 7, 6>(self.0, self.0))
+ fn yzwz(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 7, 6>(self.0, self.0))
}
#[inline]
- fn yzww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 2, 7, 7>(self.0, self.0))
+ fn yzww(self) -> Self {
+ Self(i32x4_shuffle::<1, 2, 7, 7>(self.0, self.0))
}
#[inline]
- fn ywxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 4, 4>(self.0, self.0))
+ fn ywxx(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 4, 4>(self.0, self.0))
}
#[inline]
- fn ywxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 4, 5>(self.0, self.0))
+ fn ywxy(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 4, 5>(self.0, self.0))
}
#[inline]
- fn ywxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 4, 6>(self.0, self.0))
+ fn ywxz(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 4, 6>(self.0, self.0))
}
#[inline]
- fn ywxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 4, 7>(self.0, self.0))
+ fn ywxw(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 4, 7>(self.0, self.0))
}
#[inline]
- fn ywyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 5, 4>(self.0, self.0))
+ fn ywyx(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 5, 4>(self.0, self.0))
}
#[inline]
- fn ywyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 5, 5>(self.0, self.0))
+ fn ywyy(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 5, 5>(self.0, self.0))
}
#[inline]
- fn ywyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 5, 6>(self.0, self.0))
+ fn ywyz(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 5, 6>(self.0, self.0))
}
#[inline]
- fn ywyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 5, 7>(self.0, self.0))
+ fn ywyw(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 5, 7>(self.0, self.0))
}
#[inline]
- fn ywzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 6, 4>(self.0, self.0))
+ fn ywzx(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 6, 4>(self.0, self.0))
}
#[inline]
- fn ywzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 6, 5>(self.0, self.0))
+ fn ywzy(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 6, 5>(self.0, self.0))
}
#[inline]
- fn ywzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 6, 6>(self.0, self.0))
+ fn ywzz(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 6, 6>(self.0, self.0))
}
#[inline]
- fn ywzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 6, 7>(self.0, self.0))
+ fn ywzw(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 6, 7>(self.0, self.0))
}
#[inline]
- fn ywwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 7, 4>(self.0, self.0))
+ fn ywwx(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 7, 4>(self.0, self.0))
}
#[inline]
- fn ywwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 7, 5>(self.0, self.0))
+ fn ywwy(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 7, 5>(self.0, self.0))
}
#[inline]
- fn ywwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 7, 6>(self.0, self.0))
+ fn ywwz(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 7, 6>(self.0, self.0))
}
#[inline]
- fn ywww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<1, 3, 7, 7>(self.0, self.0))
+ fn ywww(self) -> Self {
+ Self(i32x4_shuffle::<1, 3, 7, 7>(self.0, self.0))
}
#[inline]
- fn zxxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 4, 4>(self.0, self.0))
+ fn zxxx(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 4, 4>(self.0, self.0))
}
#[inline]
- fn zxxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 4, 5>(self.0, self.0))
+ fn zxxy(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 4, 5>(self.0, self.0))
}
#[inline]
- fn zxxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 4, 6>(self.0, self.0))
+ fn zxxz(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 4, 6>(self.0, self.0))
}
#[inline]
- fn zxxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 4, 7>(self.0, self.0))
+ fn zxxw(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 4, 7>(self.0, self.0))
}
#[inline]
- fn zxyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 5, 4>(self.0, self.0))
+ fn zxyx(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 5, 4>(self.0, self.0))
}
#[inline]
- fn zxyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 5, 5>(self.0, self.0))
+ fn zxyy(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 5, 5>(self.0, self.0))
}
#[inline]
- fn zxyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 5, 6>(self.0, self.0))
+ fn zxyz(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 5, 6>(self.0, self.0))
}
#[inline]
- fn zxyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 5, 7>(self.0, self.0))
+ fn zxyw(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 5, 7>(self.0, self.0))
}
#[inline]
- fn zxzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 6, 4>(self.0, self.0))
+ fn zxzx(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 6, 4>(self.0, self.0))
}
#[inline]
- fn zxzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 6, 5>(self.0, self.0))
+ fn zxzy(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 6, 5>(self.0, self.0))
}
#[inline]
- fn zxzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 6, 6>(self.0, self.0))
+ fn zxzz(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 6, 6>(self.0, self.0))
}
#[inline]
- fn zxzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 6, 7>(self.0, self.0))
+ fn zxzw(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 6, 7>(self.0, self.0))
}
#[inline]
- fn zxwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 7, 4>(self.0, self.0))
+ fn zxwx(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 7, 4>(self.0, self.0))
}
#[inline]
- fn zxwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 7, 5>(self.0, self.0))
+ fn zxwy(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 7, 5>(self.0, self.0))
}
#[inline]
- fn zxwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 7, 6>(self.0, self.0))
+ fn zxwz(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 7, 6>(self.0, self.0))
}
#[inline]
- fn zxww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 0, 7, 7>(self.0, self.0))
+ fn zxww(self) -> Self {
+ Self(i32x4_shuffle::<2, 0, 7, 7>(self.0, self.0))
}
#[inline]
- fn zyxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 4, 4>(self.0, self.0))
+ fn zyxx(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 4, 4>(self.0, self.0))
}
#[inline]
- fn zyxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 4, 5>(self.0, self.0))
+ fn zyxy(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 4, 5>(self.0, self.0))
}
#[inline]
- fn zyxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 4, 6>(self.0, self.0))
+ fn zyxz(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 4, 6>(self.0, self.0))
}
#[inline]
- fn zyxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 4, 7>(self.0, self.0))
+ fn zyxw(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 4, 7>(self.0, self.0))
}
#[inline]
- fn zyyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 5, 4>(self.0, self.0))
+ fn zyyx(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 5, 4>(self.0, self.0))
}
#[inline]
- fn zyyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 5, 5>(self.0, self.0))
+ fn zyyy(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 5, 5>(self.0, self.0))
}
#[inline]
- fn zyyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 5, 6>(self.0, self.0))
+ fn zyyz(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 5, 6>(self.0, self.0))
}
#[inline]
- fn zyyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 5, 7>(self.0, self.0))
+ fn zyyw(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 5, 7>(self.0, self.0))
}
#[inline]
- fn zyzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 6, 4>(self.0, self.0))
+ fn zyzx(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 6, 4>(self.0, self.0))
}
#[inline]
- fn zyzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 6, 5>(self.0, self.0))
+ fn zyzy(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 6, 5>(self.0, self.0))
}
#[inline]
- fn zyzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 6, 6>(self.0, self.0))
+ fn zyzz(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 6, 6>(self.0, self.0))
}
#[inline]
- fn zyzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 6, 7>(self.0, self.0))
+ fn zyzw(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 6, 7>(self.0, self.0))
}
#[inline]
- fn zywx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 7, 4>(self.0, self.0))
+ fn zywx(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 7, 4>(self.0, self.0))
}
#[inline]
- fn zywy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 7, 5>(self.0, self.0))
+ fn zywy(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 7, 5>(self.0, self.0))
}
#[inline]
- fn zywz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 7, 6>(self.0, self.0))
+ fn zywz(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 7, 6>(self.0, self.0))
}
#[inline]
- fn zyww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 1, 7, 7>(self.0, self.0))
+ fn zyww(self) -> Self {
+ Self(i32x4_shuffle::<2, 1, 7, 7>(self.0, self.0))
}
#[inline]
- fn zzxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 4, 4>(self.0, self.0))
+ fn zzxx(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 4, 4>(self.0, self.0))
}
#[inline]
- fn zzxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 4, 5>(self.0, self.0))
+ fn zzxy(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 4, 5>(self.0, self.0))
}
#[inline]
- fn zzxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 4, 6>(self.0, self.0))
+ fn zzxz(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 4, 6>(self.0, self.0))
}
#[inline]
- fn zzxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 4, 7>(self.0, self.0))
+ fn zzxw(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 4, 7>(self.0, self.0))
}
#[inline]
- fn zzyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 5, 4>(self.0, self.0))
+ fn zzyx(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 5, 4>(self.0, self.0))
}
#[inline]
- fn zzyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 5, 5>(self.0, self.0))
+ fn zzyy(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 5, 5>(self.0, self.0))
}
#[inline]
- fn zzyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 5, 6>(self.0, self.0))
+ fn zzyz(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 5, 6>(self.0, self.0))
}
#[inline]
- fn zzyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 5, 7>(self.0, self.0))
+ fn zzyw(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 5, 7>(self.0, self.0))
}
#[inline]
- fn zzzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 6, 4>(self.0, self.0))
+ fn zzzx(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 6, 4>(self.0, self.0))
}
#[inline]
- fn zzzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 6, 5>(self.0, self.0))
+ fn zzzy(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 6, 5>(self.0, self.0))
}
#[inline]
- fn zzzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 6, 6>(self.0, self.0))
+ fn zzzz(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 6, 6>(self.0, self.0))
}
#[inline]
- fn zzzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 6, 7>(self.0, self.0))
+ fn zzzw(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 6, 7>(self.0, self.0))
}
#[inline]
- fn zzwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 7, 4>(self.0, self.0))
+ fn zzwx(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 7, 4>(self.0, self.0))
}
#[inline]
- fn zzwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 7, 5>(self.0, self.0))
+ fn zzwy(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 7, 5>(self.0, self.0))
}
#[inline]
- fn zzwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 7, 6>(self.0, self.0))
+ fn zzwz(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 7, 6>(self.0, self.0))
}
#[inline]
- fn zzww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 2, 7, 7>(self.0, self.0))
+ fn zzww(self) -> Self {
+ Self(i32x4_shuffle::<2, 2, 7, 7>(self.0, self.0))
}
#[inline]
- fn zwxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 4, 4>(self.0, self.0))
+ fn zwxx(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 4, 4>(self.0, self.0))
}
#[inline]
- fn zwxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 4, 5>(self.0, self.0))
+ fn zwxy(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 4, 5>(self.0, self.0))
}
#[inline]
- fn zwxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 4, 6>(self.0, self.0))
+ fn zwxz(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 4, 6>(self.0, self.0))
}
#[inline]
- fn zwxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 4, 7>(self.0, self.0))
+ fn zwxw(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 4, 7>(self.0, self.0))
}
#[inline]
- fn zwyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 5, 4>(self.0, self.0))
+ fn zwyx(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 5, 4>(self.0, self.0))
}
#[inline]
- fn zwyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 5, 5>(self.0, self.0))
+ fn zwyy(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 5, 5>(self.0, self.0))
}
#[inline]
- fn zwyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 5, 6>(self.0, self.0))
+ fn zwyz(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 5, 6>(self.0, self.0))
}
#[inline]
- fn zwyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 5, 7>(self.0, self.0))
+ fn zwyw(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 5, 7>(self.0, self.0))
}
#[inline]
- fn zwzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 6, 4>(self.0, self.0))
+ fn zwzx(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 6, 4>(self.0, self.0))
}
#[inline]
- fn zwzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 6, 5>(self.0, self.0))
+ fn zwzy(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 6, 5>(self.0, self.0))
}
#[inline]
- fn zwzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 6, 6>(self.0, self.0))
+ fn zwzz(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 6, 6>(self.0, self.0))
}
#[inline]
- fn zwzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 6, 7>(self.0, self.0))
+ fn zwzw(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 6, 7>(self.0, self.0))
}
#[inline]
- fn zwwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 7, 4>(self.0, self.0))
+ fn zwwx(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 7, 4>(self.0, self.0))
}
#[inline]
- fn zwwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 7, 5>(self.0, self.0))
+ fn zwwy(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 7, 5>(self.0, self.0))
}
#[inline]
- fn zwwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 7, 6>(self.0, self.0))
+ fn zwwz(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 7, 6>(self.0, self.0))
}
#[inline]
- fn zwww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<2, 3, 7, 7>(self.0, self.0))
+ fn zwww(self) -> Self {
+ Self(i32x4_shuffle::<2, 3, 7, 7>(self.0, self.0))
}
#[inline]
- fn wxxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 4, 4>(self.0, self.0))
+ fn wxxx(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 4, 4>(self.0, self.0))
}
#[inline]
- fn wxxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 4, 5>(self.0, self.0))
+ fn wxxy(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 4, 5>(self.0, self.0))
}
#[inline]
- fn wxxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 4, 6>(self.0, self.0))
+ fn wxxz(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 4, 6>(self.0, self.0))
}
#[inline]
- fn wxxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 4, 7>(self.0, self.0))
+ fn wxxw(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 4, 7>(self.0, self.0))
}
#[inline]
- fn wxyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 5, 4>(self.0, self.0))
+ fn wxyx(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 5, 4>(self.0, self.0))
}
#[inline]
- fn wxyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 5, 5>(self.0, self.0))
+ fn wxyy(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 5, 5>(self.0, self.0))
}
#[inline]
- fn wxyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 5, 6>(self.0, self.0))
+ fn wxyz(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 5, 6>(self.0, self.0))
}
#[inline]
- fn wxyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 5, 7>(self.0, self.0))
+ fn wxyw(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 5, 7>(self.0, self.0))
}
#[inline]
- fn wxzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 6, 4>(self.0, self.0))
+ fn wxzx(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 6, 4>(self.0, self.0))
}
#[inline]
- fn wxzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 6, 5>(self.0, self.0))
+ fn wxzy(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 6, 5>(self.0, self.0))
}
#[inline]
- fn wxzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 6, 6>(self.0, self.0))
+ fn wxzz(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 6, 6>(self.0, self.0))
}
#[inline]
- fn wxzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 6, 7>(self.0, self.0))
+ fn wxzw(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 6, 7>(self.0, self.0))
}
#[inline]
- fn wxwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 7, 4>(self.0, self.0))
+ fn wxwx(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 7, 4>(self.0, self.0))
}
#[inline]
- fn wxwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 7, 5>(self.0, self.0))
+ fn wxwy(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 7, 5>(self.0, self.0))
}
#[inline]
- fn wxwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 7, 6>(self.0, self.0))
+ fn wxwz(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 7, 6>(self.0, self.0))
}
#[inline]
- fn wxww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 0, 7, 7>(self.0, self.0))
+ fn wxww(self) -> Self {
+ Self(i32x4_shuffle::<3, 0, 7, 7>(self.0, self.0))
}
#[inline]
- fn wyxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 4, 4>(self.0, self.0))
+ fn wyxx(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 4, 4>(self.0, self.0))
}
#[inline]
- fn wyxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 4, 5>(self.0, self.0))
+ fn wyxy(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 4, 5>(self.0, self.0))
}
#[inline]
- fn wyxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 4, 6>(self.0, self.0))
+ fn wyxz(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 4, 6>(self.0, self.0))
}
#[inline]
- fn wyxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 4, 7>(self.0, self.0))
+ fn wyxw(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 4, 7>(self.0, self.0))
}
#[inline]
- fn wyyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 5, 4>(self.0, self.0))
+ fn wyyx(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 5, 4>(self.0, self.0))
}
#[inline]
- fn wyyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 5, 5>(self.0, self.0))
+ fn wyyy(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 5, 5>(self.0, self.0))
}
#[inline]
- fn wyyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 5, 6>(self.0, self.0))
+ fn wyyz(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 5, 6>(self.0, self.0))
}
#[inline]
- fn wyyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 5, 7>(self.0, self.0))
+ fn wyyw(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 5, 7>(self.0, self.0))
}
#[inline]
- fn wyzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 6, 4>(self.0, self.0))
+ fn wyzx(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 6, 4>(self.0, self.0))
}
#[inline]
- fn wyzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 6, 5>(self.0, self.0))
+ fn wyzy(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 6, 5>(self.0, self.0))
}
#[inline]
- fn wyzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 6, 6>(self.0, self.0))
+ fn wyzz(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 6, 6>(self.0, self.0))
}
#[inline]
- fn wyzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 6, 7>(self.0, self.0))
+ fn wyzw(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 6, 7>(self.0, self.0))
}
#[inline]
- fn wywx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 7, 4>(self.0, self.0))
+ fn wywx(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 7, 4>(self.0, self.0))
}
#[inline]
- fn wywy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 7, 5>(self.0, self.0))
+ fn wywy(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 7, 5>(self.0, self.0))
}
#[inline]
- fn wywz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 7, 6>(self.0, self.0))
+ fn wywz(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 7, 6>(self.0, self.0))
}
#[inline]
- fn wyww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 1, 7, 7>(self.0, self.0))
+ fn wyww(self) -> Self {
+ Self(i32x4_shuffle::<3, 1, 7, 7>(self.0, self.0))
}
#[inline]
- fn wzxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 4, 4>(self.0, self.0))
+ fn wzxx(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 4, 4>(self.0, self.0))
}
#[inline]
- fn wzxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 4, 5>(self.0, self.0))
+ fn wzxy(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 4, 5>(self.0, self.0))
}
#[inline]
- fn wzxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 4, 6>(self.0, self.0))
+ fn wzxz(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 4, 6>(self.0, self.0))
}
#[inline]
- fn wzxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 4, 7>(self.0, self.0))
+ fn wzxw(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 4, 7>(self.0, self.0))
}
#[inline]
- fn wzyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 5, 4>(self.0, self.0))
+ fn wzyx(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 5, 4>(self.0, self.0))
}
#[inline]
- fn wzyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 5, 5>(self.0, self.0))
+ fn wzyy(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 5, 5>(self.0, self.0))
}
#[inline]
- fn wzyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 5, 6>(self.0, self.0))
+ fn wzyz(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 5, 6>(self.0, self.0))
}
#[inline]
- fn wzyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 5, 7>(self.0, self.0))
+ fn wzyw(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 5, 7>(self.0, self.0))
}
#[inline]
- fn wzzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 6, 4>(self.0, self.0))
+ fn wzzx(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 6, 4>(self.0, self.0))
}
#[inline]
- fn wzzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 6, 5>(self.0, self.0))
+ fn wzzy(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 6, 5>(self.0, self.0))
}
#[inline]
- fn wzzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 6, 6>(self.0, self.0))
+ fn wzzz(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 6, 6>(self.0, self.0))
}
#[inline]
- fn wzzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 6, 7>(self.0, self.0))
+ fn wzzw(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 6, 7>(self.0, self.0))
}
#[inline]
- fn wzwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 7, 4>(self.0, self.0))
+ fn wzwx(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 7, 4>(self.0, self.0))
}
#[inline]
- fn wzwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 7, 5>(self.0, self.0))
+ fn wzwy(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 7, 5>(self.0, self.0))
}
#[inline]
- fn wzwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 7, 6>(self.0, self.0))
+ fn wzwz(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 7, 6>(self.0, self.0))
}
#[inline]
- fn wzww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 2, 7, 7>(self.0, self.0))
+ fn wzww(self) -> Self {
+ Self(i32x4_shuffle::<3, 2, 7, 7>(self.0, self.0))
}
#[inline]
- fn wwxx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 4, 4>(self.0, self.0))
+ fn wwxx(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 4, 4>(self.0, self.0))
}
#[inline]
- fn wwxy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 4, 5>(self.0, self.0))
+ fn wwxy(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 4, 5>(self.0, self.0))
}
#[inline]
- fn wwxz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 4, 6>(self.0, self.0))
+ fn wwxz(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 4, 6>(self.0, self.0))
}
#[inline]
- fn wwxw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 4, 7>(self.0, self.0))
+ fn wwxw(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 4, 7>(self.0, self.0))
}
#[inline]
- fn wwyx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 5, 4>(self.0, self.0))
+ fn wwyx(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 5, 4>(self.0, self.0))
}
#[inline]
- fn wwyy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 5, 5>(self.0, self.0))
+ fn wwyy(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 5, 5>(self.0, self.0))
}
#[inline]
- fn wwyz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 5, 6>(self.0, self.0))
+ fn wwyz(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 5, 6>(self.0, self.0))
}
#[inline]
- fn wwyw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 5, 7>(self.0, self.0))
+ fn wwyw(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 5, 7>(self.0, self.0))
}
#[inline]
- fn wwzx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 6, 4>(self.0, self.0))
+ fn wwzx(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 6, 4>(self.0, self.0))
}
#[inline]
- fn wwzy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 6, 5>(self.0, self.0))
+ fn wwzy(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 6, 5>(self.0, self.0))
}
#[inline]
- fn wwzz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 6, 6>(self.0, self.0))
+ fn wwzz(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 6, 6>(self.0, self.0))
}
#[inline]
- fn wwzw(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 6, 7>(self.0, self.0))
+ fn wwzw(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 6, 7>(self.0, self.0))
}
#[inline]
- fn wwwx(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 7, 4>(self.0, self.0))
+ fn wwwx(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 7, 4>(self.0, self.0))
}
#[inline]
- fn wwwy(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 7, 5>(self.0, self.0))
+ fn wwwy(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 7, 5>(self.0, self.0))
}
#[inline]
- fn wwwz(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 7, 6>(self.0, self.0))
+ fn wwwz(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 7, 6>(self.0, self.0))
}
#[inline]
- fn wwww(self) -> Vec4 {
- Vec4(i32x4_shuffle::<3, 3, 7, 7>(self.0, self.0))
+ fn wwww(self) -> Self {
+ Self(i32x4_shuffle::<3, 3, 7, 7>(self.0, self.0))
}
}
diff --git a/crates/glam/src/u16/u16vec2.rs b/crates/glam/src/u16/u16vec2.rs
index 12ebf3c..285ea1b 100644
--- a/crates/glam/src/u16/u16vec2.rs
+++ b/crates/glam/src/u16/u16vec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(4)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -341,8 +342,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u16 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> u16 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -352,9 +353,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u16> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u16> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -362,9 +363,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u16 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u16 {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -658,7 +659,7 @@
}
}
-impl Div<U16Vec2> for U16Vec2 {
+impl Div for U16Vec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -669,10 +670,10 @@
}
}
-impl Div<&U16Vec2> for U16Vec2 {
- type Output = U16Vec2;
+impl Div<&Self> for U16Vec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U16Vec2) -> U16Vec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -693,7 +694,7 @@
}
}
-impl DivAssign<U16Vec2> for U16Vec2 {
+impl DivAssign for U16Vec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -701,10 +702,10 @@
}
}
-impl DivAssign<&U16Vec2> for U16Vec2 {
+impl DivAssign<&Self> for U16Vec2 {
#[inline]
- fn div_assign(&mut self, rhs: &U16Vec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -720,9 +721,9 @@
}
impl Div<&u16> for U16Vec2 {
- type Output = U16Vec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u16) -> U16Vec2 {
+ fn div(self, rhs: &u16) -> Self {
self.div(*rhs)
}
}
@@ -754,7 +755,7 @@
impl DivAssign<&u16> for U16Vec2 {
#[inline]
fn div_assign(&mut self, rhs: &u16) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -793,7 +794,7 @@
}
}
-impl Mul<U16Vec2> for U16Vec2 {
+impl Mul for U16Vec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -804,10 +805,10 @@
}
}
-impl Mul<&U16Vec2> for U16Vec2 {
- type Output = U16Vec2;
+impl Mul<&Self> for U16Vec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U16Vec2) -> U16Vec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -828,7 +829,7 @@
}
}
-impl MulAssign<U16Vec2> for U16Vec2 {
+impl MulAssign for U16Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -836,10 +837,10 @@
}
}
-impl MulAssign<&U16Vec2> for U16Vec2 {
+impl MulAssign<&Self> for U16Vec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &U16Vec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -855,9 +856,9 @@
}
impl Mul<&u16> for U16Vec2 {
- type Output = U16Vec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u16) -> U16Vec2 {
+ fn mul(self, rhs: &u16) -> Self {
self.mul(*rhs)
}
}
@@ -889,7 +890,7 @@
impl MulAssign<&u16> for U16Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: &u16) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -928,7 +929,7 @@
}
}
-impl Add<U16Vec2> for U16Vec2 {
+impl Add for U16Vec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -939,10 +940,10 @@
}
}
-impl Add<&U16Vec2> for U16Vec2 {
- type Output = U16Vec2;
+impl Add<&Self> for U16Vec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U16Vec2) -> U16Vec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -963,7 +964,7 @@
}
}
-impl AddAssign<U16Vec2> for U16Vec2 {
+impl AddAssign for U16Vec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -971,10 +972,10 @@
}
}
-impl AddAssign<&U16Vec2> for U16Vec2 {
+impl AddAssign<&Self> for U16Vec2 {
#[inline]
- fn add_assign(&mut self, rhs: &U16Vec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -990,9 +991,9 @@
}
impl Add<&u16> for U16Vec2 {
- type Output = U16Vec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u16) -> U16Vec2 {
+ fn add(self, rhs: &u16) -> Self {
self.add(*rhs)
}
}
@@ -1024,7 +1025,7 @@
impl AddAssign<&u16> for U16Vec2 {
#[inline]
fn add_assign(&mut self, rhs: &u16) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1063,7 +1064,7 @@
}
}
-impl Sub<U16Vec2> for U16Vec2 {
+impl Sub for U16Vec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1074,10 +1075,10 @@
}
}
-impl Sub<&U16Vec2> for U16Vec2 {
- type Output = U16Vec2;
+impl Sub<&Self> for U16Vec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U16Vec2) -> U16Vec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1098,18 +1099,18 @@
}
}
-impl SubAssign<U16Vec2> for U16Vec2 {
+impl SubAssign for U16Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: U16Vec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&U16Vec2> for U16Vec2 {
+impl SubAssign<&Self> for U16Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &U16Vec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1125,9 +1126,9 @@
}
impl Sub<&u16> for U16Vec2 {
- type Output = U16Vec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u16) -> U16Vec2 {
+ fn sub(self, rhs: &u16) -> Self {
self.sub(*rhs)
}
}
@@ -1159,7 +1160,7 @@
impl SubAssign<&u16> for U16Vec2 {
#[inline]
fn sub_assign(&mut self, rhs: &u16) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1198,7 +1199,7 @@
}
}
-impl Rem<U16Vec2> for U16Vec2 {
+impl Rem for U16Vec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1209,10 +1210,10 @@
}
}
-impl Rem<&U16Vec2> for U16Vec2 {
- type Output = U16Vec2;
+impl Rem<&Self> for U16Vec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U16Vec2) -> U16Vec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1233,7 +1234,7 @@
}
}
-impl RemAssign<U16Vec2> for U16Vec2 {
+impl RemAssign for U16Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1241,10 +1242,10 @@
}
}
-impl RemAssign<&U16Vec2> for U16Vec2 {
+impl RemAssign<&Self> for U16Vec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &U16Vec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1260,9 +1261,9 @@
}
impl Rem<&u16> for U16Vec2 {
- type Output = U16Vec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u16) -> U16Vec2 {
+ fn rem(self, rhs: &u16) -> Self {
self.rem(*rhs)
}
}
@@ -1294,7 +1295,7 @@
impl RemAssign<&u16> for U16Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: &u16) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1337,7 +1338,7 @@
impl AsRef<[u16; 2]> for U16Vec2 {
#[inline]
fn as_ref(&self) -> &[u16; 2] {
- unsafe { &*(self as *const U16Vec2 as *const [u16; 2]) }
+ unsafe { &*(self as *const Self as *const [u16; 2]) }
}
}
@@ -1345,7 +1346,7 @@
impl AsMut<[u16; 2]> for U16Vec2 {
#[inline]
fn as_mut(&mut self) -> &mut [u16; 2] {
- unsafe { &mut *(self as *mut U16Vec2 as *mut [u16; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [u16; 2]) }
}
}
@@ -1392,7 +1393,7 @@
impl Not for U16Vec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1400,6 +1401,14 @@
}
}
+impl Not for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn not(self) -> U16Vec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U16Vec2 {
type Output = Self;
#[inline]
@@ -1411,6 +1420,44 @@
}
}
+impl BitAnd<&Self> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U16Vec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitand(self, rhs: &U16Vec2) -> U16Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U16Vec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitand(self, rhs: U16Vec2) -> U16Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U16Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U16Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U16Vec2 {
type Output = Self;
#[inline]
@@ -1422,6 +1469,44 @@
}
}
+impl BitOr<&Self> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U16Vec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitor(self, rhs: &U16Vec2) -> U16Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U16Vec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitor(self, rhs: U16Vec2) -> U16Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U16Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U16Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U16Vec2 {
type Output = Self;
#[inline]
@@ -1433,6 +1518,44 @@
}
}
+impl BitXor<&Self> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U16Vec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &U16Vec2) -> U16Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U16Vec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitxor(self, rhs: U16Vec2) -> U16Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U16Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U16Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u16> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1444,6 +1567,44 @@
}
}
+impl BitAnd<&u16> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u16) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitand(self, rhs: &u16) -> U16Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitand(self, rhs: u16) -> U16Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u16> for U16Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u16) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u16> for U16Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u16) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u16> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1455,6 +1616,44 @@
}
}
+impl BitOr<&u16> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u16) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitor(self, rhs: &u16) -> U16Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitor(self, rhs: u16) -> U16Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u16> for U16Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u16) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u16> for U16Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u16) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u16> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1466,6 +1665,44 @@
}
}
+impl BitXor<&u16> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u16) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &u16) -> U16Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn bitxor(self, rhs: u16) -> U16Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u16> for U16Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u16) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u16> for U16Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u16) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1477,6 +1714,44 @@
}
}
+impl Shl<&i8> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1488,6 +1763,44 @@
}
}
+impl Shr<&i8> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1499,6 +1812,44 @@
}
}
+impl Shl<&i16> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1510,6 +1861,44 @@
}
}
+impl Shr<&i16> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1521,6 +1910,44 @@
}
}
+impl Shl<&i32> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1532,6 +1959,44 @@
}
}
+impl Shr<&i32> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1543,6 +2008,44 @@
}
}
+impl Shl<&i64> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1554,6 +2057,44 @@
}
}
+impl Shr<&i64> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1565,6 +2106,44 @@
}
}
+impl Shl<&u8> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1576,6 +2155,44 @@
}
}
+impl Shr<&u8> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1587,6 +2204,44 @@
}
}
+impl Shl<&u16> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1598,6 +2253,44 @@
}
}
+impl Shr<&u16> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1609,6 +2302,44 @@
}
}
+impl Shl<&u32> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1620,6 +2351,44 @@
}
}
+impl Shr<&u32> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1631,6 +2400,44 @@
}
}
+impl Shl<&u64> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U16Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U16Vec2 {
type Output = Self;
#[inline]
@@ -1642,10 +2449,48 @@
}
}
-impl Shl<crate::IVec2> for U16Vec2 {
+impl Shr<&u64> for U16Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U16Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec2> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1653,10 +2498,34 @@
}
}
-impl Shr<crate::IVec2> for U16Vec2 {
+impl Shl<&IVec2> for U16Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &IVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec2> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1664,10 +2533,34 @@
}
}
-impl Shl<crate::UVec2> for U16Vec2 {
+impl Shr<&IVec2> for U16Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &IVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec2> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1675,10 +2568,34 @@
}
}
-impl Shr<crate::UVec2> for U16Vec2 {
+impl Shl<&UVec2> for U16Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &UVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> U16Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> U16Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec2> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1686,6 +2603,30 @@
}
}
+impl Shr<&UVec2> for U16Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> U16Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &U16Vec2 {
+ type Output = U16Vec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> U16Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U16Vec2 {
type Output = u16;
#[inline]
diff --git a/crates/glam/src/u16/u16vec3.rs b/crates/glam/src/u16/u16vec3.rs
index ae7b0e9..c3ceb61 100644
--- a/crates/glam/src/u16/u16vec3.rs
+++ b/crates/glam/src/u16/u16vec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct U16Vec3 {
@@ -401,8 +402,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u16 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> u16 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -412,10 +413,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u16> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u16> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -423,12 +424,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u16 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u16 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -760,7 +761,7 @@
}
}
-impl Div<U16Vec3> for U16Vec3 {
+impl Div for U16Vec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -772,10 +773,10 @@
}
}
-impl Div<&U16Vec3> for U16Vec3 {
- type Output = U16Vec3;
+impl Div<&Self> for U16Vec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U16Vec3) -> U16Vec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -796,7 +797,7 @@
}
}
-impl DivAssign<U16Vec3> for U16Vec3 {
+impl DivAssign for U16Vec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -805,10 +806,10 @@
}
}
-impl DivAssign<&U16Vec3> for U16Vec3 {
+impl DivAssign<&Self> for U16Vec3 {
#[inline]
- fn div_assign(&mut self, rhs: &U16Vec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -825,9 +826,9 @@
}
impl Div<&u16> for U16Vec3 {
- type Output = U16Vec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u16) -> U16Vec3 {
+ fn div(self, rhs: &u16) -> Self {
self.div(*rhs)
}
}
@@ -860,7 +861,7 @@
impl DivAssign<&u16> for U16Vec3 {
#[inline]
fn div_assign(&mut self, rhs: &u16) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -900,7 +901,7 @@
}
}
-impl Mul<U16Vec3> for U16Vec3 {
+impl Mul for U16Vec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -912,10 +913,10 @@
}
}
-impl Mul<&U16Vec3> for U16Vec3 {
- type Output = U16Vec3;
+impl Mul<&Self> for U16Vec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U16Vec3) -> U16Vec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -936,7 +937,7 @@
}
}
-impl MulAssign<U16Vec3> for U16Vec3 {
+impl MulAssign for U16Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -945,10 +946,10 @@
}
}
-impl MulAssign<&U16Vec3> for U16Vec3 {
+impl MulAssign<&Self> for U16Vec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &U16Vec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -965,9 +966,9 @@
}
impl Mul<&u16> for U16Vec3 {
- type Output = U16Vec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u16) -> U16Vec3 {
+ fn mul(self, rhs: &u16) -> Self {
self.mul(*rhs)
}
}
@@ -1000,7 +1001,7 @@
impl MulAssign<&u16> for U16Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: &u16) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1040,7 +1041,7 @@
}
}
-impl Add<U16Vec3> for U16Vec3 {
+impl Add for U16Vec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1052,10 +1053,10 @@
}
}
-impl Add<&U16Vec3> for U16Vec3 {
- type Output = U16Vec3;
+impl Add<&Self> for U16Vec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U16Vec3) -> U16Vec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1076,7 +1077,7 @@
}
}
-impl AddAssign<U16Vec3> for U16Vec3 {
+impl AddAssign for U16Vec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1085,10 +1086,10 @@
}
}
-impl AddAssign<&U16Vec3> for U16Vec3 {
+impl AddAssign<&Self> for U16Vec3 {
#[inline]
- fn add_assign(&mut self, rhs: &U16Vec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1105,9 +1106,9 @@
}
impl Add<&u16> for U16Vec3 {
- type Output = U16Vec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u16) -> U16Vec3 {
+ fn add(self, rhs: &u16) -> Self {
self.add(*rhs)
}
}
@@ -1140,7 +1141,7 @@
impl AddAssign<&u16> for U16Vec3 {
#[inline]
fn add_assign(&mut self, rhs: &u16) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1180,7 +1181,7 @@
}
}
-impl Sub<U16Vec3> for U16Vec3 {
+impl Sub for U16Vec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1192,10 +1193,10 @@
}
}
-impl Sub<&U16Vec3> for U16Vec3 {
- type Output = U16Vec3;
+impl Sub<&Self> for U16Vec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U16Vec3) -> U16Vec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1216,19 +1217,19 @@
}
}
-impl SubAssign<U16Vec3> for U16Vec3 {
+impl SubAssign for U16Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: U16Vec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&U16Vec3> for U16Vec3 {
+impl SubAssign<&Self> for U16Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &U16Vec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1245,9 +1246,9 @@
}
impl Sub<&u16> for U16Vec3 {
- type Output = U16Vec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u16) -> U16Vec3 {
+ fn sub(self, rhs: &u16) -> Self {
self.sub(*rhs)
}
}
@@ -1280,7 +1281,7 @@
impl SubAssign<&u16> for U16Vec3 {
#[inline]
fn sub_assign(&mut self, rhs: &u16) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1320,7 +1321,7 @@
}
}
-impl Rem<U16Vec3> for U16Vec3 {
+impl Rem for U16Vec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1332,10 +1333,10 @@
}
}
-impl Rem<&U16Vec3> for U16Vec3 {
- type Output = U16Vec3;
+impl Rem<&Self> for U16Vec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U16Vec3) -> U16Vec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1356,7 +1357,7 @@
}
}
-impl RemAssign<U16Vec3> for U16Vec3 {
+impl RemAssign for U16Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1365,10 +1366,10 @@
}
}
-impl RemAssign<&U16Vec3> for U16Vec3 {
+impl RemAssign<&Self> for U16Vec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &U16Vec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1385,9 +1386,9 @@
}
impl Rem<&u16> for U16Vec3 {
- type Output = U16Vec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u16) -> U16Vec3 {
+ fn rem(self, rhs: &u16) -> Self {
self.rem(*rhs)
}
}
@@ -1420,7 +1421,7 @@
impl RemAssign<&u16> for U16Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: &u16) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1464,7 +1465,7 @@
impl AsRef<[u16; 3]> for U16Vec3 {
#[inline]
fn as_ref(&self) -> &[u16; 3] {
- unsafe { &*(self as *const U16Vec3 as *const [u16; 3]) }
+ unsafe { &*(self as *const Self as *const [u16; 3]) }
}
}
@@ -1472,7 +1473,7 @@
impl AsMut<[u16; 3]> for U16Vec3 {
#[inline]
fn as_mut(&mut self) -> &mut [u16; 3] {
- unsafe { &mut *(self as *mut U16Vec3 as *mut [u16; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [u16; 3]) }
}
}
@@ -1519,7 +1520,7 @@
impl Not for U16Vec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1528,6 +1529,14 @@
}
}
+impl Not for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn not(self) -> U16Vec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U16Vec3 {
type Output = Self;
#[inline]
@@ -1540,6 +1549,44 @@
}
}
+impl BitAnd<&Self> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U16Vec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitand(self, rhs: &U16Vec3) -> U16Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U16Vec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitand(self, rhs: U16Vec3) -> U16Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U16Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U16Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U16Vec3 {
type Output = Self;
#[inline]
@@ -1552,6 +1599,44 @@
}
}
+impl BitOr<&Self> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U16Vec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitor(self, rhs: &U16Vec3) -> U16Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U16Vec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitor(self, rhs: U16Vec3) -> U16Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U16Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U16Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U16Vec3 {
type Output = Self;
#[inline]
@@ -1564,6 +1649,44 @@
}
}
+impl BitXor<&Self> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U16Vec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &U16Vec3) -> U16Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U16Vec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitxor(self, rhs: U16Vec3) -> U16Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U16Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U16Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u16> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1576,6 +1699,44 @@
}
}
+impl BitAnd<&u16> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u16) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitand(self, rhs: &u16) -> U16Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitand(self, rhs: u16) -> U16Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u16> for U16Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u16) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u16> for U16Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u16) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u16> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1588,6 +1749,44 @@
}
}
+impl BitOr<&u16> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u16) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitor(self, rhs: &u16) -> U16Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitor(self, rhs: u16) -> U16Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u16> for U16Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u16) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u16> for U16Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u16) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u16> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1600,6 +1799,44 @@
}
}
+impl BitXor<&u16> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u16) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &u16) -> U16Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn bitxor(self, rhs: u16) -> U16Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u16> for U16Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u16) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u16> for U16Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u16) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1612,6 +1849,44 @@
}
}
+impl Shl<&i8> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1624,6 +1899,44 @@
}
}
+impl Shr<&i8> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1636,6 +1949,44 @@
}
}
+impl Shl<&i16> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1648,6 +1999,44 @@
}
}
+impl Shr<&i16> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1660,6 +2049,44 @@
}
}
+impl Shl<&i32> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1672,6 +2099,44 @@
}
}
+impl Shr<&i32> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1684,6 +2149,44 @@
}
}
+impl Shl<&i64> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1696,6 +2199,44 @@
}
}
+impl Shr<&i64> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1708,6 +2249,44 @@
}
}
+impl Shl<&u8> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1720,6 +2299,44 @@
}
}
+impl Shr<&u8> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1732,6 +2349,44 @@
}
}
+impl Shl<&u16> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1744,6 +2399,44 @@
}
}
+impl Shr<&u16> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1756,6 +2449,44 @@
}
}
+impl Shl<&u32> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1768,6 +2499,44 @@
}
}
+impl Shr<&u32> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1780,6 +2549,44 @@
}
}
+impl Shl<&u64> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U16Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U16Vec3 {
type Output = Self;
#[inline]
@@ -1792,10 +2599,48 @@
}
}
-impl Shl<crate::IVec3> for U16Vec3 {
+impl Shr<&u64> for U16Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U16Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec3> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1804,10 +2649,34 @@
}
}
-impl Shr<crate::IVec3> for U16Vec3 {
+impl Shl<&IVec3> for U16Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &IVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec3> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1816,10 +2685,34 @@
}
}
-impl Shl<crate::UVec3> for U16Vec3 {
+impl Shr<&IVec3> for U16Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &IVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec3> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1828,10 +2721,34 @@
}
}
-impl Shr<crate::UVec3> for U16Vec3 {
+impl Shl<&UVec3> for U16Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &UVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> U16Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> U16Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec3> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1840,6 +2757,30 @@
}
}
+impl Shr<&UVec3> for U16Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> U16Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &U16Vec3 {
+ type Output = U16Vec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> U16Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U16Vec3 {
type Output = u16;
#[inline]
diff --git a/crates/glam/src/u16/u16vec4.rs b/crates/glam/src/u16/u16vec4.rs
index f3a5bbd..eec8d1d 100644
--- a/crates/glam/src/u16/u16vec4.rs
+++ b/crates/glam/src/u16/u16vec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(8)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -434,11 +435,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u16 {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> u16 {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -448,11 +449,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u16> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u16> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -460,13 +461,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u16 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u16 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -826,7 +827,7 @@
}
}
-impl Div<U16Vec4> for U16Vec4 {
+impl Div for U16Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -839,10 +840,10 @@
}
}
-impl Div<&U16Vec4> for U16Vec4 {
- type Output = U16Vec4;
+impl Div<&Self> for U16Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U16Vec4) -> U16Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -863,7 +864,7 @@
}
}
-impl DivAssign<U16Vec4> for U16Vec4 {
+impl DivAssign for U16Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -873,10 +874,10 @@
}
}
-impl DivAssign<&U16Vec4> for U16Vec4 {
+impl DivAssign<&Self> for U16Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &U16Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -894,9 +895,9 @@
}
impl Div<&u16> for U16Vec4 {
- type Output = U16Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u16) -> U16Vec4 {
+ fn div(self, rhs: &u16) -> Self {
self.div(*rhs)
}
}
@@ -930,7 +931,7 @@
impl DivAssign<&u16> for U16Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &u16) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -971,7 +972,7 @@
}
}
-impl Mul<U16Vec4> for U16Vec4 {
+impl Mul for U16Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -984,10 +985,10 @@
}
}
-impl Mul<&U16Vec4> for U16Vec4 {
- type Output = U16Vec4;
+impl Mul<&Self> for U16Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U16Vec4) -> U16Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1008,7 +1009,7 @@
}
}
-impl MulAssign<U16Vec4> for U16Vec4 {
+impl MulAssign for U16Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1018,10 +1019,10 @@
}
}
-impl MulAssign<&U16Vec4> for U16Vec4 {
+impl MulAssign<&Self> for U16Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &U16Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1039,9 +1040,9 @@
}
impl Mul<&u16> for U16Vec4 {
- type Output = U16Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u16) -> U16Vec4 {
+ fn mul(self, rhs: &u16) -> Self {
self.mul(*rhs)
}
}
@@ -1075,7 +1076,7 @@
impl MulAssign<&u16> for U16Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &u16) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1116,7 +1117,7 @@
}
}
-impl Add<U16Vec4> for U16Vec4 {
+impl Add for U16Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1129,10 +1130,10 @@
}
}
-impl Add<&U16Vec4> for U16Vec4 {
- type Output = U16Vec4;
+impl Add<&Self> for U16Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U16Vec4) -> U16Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1153,7 +1154,7 @@
}
}
-impl AddAssign<U16Vec4> for U16Vec4 {
+impl AddAssign for U16Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1163,10 +1164,10 @@
}
}
-impl AddAssign<&U16Vec4> for U16Vec4 {
+impl AddAssign<&Self> for U16Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &U16Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1184,9 +1185,9 @@
}
impl Add<&u16> for U16Vec4 {
- type Output = U16Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u16) -> U16Vec4 {
+ fn add(self, rhs: &u16) -> Self {
self.add(*rhs)
}
}
@@ -1220,7 +1221,7 @@
impl AddAssign<&u16> for U16Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &u16) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1261,7 +1262,7 @@
}
}
-impl Sub<U16Vec4> for U16Vec4 {
+impl Sub for U16Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1274,10 +1275,10 @@
}
}
-impl Sub<&U16Vec4> for U16Vec4 {
- type Output = U16Vec4;
+impl Sub<&Self> for U16Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U16Vec4) -> U16Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1298,9 +1299,9 @@
}
}
-impl SubAssign<U16Vec4> for U16Vec4 {
+impl SubAssign for U16Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: U16Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1308,10 +1309,10 @@
}
}
-impl SubAssign<&U16Vec4> for U16Vec4 {
+impl SubAssign<&Self> for U16Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &U16Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1329,9 +1330,9 @@
}
impl Sub<&u16> for U16Vec4 {
- type Output = U16Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u16) -> U16Vec4 {
+ fn sub(self, rhs: &u16) -> Self {
self.sub(*rhs)
}
}
@@ -1365,7 +1366,7 @@
impl SubAssign<&u16> for U16Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &u16) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1406,7 +1407,7 @@
}
}
-impl Rem<U16Vec4> for U16Vec4 {
+impl Rem for U16Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1419,10 +1420,10 @@
}
}
-impl Rem<&U16Vec4> for U16Vec4 {
- type Output = U16Vec4;
+impl Rem<&Self> for U16Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U16Vec4) -> U16Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1443,7 +1444,7 @@
}
}
-impl RemAssign<U16Vec4> for U16Vec4 {
+impl RemAssign for U16Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1453,10 +1454,10 @@
}
}
-impl RemAssign<&U16Vec4> for U16Vec4 {
+impl RemAssign<&Self> for U16Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &U16Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1474,9 +1475,9 @@
}
impl Rem<&u16> for U16Vec4 {
- type Output = U16Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u16) -> U16Vec4 {
+ fn rem(self, rhs: &u16) -> Self {
self.rem(*rhs)
}
}
@@ -1510,7 +1511,7 @@
impl RemAssign<&u16> for U16Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &u16) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1555,7 +1556,7 @@
impl AsRef<[u16; 4]> for U16Vec4 {
#[inline]
fn as_ref(&self) -> &[u16; 4] {
- unsafe { &*(self as *const U16Vec4 as *const [u16; 4]) }
+ unsafe { &*(self as *const Self as *const [u16; 4]) }
}
}
@@ -1563,7 +1564,7 @@
impl AsMut<[u16; 4]> for U16Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [u16; 4] {
- unsafe { &mut *(self as *mut U16Vec4 as *mut [u16; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [u16; 4]) }
}
}
@@ -1610,7 +1611,7 @@
impl Not for U16Vec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1620,6 +1621,14 @@
}
}
+impl Not for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn not(self) -> U16Vec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U16Vec4 {
type Output = Self;
#[inline]
@@ -1633,6 +1642,44 @@
}
}
+impl BitAnd<&Self> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U16Vec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitand(self, rhs: &U16Vec4) -> U16Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U16Vec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitand(self, rhs: U16Vec4) -> U16Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U16Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U16Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U16Vec4 {
type Output = Self;
#[inline]
@@ -1646,6 +1693,44 @@
}
}
+impl BitOr<&Self> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U16Vec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitor(self, rhs: &U16Vec4) -> U16Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U16Vec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitor(self, rhs: U16Vec4) -> U16Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U16Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U16Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U16Vec4 {
type Output = Self;
#[inline]
@@ -1659,6 +1744,44 @@
}
}
+impl BitXor<&Self> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U16Vec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &U16Vec4) -> U16Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U16Vec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitxor(self, rhs: U16Vec4) -> U16Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U16Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U16Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u16> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1672,6 +1795,44 @@
}
}
+impl BitAnd<&u16> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u16) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitand(self, rhs: &u16) -> U16Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitand(self, rhs: u16) -> U16Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u16> for U16Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u16) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u16> for U16Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u16) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u16> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1685,6 +1846,44 @@
}
}
+impl BitOr<&u16> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u16) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitor(self, rhs: &u16) -> U16Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitor(self, rhs: u16) -> U16Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u16> for U16Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u16) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u16> for U16Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u16) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u16> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1698,6 +1897,44 @@
}
}
+impl BitXor<&u16> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u16) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &u16) -> U16Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn bitxor(self, rhs: u16) -> U16Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u16> for U16Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u16) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u16> for U16Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u16) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1711,6 +1948,44 @@
}
}
+impl Shl<&i8> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1724,6 +1999,44 @@
}
}
+impl Shr<&i8> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1737,6 +2050,44 @@
}
}
+impl Shl<&i16> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1750,6 +2101,44 @@
}
}
+impl Shr<&i16> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1763,6 +2152,44 @@
}
}
+impl Shl<&i32> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1776,6 +2203,44 @@
}
}
+impl Shr<&i32> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1789,6 +2254,44 @@
}
}
+impl Shl<&i64> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1802,6 +2305,44 @@
}
}
+impl Shr<&i64> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1815,6 +2356,44 @@
}
}
+impl Shl<&u8> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1828,6 +2407,44 @@
}
}
+impl Shr<&u8> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1841,6 +2458,44 @@
}
}
+impl Shl<&u16> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1854,6 +2509,44 @@
}
}
+impl Shr<&u16> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1867,6 +2560,44 @@
}
}
+impl Shl<&u32> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1880,6 +2611,44 @@
}
}
+impl Shr<&u32> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1893,6 +2662,44 @@
}
}
+impl Shl<&u64> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U16Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U16Vec4 {
type Output = Self;
#[inline]
@@ -1906,10 +2713,48 @@
}
}
-impl Shl<crate::IVec4> for U16Vec4 {
+impl Shr<&u64> for U16Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U16Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec4> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1919,10 +2764,34 @@
}
}
-impl Shr<crate::IVec4> for U16Vec4 {
+impl Shl<&IVec4> for U16Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &IVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec4> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1932,10 +2801,34 @@
}
}
-impl Shl<crate::UVec4> for U16Vec4 {
+impl Shr<&IVec4> for U16Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &IVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec4> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1945,10 +2838,34 @@
}
}
-impl Shr<crate::UVec4> for U16Vec4 {
+impl Shl<&UVec4> for U16Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &UVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> U16Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> U16Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec4> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1958,6 +2875,30 @@
}
}
+impl Shr<&UVec4> for U16Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> U16Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &U16Vec4 {
+ type Output = U16Vec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> U16Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U16Vec4 {
type Output = u16;
#[inline]
diff --git a/crates/glam/src/u32/uvec2.rs b/crates/glam/src/u32/uvec2.rs
index 27c2cee..e7a1ced 100644
--- a/crates/glam/src/u32/uvec2.rs
+++ b/crates/glam/src/u32/uvec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(8)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -341,8 +342,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u32 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> u32 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -352,9 +353,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u32> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u32> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -362,9 +363,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u32 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u32 {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -658,7 +659,7 @@
}
}
-impl Div<UVec2> for UVec2 {
+impl Div for UVec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -669,10 +670,10 @@
}
}
-impl Div<&UVec2> for UVec2 {
- type Output = UVec2;
+impl Div<&Self> for UVec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &UVec2) -> UVec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -693,7 +694,7 @@
}
}
-impl DivAssign<UVec2> for UVec2 {
+impl DivAssign for UVec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -701,10 +702,10 @@
}
}
-impl DivAssign<&UVec2> for UVec2 {
+impl DivAssign<&Self> for UVec2 {
#[inline]
- fn div_assign(&mut self, rhs: &UVec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -720,9 +721,9 @@
}
impl Div<&u32> for UVec2 {
- type Output = UVec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u32) -> UVec2 {
+ fn div(self, rhs: &u32) -> Self {
self.div(*rhs)
}
}
@@ -754,7 +755,7 @@
impl DivAssign<&u32> for UVec2 {
#[inline]
fn div_assign(&mut self, rhs: &u32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -793,7 +794,7 @@
}
}
-impl Mul<UVec2> for UVec2 {
+impl Mul for UVec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -804,10 +805,10 @@
}
}
-impl Mul<&UVec2> for UVec2 {
- type Output = UVec2;
+impl Mul<&Self> for UVec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &UVec2) -> UVec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -828,7 +829,7 @@
}
}
-impl MulAssign<UVec2> for UVec2 {
+impl MulAssign for UVec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -836,10 +837,10 @@
}
}
-impl MulAssign<&UVec2> for UVec2 {
+impl MulAssign<&Self> for UVec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &UVec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -855,9 +856,9 @@
}
impl Mul<&u32> for UVec2 {
- type Output = UVec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u32) -> UVec2 {
+ fn mul(self, rhs: &u32) -> Self {
self.mul(*rhs)
}
}
@@ -889,7 +890,7 @@
impl MulAssign<&u32> for UVec2 {
#[inline]
fn mul_assign(&mut self, rhs: &u32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -928,7 +929,7 @@
}
}
-impl Add<UVec2> for UVec2 {
+impl Add for UVec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -939,10 +940,10 @@
}
}
-impl Add<&UVec2> for UVec2 {
- type Output = UVec2;
+impl Add<&Self> for UVec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &UVec2) -> UVec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -963,7 +964,7 @@
}
}
-impl AddAssign<UVec2> for UVec2 {
+impl AddAssign for UVec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -971,10 +972,10 @@
}
}
-impl AddAssign<&UVec2> for UVec2 {
+impl AddAssign<&Self> for UVec2 {
#[inline]
- fn add_assign(&mut self, rhs: &UVec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -990,9 +991,9 @@
}
impl Add<&u32> for UVec2 {
- type Output = UVec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u32) -> UVec2 {
+ fn add(self, rhs: &u32) -> Self {
self.add(*rhs)
}
}
@@ -1024,7 +1025,7 @@
impl AddAssign<&u32> for UVec2 {
#[inline]
fn add_assign(&mut self, rhs: &u32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1063,7 +1064,7 @@
}
}
-impl Sub<UVec2> for UVec2 {
+impl Sub for UVec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1074,10 +1075,10 @@
}
}
-impl Sub<&UVec2> for UVec2 {
- type Output = UVec2;
+impl Sub<&Self> for UVec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &UVec2) -> UVec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1098,18 +1099,18 @@
}
}
-impl SubAssign<UVec2> for UVec2 {
+impl SubAssign for UVec2 {
#[inline]
- fn sub_assign(&mut self, rhs: UVec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&UVec2> for UVec2 {
+impl SubAssign<&Self> for UVec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &UVec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1125,9 +1126,9 @@
}
impl Sub<&u32> for UVec2 {
- type Output = UVec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u32) -> UVec2 {
+ fn sub(self, rhs: &u32) -> Self {
self.sub(*rhs)
}
}
@@ -1159,7 +1160,7 @@
impl SubAssign<&u32> for UVec2 {
#[inline]
fn sub_assign(&mut self, rhs: &u32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1198,7 +1199,7 @@
}
}
-impl Rem<UVec2> for UVec2 {
+impl Rem for UVec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1209,10 +1210,10 @@
}
}
-impl Rem<&UVec2> for UVec2 {
- type Output = UVec2;
+impl Rem<&Self> for UVec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &UVec2) -> UVec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1233,7 +1234,7 @@
}
}
-impl RemAssign<UVec2> for UVec2 {
+impl RemAssign for UVec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1241,10 +1242,10 @@
}
}
-impl RemAssign<&UVec2> for UVec2 {
+impl RemAssign<&Self> for UVec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &UVec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1260,9 +1261,9 @@
}
impl Rem<&u32> for UVec2 {
- type Output = UVec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u32) -> UVec2 {
+ fn rem(self, rhs: &u32) -> Self {
self.rem(*rhs)
}
}
@@ -1294,7 +1295,7 @@
impl RemAssign<&u32> for UVec2 {
#[inline]
fn rem_assign(&mut self, rhs: &u32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1337,7 +1338,7 @@
impl AsRef<[u32; 2]> for UVec2 {
#[inline]
fn as_ref(&self) -> &[u32; 2] {
- unsafe { &*(self as *const UVec2 as *const [u32; 2]) }
+ unsafe { &*(self as *const Self as *const [u32; 2]) }
}
}
@@ -1345,7 +1346,7 @@
impl AsMut<[u32; 2]> for UVec2 {
#[inline]
fn as_mut(&mut self) -> &mut [u32; 2] {
- unsafe { &mut *(self as *mut UVec2 as *mut [u32; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [u32; 2]) }
}
}
@@ -1392,7 +1393,7 @@
impl Not for UVec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1400,6 +1401,14 @@
}
}
+impl Not for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn not(self) -> UVec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for UVec2 {
type Output = Self;
#[inline]
@@ -1411,6 +1420,44 @@
}
}
+impl BitAnd<&Self> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitand(self, rhs: &UVec2) -> UVec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitand(self, rhs: UVec2) -> UVec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for UVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for UVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for UVec2 {
type Output = Self;
#[inline]
@@ -1422,6 +1469,44 @@
}
}
+impl BitOr<&Self> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitor(self, rhs: &UVec2) -> UVec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitor(self, rhs: UVec2) -> UVec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for UVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for UVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for UVec2 {
type Output = Self;
#[inline]
@@ -1433,6 +1518,44 @@
}
}
+impl BitXor<&Self> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitxor(self, rhs: &UVec2) -> UVec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitxor(self, rhs: UVec2) -> UVec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for UVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for UVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u32> for UVec2 {
type Output = Self;
#[inline]
@@ -1444,6 +1567,44 @@
}
}
+impl BitAnd<&u32> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u32) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitand(self, rhs: &u32) -> UVec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitand(self, rhs: u32) -> UVec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u32> for UVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u32) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u32> for UVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u32) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u32> for UVec2 {
type Output = Self;
#[inline]
@@ -1455,6 +1616,44 @@
}
}
+impl BitOr<&u32> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u32) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitor(self, rhs: &u32) -> UVec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitor(self, rhs: u32) -> UVec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u32> for UVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u32) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u32> for UVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u32) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u32> for UVec2 {
type Output = Self;
#[inline]
@@ -1466,6 +1665,44 @@
}
}
+impl BitXor<&u32> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u32) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitxor(self, rhs: &u32) -> UVec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn bitxor(self, rhs: u32) -> UVec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u32> for UVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u32) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u32> for UVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u32) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for UVec2 {
type Output = Self;
#[inline]
@@ -1477,6 +1714,44 @@
}
}
+impl Shl<&i8> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for UVec2 {
type Output = Self;
#[inline]
@@ -1488,6 +1763,44 @@
}
}
+impl Shr<&i8> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for UVec2 {
type Output = Self;
#[inline]
@@ -1499,6 +1812,44 @@
}
}
+impl Shl<&i16> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for UVec2 {
type Output = Self;
#[inline]
@@ -1510,6 +1861,44 @@
}
}
+impl Shr<&i16> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for UVec2 {
type Output = Self;
#[inline]
@@ -1521,6 +1910,44 @@
}
}
+impl Shl<&i32> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for UVec2 {
type Output = Self;
#[inline]
@@ -1532,6 +1959,44 @@
}
}
+impl Shr<&i32> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for UVec2 {
type Output = Self;
#[inline]
@@ -1543,6 +2008,44 @@
}
}
+impl Shl<&i64> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for UVec2 {
type Output = Self;
#[inline]
@@ -1554,6 +2057,44 @@
}
}
+impl Shr<&i64> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for UVec2 {
type Output = Self;
#[inline]
@@ -1565,6 +2106,44 @@
}
}
+impl Shl<&u8> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for UVec2 {
type Output = Self;
#[inline]
@@ -1576,6 +2155,44 @@
}
}
+impl Shr<&u8> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for UVec2 {
type Output = Self;
#[inline]
@@ -1587,6 +2204,44 @@
}
}
+impl Shl<&u16> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for UVec2 {
type Output = Self;
#[inline]
@@ -1598,6 +2253,44 @@
}
}
+impl Shr<&u16> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for UVec2 {
type Output = Self;
#[inline]
@@ -1609,6 +2302,44 @@
}
}
+impl Shl<&u32> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for UVec2 {
type Output = Self;
#[inline]
@@ -1620,6 +2351,44 @@
}
}
+impl Shr<&u32> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for UVec2 {
type Output = Self;
#[inline]
@@ -1631,6 +2400,44 @@
}
}
+impl Shl<&u64> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for UVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for UVec2 {
type Output = Self;
#[inline]
@@ -1642,10 +2449,48 @@
}
}
-impl Shl<crate::IVec2> for UVec2 {
+impl Shr<&u64> for UVec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for UVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec2> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1653,10 +2498,34 @@
}
}
-impl Shr<crate::IVec2> for UVec2 {
+impl Shl<&IVec2> for UVec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &IVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec2> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1664,10 +2533,34 @@
}
}
-impl Shl<crate::UVec2> for UVec2 {
+impl Shr<&IVec2> for UVec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &IVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: Self) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1675,10 +2568,34 @@
}
}
-impl Shr<crate::UVec2> for UVec2 {
+impl Shl<&Self> for UVec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &Self) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> UVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> UVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: Self) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1686,6 +2603,30 @@
}
}
+impl Shr<&Self> for UVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &Self) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> UVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &UVec2 {
+ type Output = UVec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> UVec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for UVec2 {
type Output = u32;
#[inline]
diff --git a/crates/glam/src/u32/uvec3.rs b/crates/glam/src/u32/uvec3.rs
index 22b98be..88b0528 100644
--- a/crates/glam/src/u32/uvec3.rs
+++ b/crates/glam/src/u32/uvec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct UVec3 {
@@ -401,8 +402,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u32 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> u32 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -412,10 +413,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u32> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u32> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -423,12 +424,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u32 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u32 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -760,7 +761,7 @@
}
}
-impl Div<UVec3> for UVec3 {
+impl Div for UVec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -772,10 +773,10 @@
}
}
-impl Div<&UVec3> for UVec3 {
- type Output = UVec3;
+impl Div<&Self> for UVec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &UVec3) -> UVec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -796,7 +797,7 @@
}
}
-impl DivAssign<UVec3> for UVec3 {
+impl DivAssign for UVec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -805,10 +806,10 @@
}
}
-impl DivAssign<&UVec3> for UVec3 {
+impl DivAssign<&Self> for UVec3 {
#[inline]
- fn div_assign(&mut self, rhs: &UVec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -825,9 +826,9 @@
}
impl Div<&u32> for UVec3 {
- type Output = UVec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u32) -> UVec3 {
+ fn div(self, rhs: &u32) -> Self {
self.div(*rhs)
}
}
@@ -860,7 +861,7 @@
impl DivAssign<&u32> for UVec3 {
#[inline]
fn div_assign(&mut self, rhs: &u32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -900,7 +901,7 @@
}
}
-impl Mul<UVec3> for UVec3 {
+impl Mul for UVec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -912,10 +913,10 @@
}
}
-impl Mul<&UVec3> for UVec3 {
- type Output = UVec3;
+impl Mul<&Self> for UVec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &UVec3) -> UVec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -936,7 +937,7 @@
}
}
-impl MulAssign<UVec3> for UVec3 {
+impl MulAssign for UVec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -945,10 +946,10 @@
}
}
-impl MulAssign<&UVec3> for UVec3 {
+impl MulAssign<&Self> for UVec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &UVec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -965,9 +966,9 @@
}
impl Mul<&u32> for UVec3 {
- type Output = UVec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u32) -> UVec3 {
+ fn mul(self, rhs: &u32) -> Self {
self.mul(*rhs)
}
}
@@ -1000,7 +1001,7 @@
impl MulAssign<&u32> for UVec3 {
#[inline]
fn mul_assign(&mut self, rhs: &u32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1040,7 +1041,7 @@
}
}
-impl Add<UVec3> for UVec3 {
+impl Add for UVec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1052,10 +1053,10 @@
}
}
-impl Add<&UVec3> for UVec3 {
- type Output = UVec3;
+impl Add<&Self> for UVec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &UVec3) -> UVec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1076,7 +1077,7 @@
}
}
-impl AddAssign<UVec3> for UVec3 {
+impl AddAssign for UVec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1085,10 +1086,10 @@
}
}
-impl AddAssign<&UVec3> for UVec3 {
+impl AddAssign<&Self> for UVec3 {
#[inline]
- fn add_assign(&mut self, rhs: &UVec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1105,9 +1106,9 @@
}
impl Add<&u32> for UVec3 {
- type Output = UVec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u32) -> UVec3 {
+ fn add(self, rhs: &u32) -> Self {
self.add(*rhs)
}
}
@@ -1140,7 +1141,7 @@
impl AddAssign<&u32> for UVec3 {
#[inline]
fn add_assign(&mut self, rhs: &u32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1180,7 +1181,7 @@
}
}
-impl Sub<UVec3> for UVec3 {
+impl Sub for UVec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1192,10 +1193,10 @@
}
}
-impl Sub<&UVec3> for UVec3 {
- type Output = UVec3;
+impl Sub<&Self> for UVec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &UVec3) -> UVec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1216,19 +1217,19 @@
}
}
-impl SubAssign<UVec3> for UVec3 {
+impl SubAssign for UVec3 {
#[inline]
- fn sub_assign(&mut self, rhs: UVec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&UVec3> for UVec3 {
+impl SubAssign<&Self> for UVec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &UVec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1245,9 +1246,9 @@
}
impl Sub<&u32> for UVec3 {
- type Output = UVec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u32) -> UVec3 {
+ fn sub(self, rhs: &u32) -> Self {
self.sub(*rhs)
}
}
@@ -1280,7 +1281,7 @@
impl SubAssign<&u32> for UVec3 {
#[inline]
fn sub_assign(&mut self, rhs: &u32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1320,7 +1321,7 @@
}
}
-impl Rem<UVec3> for UVec3 {
+impl Rem for UVec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1332,10 +1333,10 @@
}
}
-impl Rem<&UVec3> for UVec3 {
- type Output = UVec3;
+impl Rem<&Self> for UVec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &UVec3) -> UVec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1356,7 +1357,7 @@
}
}
-impl RemAssign<UVec3> for UVec3 {
+impl RemAssign for UVec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1365,10 +1366,10 @@
}
}
-impl RemAssign<&UVec3> for UVec3 {
+impl RemAssign<&Self> for UVec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &UVec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1385,9 +1386,9 @@
}
impl Rem<&u32> for UVec3 {
- type Output = UVec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u32) -> UVec3 {
+ fn rem(self, rhs: &u32) -> Self {
self.rem(*rhs)
}
}
@@ -1420,7 +1421,7 @@
impl RemAssign<&u32> for UVec3 {
#[inline]
fn rem_assign(&mut self, rhs: &u32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1464,7 +1465,7 @@
impl AsRef<[u32; 3]> for UVec3 {
#[inline]
fn as_ref(&self) -> &[u32; 3] {
- unsafe { &*(self as *const UVec3 as *const [u32; 3]) }
+ unsafe { &*(self as *const Self as *const [u32; 3]) }
}
}
@@ -1472,7 +1473,7 @@
impl AsMut<[u32; 3]> for UVec3 {
#[inline]
fn as_mut(&mut self) -> &mut [u32; 3] {
- unsafe { &mut *(self as *mut UVec3 as *mut [u32; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [u32; 3]) }
}
}
@@ -1519,7 +1520,7 @@
impl Not for UVec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1528,6 +1529,14 @@
}
}
+impl Not for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn not(self) -> UVec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for UVec3 {
type Output = Self;
#[inline]
@@ -1540,6 +1549,44 @@
}
}
+impl BitAnd<&Self> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitand(self, rhs: &UVec3) -> UVec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitand(self, rhs: UVec3) -> UVec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for UVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for UVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for UVec3 {
type Output = Self;
#[inline]
@@ -1552,6 +1599,44 @@
}
}
+impl BitOr<&Self> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitor(self, rhs: &UVec3) -> UVec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitor(self, rhs: UVec3) -> UVec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for UVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for UVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for UVec3 {
type Output = Self;
#[inline]
@@ -1564,6 +1649,44 @@
}
}
+impl BitXor<&Self> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitxor(self, rhs: &UVec3) -> UVec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitxor(self, rhs: UVec3) -> UVec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for UVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for UVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u32> for UVec3 {
type Output = Self;
#[inline]
@@ -1576,6 +1699,44 @@
}
}
+impl BitAnd<&u32> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u32) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitand(self, rhs: &u32) -> UVec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitand(self, rhs: u32) -> UVec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u32> for UVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u32) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u32> for UVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u32) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u32> for UVec3 {
type Output = Self;
#[inline]
@@ -1588,6 +1749,44 @@
}
}
+impl BitOr<&u32> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u32) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitor(self, rhs: &u32) -> UVec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitor(self, rhs: u32) -> UVec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u32> for UVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u32) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u32> for UVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u32) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u32> for UVec3 {
type Output = Self;
#[inline]
@@ -1600,6 +1799,44 @@
}
}
+impl BitXor<&u32> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u32) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitxor(self, rhs: &u32) -> UVec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn bitxor(self, rhs: u32) -> UVec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u32> for UVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u32) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u32> for UVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u32) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for UVec3 {
type Output = Self;
#[inline]
@@ -1612,6 +1849,44 @@
}
}
+impl Shl<&i8> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for UVec3 {
type Output = Self;
#[inline]
@@ -1624,6 +1899,44 @@
}
}
+impl Shr<&i8> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for UVec3 {
type Output = Self;
#[inline]
@@ -1636,6 +1949,44 @@
}
}
+impl Shl<&i16> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for UVec3 {
type Output = Self;
#[inline]
@@ -1648,6 +1999,44 @@
}
}
+impl Shr<&i16> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for UVec3 {
type Output = Self;
#[inline]
@@ -1660,6 +2049,44 @@
}
}
+impl Shl<&i32> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for UVec3 {
type Output = Self;
#[inline]
@@ -1672,6 +2099,44 @@
}
}
+impl Shr<&i32> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for UVec3 {
type Output = Self;
#[inline]
@@ -1684,6 +2149,44 @@
}
}
+impl Shl<&i64> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for UVec3 {
type Output = Self;
#[inline]
@@ -1696,6 +2199,44 @@
}
}
+impl Shr<&i64> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for UVec3 {
type Output = Self;
#[inline]
@@ -1708,6 +2249,44 @@
}
}
+impl Shl<&u8> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for UVec3 {
type Output = Self;
#[inline]
@@ -1720,6 +2299,44 @@
}
}
+impl Shr<&u8> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for UVec3 {
type Output = Self;
#[inline]
@@ -1732,6 +2349,44 @@
}
}
+impl Shl<&u16> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for UVec3 {
type Output = Self;
#[inline]
@@ -1744,6 +2399,44 @@
}
}
+impl Shr<&u16> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for UVec3 {
type Output = Self;
#[inline]
@@ -1756,6 +2449,44 @@
}
}
+impl Shl<&u32> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for UVec3 {
type Output = Self;
#[inline]
@@ -1768,6 +2499,44 @@
}
}
+impl Shr<&u32> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for UVec3 {
type Output = Self;
#[inline]
@@ -1780,6 +2549,44 @@
}
}
+impl Shl<&u64> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for UVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for UVec3 {
type Output = Self;
#[inline]
@@ -1792,10 +2599,48 @@
}
}
-impl Shl<crate::IVec3> for UVec3 {
+impl Shr<&u64> for UVec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for UVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec3> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1804,10 +2649,34 @@
}
}
-impl Shr<crate::IVec3> for UVec3 {
+impl Shl<&IVec3> for UVec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &IVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec3> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1816,10 +2685,34 @@
}
}
-impl Shl<crate::UVec3> for UVec3 {
+impl Shr<&IVec3> for UVec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &IVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: Self) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1828,10 +2721,34 @@
}
}
-impl Shr<crate::UVec3> for UVec3 {
+impl Shl<&Self> for UVec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &Self) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> UVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> UVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: Self) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1840,6 +2757,30 @@
}
}
+impl Shr<&Self> for UVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &Self) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> UVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &UVec3 {
+ type Output = UVec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> UVec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for UVec3 {
type Output = u32;
#[inline]
diff --git a/crates/glam/src/u32/uvec4.rs b/crates/glam/src/u32/uvec4.rs
index d3d92c5..1ccbd31 100644
--- a/crates/glam/src/u32/uvec4.rs
+++ b/crates/glam/src/u32/uvec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -434,11 +435,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u32 {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> u32 {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -448,11 +449,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u32> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u32> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -460,13 +461,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u32 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u32 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -826,7 +827,7 @@
}
}
-impl Div<UVec4> for UVec4 {
+impl Div for UVec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -839,10 +840,10 @@
}
}
-impl Div<&UVec4> for UVec4 {
- type Output = UVec4;
+impl Div<&Self> for UVec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &UVec4) -> UVec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -863,7 +864,7 @@
}
}
-impl DivAssign<UVec4> for UVec4 {
+impl DivAssign for UVec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -873,10 +874,10 @@
}
}
-impl DivAssign<&UVec4> for UVec4 {
+impl DivAssign<&Self> for UVec4 {
#[inline]
- fn div_assign(&mut self, rhs: &UVec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -894,9 +895,9 @@
}
impl Div<&u32> for UVec4 {
- type Output = UVec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u32) -> UVec4 {
+ fn div(self, rhs: &u32) -> Self {
self.div(*rhs)
}
}
@@ -930,7 +931,7 @@
impl DivAssign<&u32> for UVec4 {
#[inline]
fn div_assign(&mut self, rhs: &u32) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -971,7 +972,7 @@
}
}
-impl Mul<UVec4> for UVec4 {
+impl Mul for UVec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -984,10 +985,10 @@
}
}
-impl Mul<&UVec4> for UVec4 {
- type Output = UVec4;
+impl Mul<&Self> for UVec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &UVec4) -> UVec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1008,7 +1009,7 @@
}
}
-impl MulAssign<UVec4> for UVec4 {
+impl MulAssign for UVec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1018,10 +1019,10 @@
}
}
-impl MulAssign<&UVec4> for UVec4 {
+impl MulAssign<&Self> for UVec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &UVec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1039,9 +1040,9 @@
}
impl Mul<&u32> for UVec4 {
- type Output = UVec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u32) -> UVec4 {
+ fn mul(self, rhs: &u32) -> Self {
self.mul(*rhs)
}
}
@@ -1075,7 +1076,7 @@
impl MulAssign<&u32> for UVec4 {
#[inline]
fn mul_assign(&mut self, rhs: &u32) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1116,7 +1117,7 @@
}
}
-impl Add<UVec4> for UVec4 {
+impl Add for UVec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1129,10 +1130,10 @@
}
}
-impl Add<&UVec4> for UVec4 {
- type Output = UVec4;
+impl Add<&Self> for UVec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &UVec4) -> UVec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1153,7 +1154,7 @@
}
}
-impl AddAssign<UVec4> for UVec4 {
+impl AddAssign for UVec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1163,10 +1164,10 @@
}
}
-impl AddAssign<&UVec4> for UVec4 {
+impl AddAssign<&Self> for UVec4 {
#[inline]
- fn add_assign(&mut self, rhs: &UVec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1184,9 +1185,9 @@
}
impl Add<&u32> for UVec4 {
- type Output = UVec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u32) -> UVec4 {
+ fn add(self, rhs: &u32) -> Self {
self.add(*rhs)
}
}
@@ -1220,7 +1221,7 @@
impl AddAssign<&u32> for UVec4 {
#[inline]
fn add_assign(&mut self, rhs: &u32) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1261,7 +1262,7 @@
}
}
-impl Sub<UVec4> for UVec4 {
+impl Sub for UVec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1274,10 +1275,10 @@
}
}
-impl Sub<&UVec4> for UVec4 {
- type Output = UVec4;
+impl Sub<&Self> for UVec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &UVec4) -> UVec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1298,9 +1299,9 @@
}
}
-impl SubAssign<UVec4> for UVec4 {
+impl SubAssign for UVec4 {
#[inline]
- fn sub_assign(&mut self, rhs: UVec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1308,10 +1309,10 @@
}
}
-impl SubAssign<&UVec4> for UVec4 {
+impl SubAssign<&Self> for UVec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &UVec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1329,9 +1330,9 @@
}
impl Sub<&u32> for UVec4 {
- type Output = UVec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u32) -> UVec4 {
+ fn sub(self, rhs: &u32) -> Self {
self.sub(*rhs)
}
}
@@ -1365,7 +1366,7 @@
impl SubAssign<&u32> for UVec4 {
#[inline]
fn sub_assign(&mut self, rhs: &u32) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1406,7 +1407,7 @@
}
}
-impl Rem<UVec4> for UVec4 {
+impl Rem for UVec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1419,10 +1420,10 @@
}
}
-impl Rem<&UVec4> for UVec4 {
- type Output = UVec4;
+impl Rem<&Self> for UVec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &UVec4) -> UVec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1443,7 +1444,7 @@
}
}
-impl RemAssign<UVec4> for UVec4 {
+impl RemAssign for UVec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1453,10 +1454,10 @@
}
}
-impl RemAssign<&UVec4> for UVec4 {
+impl RemAssign<&Self> for UVec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &UVec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1474,9 +1475,9 @@
}
impl Rem<&u32> for UVec4 {
- type Output = UVec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u32) -> UVec4 {
+ fn rem(self, rhs: &u32) -> Self {
self.rem(*rhs)
}
}
@@ -1510,7 +1511,7 @@
impl RemAssign<&u32> for UVec4 {
#[inline]
fn rem_assign(&mut self, rhs: &u32) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1555,7 +1556,7 @@
impl AsRef<[u32; 4]> for UVec4 {
#[inline]
fn as_ref(&self) -> &[u32; 4] {
- unsafe { &*(self as *const UVec4 as *const [u32; 4]) }
+ unsafe { &*(self as *const Self as *const [u32; 4]) }
}
}
@@ -1563,7 +1564,7 @@
impl AsMut<[u32; 4]> for UVec4 {
#[inline]
fn as_mut(&mut self) -> &mut [u32; 4] {
- unsafe { &mut *(self as *mut UVec4 as *mut [u32; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [u32; 4]) }
}
}
@@ -1610,7 +1611,7 @@
impl Not for UVec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1620,6 +1621,14 @@
}
}
+impl Not for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn not(self) -> UVec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for UVec4 {
type Output = Self;
#[inline]
@@ -1633,6 +1642,44 @@
}
}
+impl BitAnd<&Self> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitand(self, rhs: &UVec4) -> UVec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitand(self, rhs: UVec4) -> UVec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for UVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for UVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for UVec4 {
type Output = Self;
#[inline]
@@ -1646,6 +1693,44 @@
}
}
+impl BitOr<&Self> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitor(self, rhs: &UVec4) -> UVec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitor(self, rhs: UVec4) -> UVec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for UVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for UVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for UVec4 {
type Output = Self;
#[inline]
@@ -1659,6 +1744,44 @@
}
}
+impl BitXor<&Self> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitxor(self, rhs: &UVec4) -> UVec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitxor(self, rhs: UVec4) -> UVec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for UVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for UVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u32> for UVec4 {
type Output = Self;
#[inline]
@@ -1672,6 +1795,44 @@
}
}
+impl BitAnd<&u32> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u32) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitand(self, rhs: &u32) -> UVec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitand(self, rhs: u32) -> UVec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u32> for UVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u32) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u32> for UVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u32) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u32> for UVec4 {
type Output = Self;
#[inline]
@@ -1685,6 +1846,44 @@
}
}
+impl BitOr<&u32> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u32) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitor(self, rhs: &u32) -> UVec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitor(self, rhs: u32) -> UVec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u32> for UVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u32) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u32> for UVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u32) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u32> for UVec4 {
type Output = Self;
#[inline]
@@ -1698,6 +1897,44 @@
}
}
+impl BitXor<&u32> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u32) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitxor(self, rhs: &u32) -> UVec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn bitxor(self, rhs: u32) -> UVec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u32> for UVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u32) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u32> for UVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u32) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for UVec4 {
type Output = Self;
#[inline]
@@ -1711,6 +1948,44 @@
}
}
+impl Shl<&i8> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for UVec4 {
type Output = Self;
#[inline]
@@ -1724,6 +1999,44 @@
}
}
+impl Shr<&i8> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for UVec4 {
type Output = Self;
#[inline]
@@ -1737,6 +2050,44 @@
}
}
+impl Shl<&i16> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for UVec4 {
type Output = Self;
#[inline]
@@ -1750,6 +2101,44 @@
}
}
+impl Shr<&i16> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for UVec4 {
type Output = Self;
#[inline]
@@ -1763,6 +2152,44 @@
}
}
+impl Shl<&i32> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for UVec4 {
type Output = Self;
#[inline]
@@ -1776,6 +2203,44 @@
}
}
+impl Shr<&i32> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for UVec4 {
type Output = Self;
#[inline]
@@ -1789,6 +2254,44 @@
}
}
+impl Shl<&i64> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for UVec4 {
type Output = Self;
#[inline]
@@ -1802,6 +2305,44 @@
}
}
+impl Shr<&i64> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for UVec4 {
type Output = Self;
#[inline]
@@ -1815,6 +2356,44 @@
}
}
+impl Shl<&u8> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for UVec4 {
type Output = Self;
#[inline]
@@ -1828,6 +2407,44 @@
}
}
+impl Shr<&u8> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for UVec4 {
type Output = Self;
#[inline]
@@ -1841,6 +2458,44 @@
}
}
+impl Shl<&u16> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for UVec4 {
type Output = Self;
#[inline]
@@ -1854,6 +2509,44 @@
}
}
+impl Shr<&u16> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for UVec4 {
type Output = Self;
#[inline]
@@ -1867,6 +2560,44 @@
}
}
+impl Shl<&u32> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for UVec4 {
type Output = Self;
#[inline]
@@ -1880,6 +2611,44 @@
}
}
+impl Shr<&u32> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for UVec4 {
type Output = Self;
#[inline]
@@ -1893,6 +2662,44 @@
}
}
+impl Shl<&u64> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for UVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for UVec4 {
type Output = Self;
#[inline]
@@ -1906,10 +2713,48 @@
}
}
-impl Shl<crate::IVec4> for UVec4 {
+impl Shr<&u64> for UVec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for UVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec4> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1919,10 +2764,34 @@
}
}
-impl Shr<crate::IVec4> for UVec4 {
+impl Shl<&IVec4> for UVec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &IVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec4> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1932,10 +2801,34 @@
}
}
-impl Shl<crate::UVec4> for UVec4 {
+impl Shr<&IVec4> for UVec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &IVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: Self) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1945,10 +2838,34 @@
}
}
-impl Shr<crate::UVec4> for UVec4 {
+impl Shl<&Self> for UVec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &Self) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> UVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> UVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: Self) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1958,6 +2875,30 @@
}
}
+impl Shr<&Self> for UVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &Self) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> UVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &UVec4 {
+ type Output = UVec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> UVec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for UVec4 {
type Output = u32;
#[inline]
diff --git a/crates/glam/src/u64/u64vec2.rs b/crates/glam/src/u64/u64vec2.rs
index fc5f713..70f458e 100644
--- a/crates/glam/src/u64/u64vec2.rs
+++ b/crates/glam/src/u64/u64vec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -341,8 +342,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u64 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> u64 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -352,9 +353,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u64> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -362,9 +363,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u64 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u64 {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -658,7 +659,7 @@
}
}
-impl Div<U64Vec2> for U64Vec2 {
+impl Div for U64Vec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -669,10 +670,10 @@
}
}
-impl Div<&U64Vec2> for U64Vec2 {
- type Output = U64Vec2;
+impl Div<&Self> for U64Vec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U64Vec2) -> U64Vec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -693,7 +694,7 @@
}
}
-impl DivAssign<U64Vec2> for U64Vec2 {
+impl DivAssign for U64Vec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -701,10 +702,10 @@
}
}
-impl DivAssign<&U64Vec2> for U64Vec2 {
+impl DivAssign<&Self> for U64Vec2 {
#[inline]
- fn div_assign(&mut self, rhs: &U64Vec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -720,9 +721,9 @@
}
impl Div<&u64> for U64Vec2 {
- type Output = U64Vec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u64) -> U64Vec2 {
+ fn div(self, rhs: &u64) -> Self {
self.div(*rhs)
}
}
@@ -754,7 +755,7 @@
impl DivAssign<&u64> for U64Vec2 {
#[inline]
fn div_assign(&mut self, rhs: &u64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -793,7 +794,7 @@
}
}
-impl Mul<U64Vec2> for U64Vec2 {
+impl Mul for U64Vec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -804,10 +805,10 @@
}
}
-impl Mul<&U64Vec2> for U64Vec2 {
- type Output = U64Vec2;
+impl Mul<&Self> for U64Vec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U64Vec2) -> U64Vec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -828,7 +829,7 @@
}
}
-impl MulAssign<U64Vec2> for U64Vec2 {
+impl MulAssign for U64Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -836,10 +837,10 @@
}
}
-impl MulAssign<&U64Vec2> for U64Vec2 {
+impl MulAssign<&Self> for U64Vec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &U64Vec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -855,9 +856,9 @@
}
impl Mul<&u64> for U64Vec2 {
- type Output = U64Vec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u64) -> U64Vec2 {
+ fn mul(self, rhs: &u64) -> Self {
self.mul(*rhs)
}
}
@@ -889,7 +890,7 @@
impl MulAssign<&u64> for U64Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: &u64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -928,7 +929,7 @@
}
}
-impl Add<U64Vec2> for U64Vec2 {
+impl Add for U64Vec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -939,10 +940,10 @@
}
}
-impl Add<&U64Vec2> for U64Vec2 {
- type Output = U64Vec2;
+impl Add<&Self> for U64Vec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U64Vec2) -> U64Vec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -963,7 +964,7 @@
}
}
-impl AddAssign<U64Vec2> for U64Vec2 {
+impl AddAssign for U64Vec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -971,10 +972,10 @@
}
}
-impl AddAssign<&U64Vec2> for U64Vec2 {
+impl AddAssign<&Self> for U64Vec2 {
#[inline]
- fn add_assign(&mut self, rhs: &U64Vec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -990,9 +991,9 @@
}
impl Add<&u64> for U64Vec2 {
- type Output = U64Vec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u64) -> U64Vec2 {
+ fn add(self, rhs: &u64) -> Self {
self.add(*rhs)
}
}
@@ -1024,7 +1025,7 @@
impl AddAssign<&u64> for U64Vec2 {
#[inline]
fn add_assign(&mut self, rhs: &u64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1063,7 +1064,7 @@
}
}
-impl Sub<U64Vec2> for U64Vec2 {
+impl Sub for U64Vec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1074,10 +1075,10 @@
}
}
-impl Sub<&U64Vec2> for U64Vec2 {
- type Output = U64Vec2;
+impl Sub<&Self> for U64Vec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U64Vec2) -> U64Vec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1098,18 +1099,18 @@
}
}
-impl SubAssign<U64Vec2> for U64Vec2 {
+impl SubAssign for U64Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: U64Vec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&U64Vec2> for U64Vec2 {
+impl SubAssign<&Self> for U64Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &U64Vec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1125,9 +1126,9 @@
}
impl Sub<&u64> for U64Vec2 {
- type Output = U64Vec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u64) -> U64Vec2 {
+ fn sub(self, rhs: &u64) -> Self {
self.sub(*rhs)
}
}
@@ -1159,7 +1160,7 @@
impl SubAssign<&u64> for U64Vec2 {
#[inline]
fn sub_assign(&mut self, rhs: &u64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1198,7 +1199,7 @@
}
}
-impl Rem<U64Vec2> for U64Vec2 {
+impl Rem for U64Vec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1209,10 +1210,10 @@
}
}
-impl Rem<&U64Vec2> for U64Vec2 {
- type Output = U64Vec2;
+impl Rem<&Self> for U64Vec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U64Vec2) -> U64Vec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1233,7 +1234,7 @@
}
}
-impl RemAssign<U64Vec2> for U64Vec2 {
+impl RemAssign for U64Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1241,10 +1242,10 @@
}
}
-impl RemAssign<&U64Vec2> for U64Vec2 {
+impl RemAssign<&Self> for U64Vec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &U64Vec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1260,9 +1261,9 @@
}
impl Rem<&u64> for U64Vec2 {
- type Output = U64Vec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u64) -> U64Vec2 {
+ fn rem(self, rhs: &u64) -> Self {
self.rem(*rhs)
}
}
@@ -1294,7 +1295,7 @@
impl RemAssign<&u64> for U64Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: &u64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1337,7 +1338,7 @@
impl AsRef<[u64; 2]> for U64Vec2 {
#[inline]
fn as_ref(&self) -> &[u64; 2] {
- unsafe { &*(self as *const U64Vec2 as *const [u64; 2]) }
+ unsafe { &*(self as *const Self as *const [u64; 2]) }
}
}
@@ -1345,7 +1346,7 @@
impl AsMut<[u64; 2]> for U64Vec2 {
#[inline]
fn as_mut(&mut self) -> &mut [u64; 2] {
- unsafe { &mut *(self as *mut U64Vec2 as *mut [u64; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [u64; 2]) }
}
}
@@ -1392,7 +1393,7 @@
impl Not for U64Vec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1400,6 +1401,14 @@
}
}
+impl Not for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn not(self) -> U64Vec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U64Vec2 {
type Output = Self;
#[inline]
@@ -1411,6 +1420,44 @@
}
}
+impl BitAnd<&Self> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U64Vec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitand(self, rhs: &U64Vec2) -> U64Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U64Vec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitand(self, rhs: U64Vec2) -> U64Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U64Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U64Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U64Vec2 {
type Output = Self;
#[inline]
@@ -1422,6 +1469,44 @@
}
}
+impl BitOr<&Self> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U64Vec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitor(self, rhs: &U64Vec2) -> U64Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U64Vec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitor(self, rhs: U64Vec2) -> U64Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U64Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U64Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U64Vec2 {
type Output = Self;
#[inline]
@@ -1433,6 +1518,44 @@
}
}
+impl BitXor<&Self> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U64Vec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &U64Vec2) -> U64Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U64Vec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitxor(self, rhs: U64Vec2) -> U64Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U64Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U64Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u64> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1444,6 +1567,44 @@
}
}
+impl BitAnd<&u64> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u64) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitand(self, rhs: &u64) -> U64Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitand(self, rhs: u64) -> U64Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u64> for U64Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u64) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u64> for U64Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u64) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u64> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1455,6 +1616,44 @@
}
}
+impl BitOr<&u64> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u64) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitor(self, rhs: &u64) -> U64Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitor(self, rhs: u64) -> U64Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u64> for U64Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u64) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u64> for U64Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u64) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u64> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1466,6 +1665,44 @@
}
}
+impl BitXor<&u64> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u64) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &u64) -> U64Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn bitxor(self, rhs: u64) -> U64Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u64> for U64Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u64) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u64> for U64Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u64) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1477,6 +1714,44 @@
}
}
+impl Shl<&i8> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1488,6 +1763,44 @@
}
}
+impl Shr<&i8> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1499,6 +1812,44 @@
}
}
+impl Shl<&i16> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1510,6 +1861,44 @@
}
}
+impl Shr<&i16> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1521,6 +1910,44 @@
}
}
+impl Shl<&i32> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1532,6 +1959,44 @@
}
}
+impl Shr<&i32> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1543,6 +2008,44 @@
}
}
+impl Shl<&i64> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1554,6 +2057,44 @@
}
}
+impl Shr<&i64> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1565,6 +2106,44 @@
}
}
+impl Shl<&u8> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1576,6 +2155,44 @@
}
}
+impl Shr<&u8> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1587,6 +2204,44 @@
}
}
+impl Shl<&u16> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1598,6 +2253,44 @@
}
}
+impl Shr<&u16> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1609,6 +2302,44 @@
}
}
+impl Shl<&u32> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1620,6 +2351,44 @@
}
}
+impl Shr<&u32> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1631,6 +2400,44 @@
}
}
+impl Shl<&u64> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U64Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U64Vec2 {
type Output = Self;
#[inline]
@@ -1642,10 +2449,48 @@
}
}
-impl Shl<crate::IVec2> for U64Vec2 {
+impl Shr<&u64> for U64Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U64Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec2> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1653,10 +2498,34 @@
}
}
-impl Shr<crate::IVec2> for U64Vec2 {
+impl Shl<&IVec2> for U64Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &IVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec2> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1664,10 +2533,34 @@
}
}
-impl Shl<crate::UVec2> for U64Vec2 {
+impl Shr<&IVec2> for U64Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &IVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec2> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1675,10 +2568,34 @@
}
}
-impl Shr<crate::UVec2> for U64Vec2 {
+impl Shl<&UVec2> for U64Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &UVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> U64Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> U64Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec2> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1686,6 +2603,30 @@
}
}
+impl Shr<&UVec2> for U64Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> U64Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &U64Vec2 {
+ type Output = U64Vec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> U64Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U64Vec2 {
type Output = u64;
#[inline]
diff --git a/crates/glam/src/u64/u64vec3.rs b/crates/glam/src/u64/u64vec3.rs
index c53b4ec..0069d4b 100644
--- a/crates/glam/src/u64/u64vec3.rs
+++ b/crates/glam/src/u64/u64vec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct U64Vec3 {
@@ -401,8 +402,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u64 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> u64 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -412,10 +413,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u64> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -423,12 +424,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u64 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u64 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -760,7 +761,7 @@
}
}
-impl Div<U64Vec3> for U64Vec3 {
+impl Div for U64Vec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -772,10 +773,10 @@
}
}
-impl Div<&U64Vec3> for U64Vec3 {
- type Output = U64Vec3;
+impl Div<&Self> for U64Vec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U64Vec3) -> U64Vec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -796,7 +797,7 @@
}
}
-impl DivAssign<U64Vec3> for U64Vec3 {
+impl DivAssign for U64Vec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -805,10 +806,10 @@
}
}
-impl DivAssign<&U64Vec3> for U64Vec3 {
+impl DivAssign<&Self> for U64Vec3 {
#[inline]
- fn div_assign(&mut self, rhs: &U64Vec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -825,9 +826,9 @@
}
impl Div<&u64> for U64Vec3 {
- type Output = U64Vec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u64) -> U64Vec3 {
+ fn div(self, rhs: &u64) -> Self {
self.div(*rhs)
}
}
@@ -860,7 +861,7 @@
impl DivAssign<&u64> for U64Vec3 {
#[inline]
fn div_assign(&mut self, rhs: &u64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -900,7 +901,7 @@
}
}
-impl Mul<U64Vec3> for U64Vec3 {
+impl Mul for U64Vec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -912,10 +913,10 @@
}
}
-impl Mul<&U64Vec3> for U64Vec3 {
- type Output = U64Vec3;
+impl Mul<&Self> for U64Vec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U64Vec3) -> U64Vec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -936,7 +937,7 @@
}
}
-impl MulAssign<U64Vec3> for U64Vec3 {
+impl MulAssign for U64Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -945,10 +946,10 @@
}
}
-impl MulAssign<&U64Vec3> for U64Vec3 {
+impl MulAssign<&Self> for U64Vec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &U64Vec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -965,9 +966,9 @@
}
impl Mul<&u64> for U64Vec3 {
- type Output = U64Vec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u64) -> U64Vec3 {
+ fn mul(self, rhs: &u64) -> Self {
self.mul(*rhs)
}
}
@@ -1000,7 +1001,7 @@
impl MulAssign<&u64> for U64Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: &u64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1040,7 +1041,7 @@
}
}
-impl Add<U64Vec3> for U64Vec3 {
+impl Add for U64Vec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1052,10 +1053,10 @@
}
}
-impl Add<&U64Vec3> for U64Vec3 {
- type Output = U64Vec3;
+impl Add<&Self> for U64Vec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U64Vec3) -> U64Vec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1076,7 +1077,7 @@
}
}
-impl AddAssign<U64Vec3> for U64Vec3 {
+impl AddAssign for U64Vec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1085,10 +1086,10 @@
}
}
-impl AddAssign<&U64Vec3> for U64Vec3 {
+impl AddAssign<&Self> for U64Vec3 {
#[inline]
- fn add_assign(&mut self, rhs: &U64Vec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1105,9 +1106,9 @@
}
impl Add<&u64> for U64Vec3 {
- type Output = U64Vec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u64) -> U64Vec3 {
+ fn add(self, rhs: &u64) -> Self {
self.add(*rhs)
}
}
@@ -1140,7 +1141,7 @@
impl AddAssign<&u64> for U64Vec3 {
#[inline]
fn add_assign(&mut self, rhs: &u64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1180,7 +1181,7 @@
}
}
-impl Sub<U64Vec3> for U64Vec3 {
+impl Sub for U64Vec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1192,10 +1193,10 @@
}
}
-impl Sub<&U64Vec3> for U64Vec3 {
- type Output = U64Vec3;
+impl Sub<&Self> for U64Vec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U64Vec3) -> U64Vec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1216,19 +1217,19 @@
}
}
-impl SubAssign<U64Vec3> for U64Vec3 {
+impl SubAssign for U64Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: U64Vec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&U64Vec3> for U64Vec3 {
+impl SubAssign<&Self> for U64Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &U64Vec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1245,9 +1246,9 @@
}
impl Sub<&u64> for U64Vec3 {
- type Output = U64Vec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u64) -> U64Vec3 {
+ fn sub(self, rhs: &u64) -> Self {
self.sub(*rhs)
}
}
@@ -1280,7 +1281,7 @@
impl SubAssign<&u64> for U64Vec3 {
#[inline]
fn sub_assign(&mut self, rhs: &u64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1320,7 +1321,7 @@
}
}
-impl Rem<U64Vec3> for U64Vec3 {
+impl Rem for U64Vec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1332,10 +1333,10 @@
}
}
-impl Rem<&U64Vec3> for U64Vec3 {
- type Output = U64Vec3;
+impl Rem<&Self> for U64Vec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U64Vec3) -> U64Vec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1356,7 +1357,7 @@
}
}
-impl RemAssign<U64Vec3> for U64Vec3 {
+impl RemAssign for U64Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1365,10 +1366,10 @@
}
}
-impl RemAssign<&U64Vec3> for U64Vec3 {
+impl RemAssign<&Self> for U64Vec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &U64Vec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1385,9 +1386,9 @@
}
impl Rem<&u64> for U64Vec3 {
- type Output = U64Vec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u64) -> U64Vec3 {
+ fn rem(self, rhs: &u64) -> Self {
self.rem(*rhs)
}
}
@@ -1420,7 +1421,7 @@
impl RemAssign<&u64> for U64Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: &u64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1464,7 +1465,7 @@
impl AsRef<[u64; 3]> for U64Vec3 {
#[inline]
fn as_ref(&self) -> &[u64; 3] {
- unsafe { &*(self as *const U64Vec3 as *const [u64; 3]) }
+ unsafe { &*(self as *const Self as *const [u64; 3]) }
}
}
@@ -1472,7 +1473,7 @@
impl AsMut<[u64; 3]> for U64Vec3 {
#[inline]
fn as_mut(&mut self) -> &mut [u64; 3] {
- unsafe { &mut *(self as *mut U64Vec3 as *mut [u64; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [u64; 3]) }
}
}
@@ -1519,7 +1520,7 @@
impl Not for U64Vec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1528,6 +1529,14 @@
}
}
+impl Not for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn not(self) -> U64Vec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U64Vec3 {
type Output = Self;
#[inline]
@@ -1540,6 +1549,44 @@
}
}
+impl BitAnd<&Self> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U64Vec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitand(self, rhs: &U64Vec3) -> U64Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U64Vec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitand(self, rhs: U64Vec3) -> U64Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U64Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U64Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U64Vec3 {
type Output = Self;
#[inline]
@@ -1552,6 +1599,44 @@
}
}
+impl BitOr<&Self> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U64Vec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitor(self, rhs: &U64Vec3) -> U64Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U64Vec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitor(self, rhs: U64Vec3) -> U64Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U64Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U64Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U64Vec3 {
type Output = Self;
#[inline]
@@ -1564,6 +1649,44 @@
}
}
+impl BitXor<&Self> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U64Vec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &U64Vec3) -> U64Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U64Vec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitxor(self, rhs: U64Vec3) -> U64Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U64Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U64Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u64> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1576,6 +1699,44 @@
}
}
+impl BitAnd<&u64> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u64) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitand(self, rhs: &u64) -> U64Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitand(self, rhs: u64) -> U64Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u64> for U64Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u64) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u64> for U64Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u64) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u64> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1588,6 +1749,44 @@
}
}
+impl BitOr<&u64> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u64) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitor(self, rhs: &u64) -> U64Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitor(self, rhs: u64) -> U64Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u64> for U64Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u64) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u64> for U64Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u64) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u64> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1600,6 +1799,44 @@
}
}
+impl BitXor<&u64> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u64) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &u64) -> U64Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn bitxor(self, rhs: u64) -> U64Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u64> for U64Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u64) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u64> for U64Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u64) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1612,6 +1849,44 @@
}
}
+impl Shl<&i8> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1624,6 +1899,44 @@
}
}
+impl Shr<&i8> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1636,6 +1949,44 @@
}
}
+impl Shl<&i16> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1648,6 +1999,44 @@
}
}
+impl Shr<&i16> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1660,6 +2049,44 @@
}
}
+impl Shl<&i32> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1672,6 +2099,44 @@
}
}
+impl Shr<&i32> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1684,6 +2149,44 @@
}
}
+impl Shl<&i64> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1696,6 +2199,44 @@
}
}
+impl Shr<&i64> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1708,6 +2249,44 @@
}
}
+impl Shl<&u8> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1720,6 +2299,44 @@
}
}
+impl Shr<&u8> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1732,6 +2349,44 @@
}
}
+impl Shl<&u16> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1744,6 +2399,44 @@
}
}
+impl Shr<&u16> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1756,6 +2449,44 @@
}
}
+impl Shl<&u32> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1768,6 +2499,44 @@
}
}
+impl Shr<&u32> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1780,6 +2549,44 @@
}
}
+impl Shl<&u64> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U64Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U64Vec3 {
type Output = Self;
#[inline]
@@ -1792,10 +2599,48 @@
}
}
-impl Shl<crate::IVec3> for U64Vec3 {
+impl Shr<&u64> for U64Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U64Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec3> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1804,10 +2649,34 @@
}
}
-impl Shr<crate::IVec3> for U64Vec3 {
+impl Shl<&IVec3> for U64Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &IVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec3> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1816,10 +2685,34 @@
}
}
-impl Shl<crate::UVec3> for U64Vec3 {
+impl Shr<&IVec3> for U64Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &IVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec3> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1828,10 +2721,34 @@
}
}
-impl Shr<crate::UVec3> for U64Vec3 {
+impl Shl<&UVec3> for U64Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &UVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> U64Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> U64Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec3> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1840,6 +2757,30 @@
}
}
+impl Shr<&UVec3> for U64Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> U64Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &U64Vec3 {
+ type Output = U64Vec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> U64Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U64Vec3 {
type Output = u64;
#[inline]
diff --git a/crates/glam/src/u64/u64vec4.rs b/crates/glam/src/u64/u64vec4.rs
index 2cfcc8a..655ecff 100644
--- a/crates/glam/src/u64/u64vec4.rs
+++ b/crates/glam/src/u64/u64vec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -434,11 +435,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u64 {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> u64 {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -448,11 +449,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u64> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -460,13 +461,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u64 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u64 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -826,7 +827,7 @@
}
}
-impl Div<U64Vec4> for U64Vec4 {
+impl Div for U64Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -839,10 +840,10 @@
}
}
-impl Div<&U64Vec4> for U64Vec4 {
- type Output = U64Vec4;
+impl Div<&Self> for U64Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U64Vec4) -> U64Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -863,7 +864,7 @@
}
}
-impl DivAssign<U64Vec4> for U64Vec4 {
+impl DivAssign for U64Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -873,10 +874,10 @@
}
}
-impl DivAssign<&U64Vec4> for U64Vec4 {
+impl DivAssign<&Self> for U64Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &U64Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -894,9 +895,9 @@
}
impl Div<&u64> for U64Vec4 {
- type Output = U64Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u64) -> U64Vec4 {
+ fn div(self, rhs: &u64) -> Self {
self.div(*rhs)
}
}
@@ -930,7 +931,7 @@
impl DivAssign<&u64> for U64Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &u64) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -971,7 +972,7 @@
}
}
-impl Mul<U64Vec4> for U64Vec4 {
+impl Mul for U64Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -984,10 +985,10 @@
}
}
-impl Mul<&U64Vec4> for U64Vec4 {
- type Output = U64Vec4;
+impl Mul<&Self> for U64Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U64Vec4) -> U64Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1008,7 +1009,7 @@
}
}
-impl MulAssign<U64Vec4> for U64Vec4 {
+impl MulAssign for U64Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1018,10 +1019,10 @@
}
}
-impl MulAssign<&U64Vec4> for U64Vec4 {
+impl MulAssign<&Self> for U64Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &U64Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1039,9 +1040,9 @@
}
impl Mul<&u64> for U64Vec4 {
- type Output = U64Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u64) -> U64Vec4 {
+ fn mul(self, rhs: &u64) -> Self {
self.mul(*rhs)
}
}
@@ -1075,7 +1076,7 @@
impl MulAssign<&u64> for U64Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &u64) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1116,7 +1117,7 @@
}
}
-impl Add<U64Vec4> for U64Vec4 {
+impl Add for U64Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1129,10 +1130,10 @@
}
}
-impl Add<&U64Vec4> for U64Vec4 {
- type Output = U64Vec4;
+impl Add<&Self> for U64Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U64Vec4) -> U64Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1153,7 +1154,7 @@
}
}
-impl AddAssign<U64Vec4> for U64Vec4 {
+impl AddAssign for U64Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1163,10 +1164,10 @@
}
}
-impl AddAssign<&U64Vec4> for U64Vec4 {
+impl AddAssign<&Self> for U64Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &U64Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1184,9 +1185,9 @@
}
impl Add<&u64> for U64Vec4 {
- type Output = U64Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u64) -> U64Vec4 {
+ fn add(self, rhs: &u64) -> Self {
self.add(*rhs)
}
}
@@ -1220,7 +1221,7 @@
impl AddAssign<&u64> for U64Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &u64) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1261,7 +1262,7 @@
}
}
-impl Sub<U64Vec4> for U64Vec4 {
+impl Sub for U64Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1274,10 +1275,10 @@
}
}
-impl Sub<&U64Vec4> for U64Vec4 {
- type Output = U64Vec4;
+impl Sub<&Self> for U64Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U64Vec4) -> U64Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1298,9 +1299,9 @@
}
}
-impl SubAssign<U64Vec4> for U64Vec4 {
+impl SubAssign for U64Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: U64Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1308,10 +1309,10 @@
}
}
-impl SubAssign<&U64Vec4> for U64Vec4 {
+impl SubAssign<&Self> for U64Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &U64Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1329,9 +1330,9 @@
}
impl Sub<&u64> for U64Vec4 {
- type Output = U64Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u64) -> U64Vec4 {
+ fn sub(self, rhs: &u64) -> Self {
self.sub(*rhs)
}
}
@@ -1365,7 +1366,7 @@
impl SubAssign<&u64> for U64Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &u64) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1406,7 +1407,7 @@
}
}
-impl Rem<U64Vec4> for U64Vec4 {
+impl Rem for U64Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1419,10 +1420,10 @@
}
}
-impl Rem<&U64Vec4> for U64Vec4 {
- type Output = U64Vec4;
+impl Rem<&Self> for U64Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U64Vec4) -> U64Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1443,7 +1444,7 @@
}
}
-impl RemAssign<U64Vec4> for U64Vec4 {
+impl RemAssign for U64Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1453,10 +1454,10 @@
}
}
-impl RemAssign<&U64Vec4> for U64Vec4 {
+impl RemAssign<&Self> for U64Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &U64Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1474,9 +1475,9 @@
}
impl Rem<&u64> for U64Vec4 {
- type Output = U64Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u64) -> U64Vec4 {
+ fn rem(self, rhs: &u64) -> Self {
self.rem(*rhs)
}
}
@@ -1510,7 +1511,7 @@
impl RemAssign<&u64> for U64Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &u64) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1555,7 +1556,7 @@
impl AsRef<[u64; 4]> for U64Vec4 {
#[inline]
fn as_ref(&self) -> &[u64; 4] {
- unsafe { &*(self as *const U64Vec4 as *const [u64; 4]) }
+ unsafe { &*(self as *const Self as *const [u64; 4]) }
}
}
@@ -1563,7 +1564,7 @@
impl AsMut<[u64; 4]> for U64Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [u64; 4] {
- unsafe { &mut *(self as *mut U64Vec4 as *mut [u64; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [u64; 4]) }
}
}
@@ -1610,7 +1611,7 @@
impl Not for U64Vec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1620,6 +1621,14 @@
}
}
+impl Not for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn not(self) -> U64Vec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U64Vec4 {
type Output = Self;
#[inline]
@@ -1633,6 +1642,44 @@
}
}
+impl BitAnd<&Self> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U64Vec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitand(self, rhs: &U64Vec4) -> U64Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U64Vec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitand(self, rhs: U64Vec4) -> U64Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U64Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U64Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U64Vec4 {
type Output = Self;
#[inline]
@@ -1646,6 +1693,44 @@
}
}
+impl BitOr<&Self> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U64Vec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitor(self, rhs: &U64Vec4) -> U64Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U64Vec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitor(self, rhs: U64Vec4) -> U64Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U64Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U64Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U64Vec4 {
type Output = Self;
#[inline]
@@ -1659,6 +1744,44 @@
}
}
+impl BitXor<&Self> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U64Vec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &U64Vec4) -> U64Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U64Vec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitxor(self, rhs: U64Vec4) -> U64Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U64Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U64Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u64> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1672,6 +1795,44 @@
}
}
+impl BitAnd<&u64> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u64) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitand(self, rhs: &u64) -> U64Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitand(self, rhs: u64) -> U64Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u64> for U64Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u64) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u64> for U64Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u64) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u64> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1685,6 +1846,44 @@
}
}
+impl BitOr<&u64> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u64) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitor(self, rhs: &u64) -> U64Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitor(self, rhs: u64) -> U64Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u64> for U64Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u64) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u64> for U64Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u64) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u64> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1698,6 +1897,44 @@
}
}
+impl BitXor<&u64> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u64) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &u64) -> U64Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn bitxor(self, rhs: u64) -> U64Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u64> for U64Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u64) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u64> for U64Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u64) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1711,6 +1948,44 @@
}
}
+impl Shl<&i8> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1724,6 +1999,44 @@
}
}
+impl Shr<&i8> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1737,6 +2050,44 @@
}
}
+impl Shl<&i16> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1750,6 +2101,44 @@
}
}
+impl Shr<&i16> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1763,6 +2152,44 @@
}
}
+impl Shl<&i32> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1776,6 +2203,44 @@
}
}
+impl Shr<&i32> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1789,6 +2254,44 @@
}
}
+impl Shl<&i64> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1802,6 +2305,44 @@
}
}
+impl Shr<&i64> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1815,6 +2356,44 @@
}
}
+impl Shl<&u8> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1828,6 +2407,44 @@
}
}
+impl Shr<&u8> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1841,6 +2458,44 @@
}
}
+impl Shl<&u16> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1854,6 +2509,44 @@
}
}
+impl Shr<&u16> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1867,6 +2560,44 @@
}
}
+impl Shl<&u32> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1880,6 +2611,44 @@
}
}
+impl Shr<&u32> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1893,6 +2662,44 @@
}
}
+impl Shl<&u64> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U64Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U64Vec4 {
type Output = Self;
#[inline]
@@ -1906,10 +2713,48 @@
}
}
-impl Shl<crate::IVec4> for U64Vec4 {
+impl Shr<&u64> for U64Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U64Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec4> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1919,10 +2764,34 @@
}
}
-impl Shr<crate::IVec4> for U64Vec4 {
+impl Shl<&IVec4> for U64Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &IVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec4> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1932,10 +2801,34 @@
}
}
-impl Shl<crate::UVec4> for U64Vec4 {
+impl Shr<&IVec4> for U64Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &IVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec4> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1945,10 +2838,34 @@
}
}
-impl Shr<crate::UVec4> for U64Vec4 {
+impl Shl<&UVec4> for U64Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &UVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> U64Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> U64Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec4> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1958,6 +2875,30 @@
}
}
+impl Shr<&UVec4> for U64Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> U64Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &U64Vec4 {
+ type Output = U64Vec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> U64Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U64Vec4 {
type Output = u64;
#[inline]
diff --git a/crates/glam/src/u8/u8vec2.rs b/crates/glam/src/u8/u8vec2.rs
index 0732044..3602e1e 100644
--- a/crates/glam/src/u8/u8vec2.rs
+++ b/crates/glam/src/u8/u8vec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(2)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -341,8 +342,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u8 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> u8 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -352,9 +353,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u8> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u8> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -362,9 +363,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u8 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u8 {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -658,7 +659,7 @@
}
}
-impl Div<U8Vec2> for U8Vec2 {
+impl Div for U8Vec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -669,10 +670,10 @@
}
}
-impl Div<&U8Vec2> for U8Vec2 {
- type Output = U8Vec2;
+impl Div<&Self> for U8Vec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U8Vec2) -> U8Vec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -693,7 +694,7 @@
}
}
-impl DivAssign<U8Vec2> for U8Vec2 {
+impl DivAssign for U8Vec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -701,10 +702,10 @@
}
}
-impl DivAssign<&U8Vec2> for U8Vec2 {
+impl DivAssign<&Self> for U8Vec2 {
#[inline]
- fn div_assign(&mut self, rhs: &U8Vec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -720,9 +721,9 @@
}
impl Div<&u8> for U8Vec2 {
- type Output = U8Vec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u8) -> U8Vec2 {
+ fn div(self, rhs: &u8) -> Self {
self.div(*rhs)
}
}
@@ -754,7 +755,7 @@
impl DivAssign<&u8> for U8Vec2 {
#[inline]
fn div_assign(&mut self, rhs: &u8) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -793,7 +794,7 @@
}
}
-impl Mul<U8Vec2> for U8Vec2 {
+impl Mul for U8Vec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -804,10 +805,10 @@
}
}
-impl Mul<&U8Vec2> for U8Vec2 {
- type Output = U8Vec2;
+impl Mul<&Self> for U8Vec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U8Vec2) -> U8Vec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -828,7 +829,7 @@
}
}
-impl MulAssign<U8Vec2> for U8Vec2 {
+impl MulAssign for U8Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -836,10 +837,10 @@
}
}
-impl MulAssign<&U8Vec2> for U8Vec2 {
+impl MulAssign<&Self> for U8Vec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &U8Vec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -855,9 +856,9 @@
}
impl Mul<&u8> for U8Vec2 {
- type Output = U8Vec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u8) -> U8Vec2 {
+ fn mul(self, rhs: &u8) -> Self {
self.mul(*rhs)
}
}
@@ -889,7 +890,7 @@
impl MulAssign<&u8> for U8Vec2 {
#[inline]
fn mul_assign(&mut self, rhs: &u8) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -928,7 +929,7 @@
}
}
-impl Add<U8Vec2> for U8Vec2 {
+impl Add for U8Vec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -939,10 +940,10 @@
}
}
-impl Add<&U8Vec2> for U8Vec2 {
- type Output = U8Vec2;
+impl Add<&Self> for U8Vec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U8Vec2) -> U8Vec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -963,7 +964,7 @@
}
}
-impl AddAssign<U8Vec2> for U8Vec2 {
+impl AddAssign for U8Vec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -971,10 +972,10 @@
}
}
-impl AddAssign<&U8Vec2> for U8Vec2 {
+impl AddAssign<&Self> for U8Vec2 {
#[inline]
- fn add_assign(&mut self, rhs: &U8Vec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -990,9 +991,9 @@
}
impl Add<&u8> for U8Vec2 {
- type Output = U8Vec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u8) -> U8Vec2 {
+ fn add(self, rhs: &u8) -> Self {
self.add(*rhs)
}
}
@@ -1024,7 +1025,7 @@
impl AddAssign<&u8> for U8Vec2 {
#[inline]
fn add_assign(&mut self, rhs: &u8) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1063,7 +1064,7 @@
}
}
-impl Sub<U8Vec2> for U8Vec2 {
+impl Sub for U8Vec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1074,10 +1075,10 @@
}
}
-impl Sub<&U8Vec2> for U8Vec2 {
- type Output = U8Vec2;
+impl Sub<&Self> for U8Vec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U8Vec2) -> U8Vec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1098,18 +1099,18 @@
}
}
-impl SubAssign<U8Vec2> for U8Vec2 {
+impl SubAssign for U8Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: U8Vec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&U8Vec2> for U8Vec2 {
+impl SubAssign<&Self> for U8Vec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &U8Vec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1125,9 +1126,9 @@
}
impl Sub<&u8> for U8Vec2 {
- type Output = U8Vec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u8) -> U8Vec2 {
+ fn sub(self, rhs: &u8) -> Self {
self.sub(*rhs)
}
}
@@ -1159,7 +1160,7 @@
impl SubAssign<&u8> for U8Vec2 {
#[inline]
fn sub_assign(&mut self, rhs: &u8) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1198,7 +1199,7 @@
}
}
-impl Rem<U8Vec2> for U8Vec2 {
+impl Rem for U8Vec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1209,10 +1210,10 @@
}
}
-impl Rem<&U8Vec2> for U8Vec2 {
- type Output = U8Vec2;
+impl Rem<&Self> for U8Vec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U8Vec2) -> U8Vec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1233,7 +1234,7 @@
}
}
-impl RemAssign<U8Vec2> for U8Vec2 {
+impl RemAssign for U8Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1241,10 +1242,10 @@
}
}
-impl RemAssign<&U8Vec2> for U8Vec2 {
+impl RemAssign<&Self> for U8Vec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &U8Vec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1260,9 +1261,9 @@
}
impl Rem<&u8> for U8Vec2 {
- type Output = U8Vec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u8) -> U8Vec2 {
+ fn rem(self, rhs: &u8) -> Self {
self.rem(*rhs)
}
}
@@ -1294,7 +1295,7 @@
impl RemAssign<&u8> for U8Vec2 {
#[inline]
fn rem_assign(&mut self, rhs: &u8) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1337,7 +1338,7 @@
impl AsRef<[u8; 2]> for U8Vec2 {
#[inline]
fn as_ref(&self) -> &[u8; 2] {
- unsafe { &*(self as *const U8Vec2 as *const [u8; 2]) }
+ unsafe { &*(self as *const Self as *const [u8; 2]) }
}
}
@@ -1345,7 +1346,7 @@
impl AsMut<[u8; 2]> for U8Vec2 {
#[inline]
fn as_mut(&mut self) -> &mut [u8; 2] {
- unsafe { &mut *(self as *mut U8Vec2 as *mut [u8; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [u8; 2]) }
}
}
@@ -1392,7 +1393,7 @@
impl Not for U8Vec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1400,6 +1401,14 @@
}
}
+impl Not for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn not(self) -> U8Vec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U8Vec2 {
type Output = Self;
#[inline]
@@ -1411,6 +1420,44 @@
}
}
+impl BitAnd<&Self> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U8Vec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitand(self, rhs: &U8Vec2) -> U8Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U8Vec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitand(self, rhs: U8Vec2) -> U8Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U8Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U8Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U8Vec2 {
type Output = Self;
#[inline]
@@ -1422,6 +1469,44 @@
}
}
+impl BitOr<&Self> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U8Vec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitor(self, rhs: &U8Vec2) -> U8Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U8Vec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitor(self, rhs: U8Vec2) -> U8Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U8Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U8Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U8Vec2 {
type Output = Self;
#[inline]
@@ -1433,6 +1518,44 @@
}
}
+impl BitXor<&Self> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U8Vec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &U8Vec2) -> U8Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U8Vec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitxor(self, rhs: U8Vec2) -> U8Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U8Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U8Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u8> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1444,6 +1567,44 @@
}
}
+impl BitAnd<&u8> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u8) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitand(self, rhs: &u8) -> U8Vec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitand(self, rhs: u8) -> U8Vec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u8> for U8Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u8) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u8> for U8Vec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u8) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u8> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1455,6 +1616,44 @@
}
}
+impl BitOr<&u8> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u8) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitor(self, rhs: &u8) -> U8Vec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitor(self, rhs: u8) -> U8Vec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u8> for U8Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u8) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u8> for U8Vec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u8) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u8> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1466,6 +1665,44 @@
}
}
+impl BitXor<&u8> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u8) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitxor(self, rhs: &u8) -> U8Vec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn bitxor(self, rhs: u8) -> U8Vec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u8> for U8Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u8) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u8> for U8Vec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u8) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1477,6 +1714,44 @@
}
}
+impl Shl<&i8> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1488,6 +1763,44 @@
}
}
+impl Shr<&i8> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1499,6 +1812,44 @@
}
}
+impl Shl<&i16> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1510,6 +1861,44 @@
}
}
+impl Shr<&i16> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1521,6 +1910,44 @@
}
}
+impl Shl<&i32> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1532,6 +1959,44 @@
}
}
+impl Shr<&i32> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1543,6 +2008,44 @@
}
}
+impl Shl<&i64> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1554,6 +2057,44 @@
}
}
+impl Shr<&i64> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1565,6 +2106,44 @@
}
}
+impl Shl<&u8> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1576,6 +2155,44 @@
}
}
+impl Shr<&u8> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1587,6 +2204,44 @@
}
}
+impl Shl<&u16> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1598,6 +2253,44 @@
}
}
+impl Shr<&u16> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1609,6 +2302,44 @@
}
}
+impl Shl<&u32> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1620,6 +2351,44 @@
}
}
+impl Shr<&u32> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1631,6 +2400,44 @@
}
}
+impl Shl<&u64> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U8Vec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U8Vec2 {
type Output = Self;
#[inline]
@@ -1642,10 +2449,48 @@
}
}
-impl Shl<crate::IVec2> for U8Vec2 {
+impl Shr<&u64> for U8Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U8Vec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec2> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1653,10 +2498,34 @@
}
}
-impl Shr<crate::IVec2> for U8Vec2 {
+impl Shl<&IVec2> for U8Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &IVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec2> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1664,10 +2533,34 @@
}
}
-impl Shl<crate::UVec2> for U8Vec2 {
+impl Shr<&IVec2> for U8Vec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &IVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec2> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1675,10 +2568,34 @@
}
}
-impl Shr<crate::UVec2> for U8Vec2 {
+impl Shl<&UVec2> for U8Vec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &UVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> U8Vec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> U8Vec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec2> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1686,6 +2603,30 @@
}
}
+impl Shr<&UVec2> for U8Vec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> U8Vec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &U8Vec2 {
+ type Output = U8Vec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> U8Vec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U8Vec2 {
type Output = u8;
#[inline]
diff --git a/crates/glam/src/u8/u8vec3.rs b/crates/glam/src/u8/u8vec3.rs
index c3f4079..37b0d5f 100644
--- a/crates/glam/src/u8/u8vec3.rs
+++ b/crates/glam/src/u8/u8vec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct U8Vec3 {
@@ -401,8 +402,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u8 {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> u8 {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -412,10 +413,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u8> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u8> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -423,12 +424,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u8 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u8 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -760,7 +761,7 @@
}
}
-impl Div<U8Vec3> for U8Vec3 {
+impl Div for U8Vec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -772,10 +773,10 @@
}
}
-impl Div<&U8Vec3> for U8Vec3 {
- type Output = U8Vec3;
+impl Div<&Self> for U8Vec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U8Vec3) -> U8Vec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -796,7 +797,7 @@
}
}
-impl DivAssign<U8Vec3> for U8Vec3 {
+impl DivAssign for U8Vec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -805,10 +806,10 @@
}
}
-impl DivAssign<&U8Vec3> for U8Vec3 {
+impl DivAssign<&Self> for U8Vec3 {
#[inline]
- fn div_assign(&mut self, rhs: &U8Vec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -825,9 +826,9 @@
}
impl Div<&u8> for U8Vec3 {
- type Output = U8Vec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u8) -> U8Vec3 {
+ fn div(self, rhs: &u8) -> Self {
self.div(*rhs)
}
}
@@ -860,7 +861,7 @@
impl DivAssign<&u8> for U8Vec3 {
#[inline]
fn div_assign(&mut self, rhs: &u8) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -900,7 +901,7 @@
}
}
-impl Mul<U8Vec3> for U8Vec3 {
+impl Mul for U8Vec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -912,10 +913,10 @@
}
}
-impl Mul<&U8Vec3> for U8Vec3 {
- type Output = U8Vec3;
+impl Mul<&Self> for U8Vec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U8Vec3) -> U8Vec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -936,7 +937,7 @@
}
}
-impl MulAssign<U8Vec3> for U8Vec3 {
+impl MulAssign for U8Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -945,10 +946,10 @@
}
}
-impl MulAssign<&U8Vec3> for U8Vec3 {
+impl MulAssign<&Self> for U8Vec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &U8Vec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -965,9 +966,9 @@
}
impl Mul<&u8> for U8Vec3 {
- type Output = U8Vec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u8) -> U8Vec3 {
+ fn mul(self, rhs: &u8) -> Self {
self.mul(*rhs)
}
}
@@ -1000,7 +1001,7 @@
impl MulAssign<&u8> for U8Vec3 {
#[inline]
fn mul_assign(&mut self, rhs: &u8) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1040,7 +1041,7 @@
}
}
-impl Add<U8Vec3> for U8Vec3 {
+impl Add for U8Vec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1052,10 +1053,10 @@
}
}
-impl Add<&U8Vec3> for U8Vec3 {
- type Output = U8Vec3;
+impl Add<&Self> for U8Vec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U8Vec3) -> U8Vec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1076,7 +1077,7 @@
}
}
-impl AddAssign<U8Vec3> for U8Vec3 {
+impl AddAssign for U8Vec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1085,10 +1086,10 @@
}
}
-impl AddAssign<&U8Vec3> for U8Vec3 {
+impl AddAssign<&Self> for U8Vec3 {
#[inline]
- fn add_assign(&mut self, rhs: &U8Vec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1105,9 +1106,9 @@
}
impl Add<&u8> for U8Vec3 {
- type Output = U8Vec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u8) -> U8Vec3 {
+ fn add(self, rhs: &u8) -> Self {
self.add(*rhs)
}
}
@@ -1140,7 +1141,7 @@
impl AddAssign<&u8> for U8Vec3 {
#[inline]
fn add_assign(&mut self, rhs: &u8) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1180,7 +1181,7 @@
}
}
-impl Sub<U8Vec3> for U8Vec3 {
+impl Sub for U8Vec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1192,10 +1193,10 @@
}
}
-impl Sub<&U8Vec3> for U8Vec3 {
- type Output = U8Vec3;
+impl Sub<&Self> for U8Vec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U8Vec3) -> U8Vec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1216,19 +1217,19 @@
}
}
-impl SubAssign<U8Vec3> for U8Vec3 {
+impl SubAssign for U8Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: U8Vec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&U8Vec3> for U8Vec3 {
+impl SubAssign<&Self> for U8Vec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &U8Vec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1245,9 +1246,9 @@
}
impl Sub<&u8> for U8Vec3 {
- type Output = U8Vec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u8) -> U8Vec3 {
+ fn sub(self, rhs: &u8) -> Self {
self.sub(*rhs)
}
}
@@ -1280,7 +1281,7 @@
impl SubAssign<&u8> for U8Vec3 {
#[inline]
fn sub_assign(&mut self, rhs: &u8) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1320,7 +1321,7 @@
}
}
-impl Rem<U8Vec3> for U8Vec3 {
+impl Rem for U8Vec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1332,10 +1333,10 @@
}
}
-impl Rem<&U8Vec3> for U8Vec3 {
- type Output = U8Vec3;
+impl Rem<&Self> for U8Vec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U8Vec3) -> U8Vec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1356,7 +1357,7 @@
}
}
-impl RemAssign<U8Vec3> for U8Vec3 {
+impl RemAssign for U8Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1365,10 +1366,10 @@
}
}
-impl RemAssign<&U8Vec3> for U8Vec3 {
+impl RemAssign<&Self> for U8Vec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &U8Vec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1385,9 +1386,9 @@
}
impl Rem<&u8> for U8Vec3 {
- type Output = U8Vec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u8) -> U8Vec3 {
+ fn rem(self, rhs: &u8) -> Self {
self.rem(*rhs)
}
}
@@ -1420,7 +1421,7 @@
impl RemAssign<&u8> for U8Vec3 {
#[inline]
fn rem_assign(&mut self, rhs: &u8) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1464,7 +1465,7 @@
impl AsRef<[u8; 3]> for U8Vec3 {
#[inline]
fn as_ref(&self) -> &[u8; 3] {
- unsafe { &*(self as *const U8Vec3 as *const [u8; 3]) }
+ unsafe { &*(self as *const Self as *const [u8; 3]) }
}
}
@@ -1472,7 +1473,7 @@
impl AsMut<[u8; 3]> for U8Vec3 {
#[inline]
fn as_mut(&mut self) -> &mut [u8; 3] {
- unsafe { &mut *(self as *mut U8Vec3 as *mut [u8; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [u8; 3]) }
}
}
@@ -1519,7 +1520,7 @@
impl Not for U8Vec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1528,6 +1529,14 @@
}
}
+impl Not for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn not(self) -> U8Vec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U8Vec3 {
type Output = Self;
#[inline]
@@ -1540,6 +1549,44 @@
}
}
+impl BitAnd<&Self> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U8Vec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitand(self, rhs: &U8Vec3) -> U8Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U8Vec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitand(self, rhs: U8Vec3) -> U8Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U8Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U8Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U8Vec3 {
type Output = Self;
#[inline]
@@ -1552,6 +1599,44 @@
}
}
+impl BitOr<&Self> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U8Vec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitor(self, rhs: &U8Vec3) -> U8Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U8Vec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitor(self, rhs: U8Vec3) -> U8Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U8Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U8Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U8Vec3 {
type Output = Self;
#[inline]
@@ -1564,6 +1649,44 @@
}
}
+impl BitXor<&Self> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U8Vec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &U8Vec3) -> U8Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U8Vec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitxor(self, rhs: U8Vec3) -> U8Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U8Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U8Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u8> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1576,6 +1699,44 @@
}
}
+impl BitAnd<&u8> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u8) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitand(self, rhs: &u8) -> U8Vec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitand(self, rhs: u8) -> U8Vec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u8> for U8Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u8) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u8> for U8Vec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u8) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u8> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1588,6 +1749,44 @@
}
}
+impl BitOr<&u8> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u8) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitor(self, rhs: &u8) -> U8Vec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitor(self, rhs: u8) -> U8Vec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u8> for U8Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u8) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u8> for U8Vec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u8) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u8> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1600,6 +1799,44 @@
}
}
+impl BitXor<&u8> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u8) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitxor(self, rhs: &u8) -> U8Vec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn bitxor(self, rhs: u8) -> U8Vec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u8> for U8Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u8) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u8> for U8Vec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u8) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1612,6 +1849,44 @@
}
}
+impl Shl<&i8> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1624,6 +1899,44 @@
}
}
+impl Shr<&i8> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1636,6 +1949,44 @@
}
}
+impl Shl<&i16> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1648,6 +1999,44 @@
}
}
+impl Shr<&i16> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1660,6 +2049,44 @@
}
}
+impl Shl<&i32> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1672,6 +2099,44 @@
}
}
+impl Shr<&i32> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1684,6 +2149,44 @@
}
}
+impl Shl<&i64> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1696,6 +2199,44 @@
}
}
+impl Shr<&i64> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1708,6 +2249,44 @@
}
}
+impl Shl<&u8> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1720,6 +2299,44 @@
}
}
+impl Shr<&u8> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1732,6 +2349,44 @@
}
}
+impl Shl<&u16> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1744,6 +2399,44 @@
}
}
+impl Shr<&u16> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1756,6 +2449,44 @@
}
}
+impl Shl<&u32> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1768,6 +2499,44 @@
}
}
+impl Shr<&u32> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1780,6 +2549,44 @@
}
}
+impl Shl<&u64> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U8Vec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U8Vec3 {
type Output = Self;
#[inline]
@@ -1792,10 +2599,48 @@
}
}
-impl Shl<crate::IVec3> for U8Vec3 {
+impl Shr<&u64> for U8Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U8Vec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec3> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1804,10 +2649,34 @@
}
}
-impl Shr<crate::IVec3> for U8Vec3 {
+impl Shl<&IVec3> for U8Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &IVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec3> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1816,10 +2685,34 @@
}
}
-impl Shl<crate::UVec3> for U8Vec3 {
+impl Shr<&IVec3> for U8Vec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &IVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec3> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1828,10 +2721,34 @@
}
}
-impl Shr<crate::UVec3> for U8Vec3 {
+impl Shl<&UVec3> for U8Vec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &UVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> U8Vec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> U8Vec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec3> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1840,6 +2757,30 @@
}
}
+impl Shr<&UVec3> for U8Vec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> U8Vec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &U8Vec3 {
+ type Output = U8Vec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> U8Vec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U8Vec3 {
type Output = u8;
#[inline]
diff --git a/crates/glam/src/u8/u8vec4.rs b/crates/glam/src/u8/u8vec4.rs
index ceb19ea..1623323 100644
--- a/crates/glam/src/u8/u8vec4.rs
+++ b/crates/glam/src/u8/u8vec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(4)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -434,11 +435,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> u8 {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> u8 {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -448,11 +449,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<u8> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u8> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -460,13 +461,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> u8 {
+ pub fn chebyshev_distance(self, rhs: Self) -> u8 {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -826,7 +827,7 @@
}
}
-impl Div<U8Vec4> for U8Vec4 {
+impl Div for U8Vec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -839,10 +840,10 @@
}
}
-impl Div<&U8Vec4> for U8Vec4 {
- type Output = U8Vec4;
+impl Div<&Self> for U8Vec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &U8Vec4) -> U8Vec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -863,7 +864,7 @@
}
}
-impl DivAssign<U8Vec4> for U8Vec4 {
+impl DivAssign for U8Vec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -873,10 +874,10 @@
}
}
-impl DivAssign<&U8Vec4> for U8Vec4 {
+impl DivAssign<&Self> for U8Vec4 {
#[inline]
- fn div_assign(&mut self, rhs: &U8Vec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -894,9 +895,9 @@
}
impl Div<&u8> for U8Vec4 {
- type Output = U8Vec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &u8) -> U8Vec4 {
+ fn div(self, rhs: &u8) -> Self {
self.div(*rhs)
}
}
@@ -930,7 +931,7 @@
impl DivAssign<&u8> for U8Vec4 {
#[inline]
fn div_assign(&mut self, rhs: &u8) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -971,7 +972,7 @@
}
}
-impl Mul<U8Vec4> for U8Vec4 {
+impl Mul for U8Vec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -984,10 +985,10 @@
}
}
-impl Mul<&U8Vec4> for U8Vec4 {
- type Output = U8Vec4;
+impl Mul<&Self> for U8Vec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &U8Vec4) -> U8Vec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -1008,7 +1009,7 @@
}
}
-impl MulAssign<U8Vec4> for U8Vec4 {
+impl MulAssign for U8Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -1018,10 +1019,10 @@
}
}
-impl MulAssign<&U8Vec4> for U8Vec4 {
+impl MulAssign<&Self> for U8Vec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &U8Vec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -1039,9 +1040,9 @@
}
impl Mul<&u8> for U8Vec4 {
- type Output = U8Vec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &u8) -> U8Vec4 {
+ fn mul(self, rhs: &u8) -> Self {
self.mul(*rhs)
}
}
@@ -1075,7 +1076,7 @@
impl MulAssign<&u8> for U8Vec4 {
#[inline]
fn mul_assign(&mut self, rhs: &u8) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1116,7 +1117,7 @@
}
}
-impl Add<U8Vec4> for U8Vec4 {
+impl Add for U8Vec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1129,10 +1130,10 @@
}
}
-impl Add<&U8Vec4> for U8Vec4 {
- type Output = U8Vec4;
+impl Add<&Self> for U8Vec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &U8Vec4) -> U8Vec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1153,7 +1154,7 @@
}
}
-impl AddAssign<U8Vec4> for U8Vec4 {
+impl AddAssign for U8Vec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1163,10 +1164,10 @@
}
}
-impl AddAssign<&U8Vec4> for U8Vec4 {
+impl AddAssign<&Self> for U8Vec4 {
#[inline]
- fn add_assign(&mut self, rhs: &U8Vec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1184,9 +1185,9 @@
}
impl Add<&u8> for U8Vec4 {
- type Output = U8Vec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &u8) -> U8Vec4 {
+ fn add(self, rhs: &u8) -> Self {
self.add(*rhs)
}
}
@@ -1220,7 +1221,7 @@
impl AddAssign<&u8> for U8Vec4 {
#[inline]
fn add_assign(&mut self, rhs: &u8) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1261,7 +1262,7 @@
}
}
-impl Sub<U8Vec4> for U8Vec4 {
+impl Sub for U8Vec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1274,10 +1275,10 @@
}
}
-impl Sub<&U8Vec4> for U8Vec4 {
- type Output = U8Vec4;
+impl Sub<&Self> for U8Vec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &U8Vec4) -> U8Vec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1298,9 +1299,9 @@
}
}
-impl SubAssign<U8Vec4> for U8Vec4 {
+impl SubAssign for U8Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: U8Vec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1308,10 +1309,10 @@
}
}
-impl SubAssign<&U8Vec4> for U8Vec4 {
+impl SubAssign<&Self> for U8Vec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &U8Vec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1329,9 +1330,9 @@
}
impl Sub<&u8> for U8Vec4 {
- type Output = U8Vec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &u8) -> U8Vec4 {
+ fn sub(self, rhs: &u8) -> Self {
self.sub(*rhs)
}
}
@@ -1365,7 +1366,7 @@
impl SubAssign<&u8> for U8Vec4 {
#[inline]
fn sub_assign(&mut self, rhs: &u8) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1406,7 +1407,7 @@
}
}
-impl Rem<U8Vec4> for U8Vec4 {
+impl Rem for U8Vec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1419,10 +1420,10 @@
}
}
-impl Rem<&U8Vec4> for U8Vec4 {
- type Output = U8Vec4;
+impl Rem<&Self> for U8Vec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &U8Vec4) -> U8Vec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1443,7 +1444,7 @@
}
}
-impl RemAssign<U8Vec4> for U8Vec4 {
+impl RemAssign for U8Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1453,10 +1454,10 @@
}
}
-impl RemAssign<&U8Vec4> for U8Vec4 {
+impl RemAssign<&Self> for U8Vec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &U8Vec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1474,9 +1475,9 @@
}
impl Rem<&u8> for U8Vec4 {
- type Output = U8Vec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &u8) -> U8Vec4 {
+ fn rem(self, rhs: &u8) -> Self {
self.rem(*rhs)
}
}
@@ -1510,7 +1511,7 @@
impl RemAssign<&u8> for U8Vec4 {
#[inline]
fn rem_assign(&mut self, rhs: &u8) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1555,7 +1556,7 @@
impl AsRef<[u8; 4]> for U8Vec4 {
#[inline]
fn as_ref(&self) -> &[u8; 4] {
- unsafe { &*(self as *const U8Vec4 as *const [u8; 4]) }
+ unsafe { &*(self as *const Self as *const [u8; 4]) }
}
}
@@ -1563,7 +1564,7 @@
impl AsMut<[u8; 4]> for U8Vec4 {
#[inline]
fn as_mut(&mut self) -> &mut [u8; 4] {
- unsafe { &mut *(self as *mut U8Vec4 as *mut [u8; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [u8; 4]) }
}
}
@@ -1610,7 +1611,7 @@
impl Not for U8Vec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1620,6 +1621,14 @@
}
}
+impl Not for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn not(self) -> U8Vec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for U8Vec4 {
type Output = Self;
#[inline]
@@ -1633,6 +1642,44 @@
}
}
+impl BitAnd<&Self> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&U8Vec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitand(self, rhs: &U8Vec4) -> U8Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<U8Vec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitand(self, rhs: U8Vec4) -> U8Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for U8Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for U8Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for U8Vec4 {
type Output = Self;
#[inline]
@@ -1646,6 +1693,44 @@
}
}
+impl BitOr<&Self> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&U8Vec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitor(self, rhs: &U8Vec4) -> U8Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<U8Vec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitor(self, rhs: U8Vec4) -> U8Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for U8Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for U8Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for U8Vec4 {
type Output = Self;
#[inline]
@@ -1659,6 +1744,44 @@
}
}
+impl BitXor<&Self> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&U8Vec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &U8Vec4) -> U8Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<U8Vec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitxor(self, rhs: U8Vec4) -> U8Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for U8Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for U8Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<u8> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1672,6 +1795,44 @@
}
}
+impl BitAnd<&u8> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &u8) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitand(self, rhs: &u8) -> U8Vec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitand(self, rhs: u8) -> U8Vec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<u8> for U8Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: u8) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&u8> for U8Vec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &u8) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<u8> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1685,6 +1846,44 @@
}
}
+impl BitOr<&u8> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &u8) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitor(self, rhs: &u8) -> U8Vec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitor(self, rhs: u8) -> U8Vec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<u8> for U8Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: u8) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&u8> for U8Vec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &u8) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<u8> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1698,6 +1897,44 @@
}
}
+impl BitXor<&u8> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &u8) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitxor(self, rhs: &u8) -> U8Vec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn bitxor(self, rhs: u8) -> U8Vec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<u8> for U8Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: u8) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&u8> for U8Vec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &u8) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1711,6 +1948,44 @@
}
}
+impl Shl<&i8> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1724,6 +1999,44 @@
}
}
+impl Shr<&i8> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1737,6 +2050,44 @@
}
}
+impl Shl<&i16> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1750,6 +2101,44 @@
}
}
+impl Shr<&i16> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1763,6 +2152,44 @@
}
}
+impl Shl<&i32> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1776,6 +2203,44 @@
}
}
+impl Shr<&i32> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1789,6 +2254,44 @@
}
}
+impl Shl<&i64> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1802,6 +2305,44 @@
}
}
+impl Shr<&i64> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1815,6 +2356,44 @@
}
}
+impl Shl<&u8> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1828,6 +2407,44 @@
}
}
+impl Shr<&u8> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1841,6 +2458,44 @@
}
}
+impl Shl<&u16> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1854,6 +2509,44 @@
}
}
+impl Shr<&u16> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1867,6 +2560,44 @@
}
}
+impl Shl<&u32> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1880,6 +2611,44 @@
}
}
+impl Shr<&u32> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1893,6 +2662,44 @@
}
}
+impl Shl<&u64> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for U8Vec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for U8Vec4 {
type Output = Self;
#[inline]
@@ -1906,10 +2713,48 @@
}
}
-impl Shl<crate::IVec4> for U8Vec4 {
+impl Shr<&u64> for U8Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for U8Vec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec4> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1919,10 +2764,34 @@
}
}
-impl Shr<crate::IVec4> for U8Vec4 {
+impl Shl<&IVec4> for U8Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &IVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec4> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1932,10 +2801,34 @@
}
}
-impl Shl<crate::UVec4> for U8Vec4 {
+impl Shr<&IVec4> for U8Vec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &IVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec4> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1945,10 +2838,34 @@
}
}
-impl Shr<crate::UVec4> for U8Vec4 {
+impl Shl<&UVec4> for U8Vec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &UVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> U8Vec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> U8Vec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec4> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1958,6 +2875,30 @@
}
}
+impl Shr<&UVec4> for U8Vec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> U8Vec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &U8Vec4 {
+ type Output = U8Vec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> U8Vec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for U8Vec4 {
type Output = u8;
#[inline]
diff --git a/crates/glam/src/usize/usizevec2.rs b/crates/glam/src/usize/usizevec2.rs
index d5c60dc..bb11c57 100644
--- a/crates/glam/src/usize/usizevec2.rs
+++ b/crates/glam/src/usize/usizevec2.rs
@@ -16,6 +16,7 @@
/// A 2-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -341,8 +342,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> usize {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y)
+ pub fn manhattan_distance(self, rhs: Self) -> usize {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
}
/// Computes the [manhattan distance] between two points.
@@ -352,9 +353,9 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<usize> {
- let d = self.x.abs_diff(other.x);
- d.checked_add(self.y.abs_diff(other.y))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<usize> {
+ let d = self.x.abs_diff(rhs.x);
+ d.checked_add(self.y.abs_diff(rhs.y))
}
/// Computes the [chebyshev distance] between two points.
@@ -362,9 +363,9 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> usize {
+ pub fn chebyshev_distance(self, rhs: Self) -> usize {
// Note: the compiler will eventually optimize out the loop
- [self.x.abs_diff(other.x), self.y.abs_diff(other.y)]
+ [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
.into_iter()
.max()
.unwrap()
@@ -616,7 +617,7 @@
}
}
-impl Div<USizeVec2> for USizeVec2 {
+impl Div for USizeVec2 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -627,10 +628,10 @@
}
}
-impl Div<&USizeVec2> for USizeVec2 {
- type Output = USizeVec2;
+impl Div<&Self> for USizeVec2 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &USizeVec2) -> USizeVec2 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -651,7 +652,7 @@
}
}
-impl DivAssign<USizeVec2> for USizeVec2 {
+impl DivAssign for USizeVec2 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -659,10 +660,10 @@
}
}
-impl DivAssign<&USizeVec2> for USizeVec2 {
+impl DivAssign<&Self> for USizeVec2 {
#[inline]
- fn div_assign(&mut self, rhs: &USizeVec2) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -678,9 +679,9 @@
}
impl Div<&usize> for USizeVec2 {
- type Output = USizeVec2;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &usize) -> USizeVec2 {
+ fn div(self, rhs: &usize) -> Self {
self.div(*rhs)
}
}
@@ -712,7 +713,7 @@
impl DivAssign<&usize> for USizeVec2 {
#[inline]
fn div_assign(&mut self, rhs: &usize) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -751,7 +752,7 @@
}
}
-impl Mul<USizeVec2> for USizeVec2 {
+impl Mul for USizeVec2 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -762,10 +763,10 @@
}
}
-impl Mul<&USizeVec2> for USizeVec2 {
- type Output = USizeVec2;
+impl Mul<&Self> for USizeVec2 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &USizeVec2) -> USizeVec2 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -786,7 +787,7 @@
}
}
-impl MulAssign<USizeVec2> for USizeVec2 {
+impl MulAssign for USizeVec2 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -794,10 +795,10 @@
}
}
-impl MulAssign<&USizeVec2> for USizeVec2 {
+impl MulAssign<&Self> for USizeVec2 {
#[inline]
- fn mul_assign(&mut self, rhs: &USizeVec2) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -813,9 +814,9 @@
}
impl Mul<&usize> for USizeVec2 {
- type Output = USizeVec2;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &usize) -> USizeVec2 {
+ fn mul(self, rhs: &usize) -> Self {
self.mul(*rhs)
}
}
@@ -847,7 +848,7 @@
impl MulAssign<&usize> for USizeVec2 {
#[inline]
fn mul_assign(&mut self, rhs: &usize) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -886,7 +887,7 @@
}
}
-impl Add<USizeVec2> for USizeVec2 {
+impl Add for USizeVec2 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -897,10 +898,10 @@
}
}
-impl Add<&USizeVec2> for USizeVec2 {
- type Output = USizeVec2;
+impl Add<&Self> for USizeVec2 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &USizeVec2) -> USizeVec2 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -921,7 +922,7 @@
}
}
-impl AddAssign<USizeVec2> for USizeVec2 {
+impl AddAssign for USizeVec2 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -929,10 +930,10 @@
}
}
-impl AddAssign<&USizeVec2> for USizeVec2 {
+impl AddAssign<&Self> for USizeVec2 {
#[inline]
- fn add_assign(&mut self, rhs: &USizeVec2) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -948,9 +949,9 @@
}
impl Add<&usize> for USizeVec2 {
- type Output = USizeVec2;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &usize) -> USizeVec2 {
+ fn add(self, rhs: &usize) -> Self {
self.add(*rhs)
}
}
@@ -982,7 +983,7 @@
impl AddAssign<&usize> for USizeVec2 {
#[inline]
fn add_assign(&mut self, rhs: &usize) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1021,7 +1022,7 @@
}
}
-impl Sub<USizeVec2> for USizeVec2 {
+impl Sub for USizeVec2 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1032,10 +1033,10 @@
}
}
-impl Sub<&USizeVec2> for USizeVec2 {
- type Output = USizeVec2;
+impl Sub<&Self> for USizeVec2 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &USizeVec2) -> USizeVec2 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1056,18 +1057,18 @@
}
}
-impl SubAssign<USizeVec2> for USizeVec2 {
+impl SubAssign for USizeVec2 {
#[inline]
- fn sub_assign(&mut self, rhs: USizeVec2) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
}
}
-impl SubAssign<&USizeVec2> for USizeVec2 {
+impl SubAssign<&Self> for USizeVec2 {
#[inline]
- fn sub_assign(&mut self, rhs: &USizeVec2) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1083,9 +1084,9 @@
}
impl Sub<&usize> for USizeVec2 {
- type Output = USizeVec2;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &usize) -> USizeVec2 {
+ fn sub(self, rhs: &usize) -> Self {
self.sub(*rhs)
}
}
@@ -1117,7 +1118,7 @@
impl SubAssign<&usize> for USizeVec2 {
#[inline]
fn sub_assign(&mut self, rhs: &usize) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1156,7 +1157,7 @@
}
}
-impl Rem<USizeVec2> for USizeVec2 {
+impl Rem for USizeVec2 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1167,10 +1168,10 @@
}
}
-impl Rem<&USizeVec2> for USizeVec2 {
- type Output = USizeVec2;
+impl Rem<&Self> for USizeVec2 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &USizeVec2) -> USizeVec2 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1191,7 +1192,7 @@
}
}
-impl RemAssign<USizeVec2> for USizeVec2 {
+impl RemAssign for USizeVec2 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1199,10 +1200,10 @@
}
}
-impl RemAssign<&USizeVec2> for USizeVec2 {
+impl RemAssign<&Self> for USizeVec2 {
#[inline]
- fn rem_assign(&mut self, rhs: &USizeVec2) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1218,9 +1219,9 @@
}
impl Rem<&usize> for USizeVec2 {
- type Output = USizeVec2;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &usize) -> USizeVec2 {
+ fn rem(self, rhs: &usize) -> Self {
self.rem(*rhs)
}
}
@@ -1252,7 +1253,7 @@
impl RemAssign<&usize> for USizeVec2 {
#[inline]
fn rem_assign(&mut self, rhs: &usize) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1295,7 +1296,7 @@
impl AsRef<[usize; 2]> for USizeVec2 {
#[inline]
fn as_ref(&self) -> &[usize; 2] {
- unsafe { &*(self as *const USizeVec2 as *const [usize; 2]) }
+ unsafe { &*(self as *const Self as *const [usize; 2]) }
}
}
@@ -1303,7 +1304,7 @@
impl AsMut<[usize; 2]> for USizeVec2 {
#[inline]
fn as_mut(&mut self) -> &mut [usize; 2] {
- unsafe { &mut *(self as *mut USizeVec2 as *mut [usize; 2]) }
+ unsafe { &mut *(self as *mut Self as *mut [usize; 2]) }
}
}
@@ -1350,7 +1351,7 @@
impl Not for USizeVec2 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1358,6 +1359,14 @@
}
}
+impl Not for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn not(self) -> USizeVec2 {
+ (*self).not()
+ }
+}
+
impl BitAnd for USizeVec2 {
type Output = Self;
#[inline]
@@ -1369,6 +1378,44 @@
}
}
+impl BitAnd<&Self> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&USizeVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitand(self, rhs: &USizeVec2) -> USizeVec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<USizeVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitand(self, rhs: USizeVec2) -> USizeVec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for USizeVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for USizeVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for USizeVec2 {
type Output = Self;
#[inline]
@@ -1380,6 +1427,44 @@
}
}
+impl BitOr<&Self> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&USizeVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitor(self, rhs: &USizeVec2) -> USizeVec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<USizeVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitor(self, rhs: USizeVec2) -> USizeVec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for USizeVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for USizeVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for USizeVec2 {
type Output = Self;
#[inline]
@@ -1391,6 +1476,44 @@
}
}
+impl BitXor<&Self> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&USizeVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitxor(self, rhs: &USizeVec2) -> USizeVec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<USizeVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitxor(self, rhs: USizeVec2) -> USizeVec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for USizeVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for USizeVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<usize> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1402,6 +1525,44 @@
}
}
+impl BitAnd<&usize> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &usize) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&usize> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitand(self, rhs: &usize) -> USizeVec2 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<usize> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitand(self, rhs: usize) -> USizeVec2 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<usize> for USizeVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: usize) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&usize> for USizeVec2 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &usize) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<usize> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1413,6 +1574,44 @@
}
}
+impl BitOr<&usize> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &usize) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&usize> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitor(self, rhs: &usize) -> USizeVec2 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<usize> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitor(self, rhs: usize) -> USizeVec2 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<usize> for USizeVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: usize) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&usize> for USizeVec2 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &usize) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<usize> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1424,6 +1623,44 @@
}
}
+impl BitXor<&usize> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &usize) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&usize> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitxor(self, rhs: &usize) -> USizeVec2 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<usize> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn bitxor(self, rhs: usize) -> USizeVec2 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<usize> for USizeVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: usize) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&usize> for USizeVec2 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &usize) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1435,6 +1672,44 @@
}
}
+impl Shl<&i8> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &i8) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: i8) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1446,6 +1721,44 @@
}
}
+impl Shr<&i8> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &i8) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: i8) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1457,6 +1770,44 @@
}
}
+impl Shl<&i16> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &i16) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: i16) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1468,6 +1819,44 @@
}
}
+impl Shr<&i16> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &i16) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: i16) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1479,6 +1868,44 @@
}
}
+impl Shl<&i32> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &i32) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: i32) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1490,6 +1917,44 @@
}
}
+impl Shr<&i32> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &i32) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: i32) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1501,6 +1966,44 @@
}
}
+impl Shl<&i64> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &i64) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: i64) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1512,6 +2015,44 @@
}
}
+impl Shr<&i64> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &i64) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: i64) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1523,6 +2064,44 @@
}
}
+impl Shl<&u8> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &u8) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: u8) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1534,6 +2113,44 @@
}
}
+impl Shr<&u8> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &u8) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: u8) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1545,6 +2162,44 @@
}
}
+impl Shl<&u16> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &u16) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: u16) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1556,6 +2211,44 @@
}
}
+impl Shr<&u16> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &u16) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: u16) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1567,6 +2260,44 @@
}
}
+impl Shl<&u32> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &u32) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: u32) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1578,6 +2309,44 @@
}
}
+impl Shr<&u32> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &u32) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: u32) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1589,6 +2358,44 @@
}
}
+impl Shl<&u64> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &u64) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: u64) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for USizeVec2 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for USizeVec2 {
type Output = Self;
#[inline]
@@ -1600,10 +2407,48 @@
}
}
-impl Shl<crate::IVec2> for USizeVec2 {
+impl Shr<&u64> for USizeVec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec2) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &u64) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: u64) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for USizeVec2 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec2> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1611,10 +2456,34 @@
}
}
-impl Shr<crate::IVec2> for USizeVec2 {
+impl Shl<&IVec2> for USizeVec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec2) -> Self::Output {
+ fn shl(self, rhs: &IVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &IVec2) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: IVec2) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec2> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1622,10 +2491,34 @@
}
}
-impl Shl<crate::UVec2> for USizeVec2 {
+impl Shr<&IVec2> for USizeVec2 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec2) -> Self::Output {
+ fn shr(self, rhs: &IVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &IVec2) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: IVec2) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec2> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1633,10 +2526,34 @@
}
}
-impl Shr<crate::UVec2> for USizeVec2 {
+impl Shl<&UVec2> for USizeVec2 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec2) -> Self::Output {
+ fn shl(self, rhs: &UVec2) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: &UVec2) -> USizeVec2 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shl(self, rhs: UVec2) -> USizeVec2 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec2> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1644,6 +2561,30 @@
}
}
+impl Shr<&UVec2> for USizeVec2 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: &UVec2) -> USizeVec2 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec2> for &USizeVec2 {
+ type Output = USizeVec2;
+ #[inline]
+ fn shr(self, rhs: UVec2) -> USizeVec2 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for USizeVec2 {
type Output = usize;
#[inline]
diff --git a/crates/glam/src/usize/usizevec3.rs b/crates/glam/src/usize/usizevec3.rs
index 4db2c0d..16a1b2b 100644
--- a/crates/glam/src/usize/usizevec3.rs
+++ b/crates/glam/src/usize/usizevec3.rs
@@ -19,6 +19,7 @@
/// A 3-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
pub struct USizeVec3 {
@@ -401,8 +402,8 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> usize {
- self.x.abs_diff(other.x) + self.y.abs_diff(other.y) + self.z.abs_diff(other.z)
+ pub fn manhattan_distance(self, rhs: Self) -> usize {
+ self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
}
/// Computes the [manhattan distance] between two points.
@@ -412,10 +413,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<usize> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- d.checked_add(self.z.abs_diff(other.z))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<usize> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ d.checked_add(self.z.abs_diff(rhs.z))
}
/// Computes the [chebyshev distance] between two points.
@@ -423,12 +424,12 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> usize {
+ pub fn chebyshev_distance(self, rhs: Self) -> usize {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
]
.into_iter()
.max()
@@ -712,7 +713,7 @@
}
}
-impl Div<USizeVec3> for USizeVec3 {
+impl Div for USizeVec3 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -724,10 +725,10 @@
}
}
-impl Div<&USizeVec3> for USizeVec3 {
- type Output = USizeVec3;
+impl Div<&Self> for USizeVec3 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &USizeVec3) -> USizeVec3 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -748,7 +749,7 @@
}
}
-impl DivAssign<USizeVec3> for USizeVec3 {
+impl DivAssign for USizeVec3 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -757,10 +758,10 @@
}
}
-impl DivAssign<&USizeVec3> for USizeVec3 {
+impl DivAssign<&Self> for USizeVec3 {
#[inline]
- fn div_assign(&mut self, rhs: &USizeVec3) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -777,9 +778,9 @@
}
impl Div<&usize> for USizeVec3 {
- type Output = USizeVec3;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &usize) -> USizeVec3 {
+ fn div(self, rhs: &usize) -> Self {
self.div(*rhs)
}
}
@@ -812,7 +813,7 @@
impl DivAssign<&usize> for USizeVec3 {
#[inline]
fn div_assign(&mut self, rhs: &usize) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -852,7 +853,7 @@
}
}
-impl Mul<USizeVec3> for USizeVec3 {
+impl Mul for USizeVec3 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -864,10 +865,10 @@
}
}
-impl Mul<&USizeVec3> for USizeVec3 {
- type Output = USizeVec3;
+impl Mul<&Self> for USizeVec3 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &USizeVec3) -> USizeVec3 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -888,7 +889,7 @@
}
}
-impl MulAssign<USizeVec3> for USizeVec3 {
+impl MulAssign for USizeVec3 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -897,10 +898,10 @@
}
}
-impl MulAssign<&USizeVec3> for USizeVec3 {
+impl MulAssign<&Self> for USizeVec3 {
#[inline]
- fn mul_assign(&mut self, rhs: &USizeVec3) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -917,9 +918,9 @@
}
impl Mul<&usize> for USizeVec3 {
- type Output = USizeVec3;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &usize) -> USizeVec3 {
+ fn mul(self, rhs: &usize) -> Self {
self.mul(*rhs)
}
}
@@ -952,7 +953,7 @@
impl MulAssign<&usize> for USizeVec3 {
#[inline]
fn mul_assign(&mut self, rhs: &usize) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -992,7 +993,7 @@
}
}
-impl Add<USizeVec3> for USizeVec3 {
+impl Add for USizeVec3 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1004,10 +1005,10 @@
}
}
-impl Add<&USizeVec3> for USizeVec3 {
- type Output = USizeVec3;
+impl Add<&Self> for USizeVec3 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &USizeVec3) -> USizeVec3 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1028,7 +1029,7 @@
}
}
-impl AddAssign<USizeVec3> for USizeVec3 {
+impl AddAssign for USizeVec3 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1037,10 +1038,10 @@
}
}
-impl AddAssign<&USizeVec3> for USizeVec3 {
+impl AddAssign<&Self> for USizeVec3 {
#[inline]
- fn add_assign(&mut self, rhs: &USizeVec3) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1057,9 +1058,9 @@
}
impl Add<&usize> for USizeVec3 {
- type Output = USizeVec3;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &usize) -> USizeVec3 {
+ fn add(self, rhs: &usize) -> Self {
self.add(*rhs)
}
}
@@ -1092,7 +1093,7 @@
impl AddAssign<&usize> for USizeVec3 {
#[inline]
fn add_assign(&mut self, rhs: &usize) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1132,7 +1133,7 @@
}
}
-impl Sub<USizeVec3> for USizeVec3 {
+impl Sub for USizeVec3 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1144,10 +1145,10 @@
}
}
-impl Sub<&USizeVec3> for USizeVec3 {
- type Output = USizeVec3;
+impl Sub<&Self> for USizeVec3 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &USizeVec3) -> USizeVec3 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1168,19 +1169,19 @@
}
}
-impl SubAssign<USizeVec3> for USizeVec3 {
+impl SubAssign for USizeVec3 {
#[inline]
- fn sub_assign(&mut self, rhs: USizeVec3) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
}
}
-impl SubAssign<&USizeVec3> for USizeVec3 {
+impl SubAssign<&Self> for USizeVec3 {
#[inline]
- fn sub_assign(&mut self, rhs: &USizeVec3) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1197,9 +1198,9 @@
}
impl Sub<&usize> for USizeVec3 {
- type Output = USizeVec3;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &usize) -> USizeVec3 {
+ fn sub(self, rhs: &usize) -> Self {
self.sub(*rhs)
}
}
@@ -1232,7 +1233,7 @@
impl SubAssign<&usize> for USizeVec3 {
#[inline]
fn sub_assign(&mut self, rhs: &usize) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1272,7 +1273,7 @@
}
}
-impl Rem<USizeVec3> for USizeVec3 {
+impl Rem for USizeVec3 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1284,10 +1285,10 @@
}
}
-impl Rem<&USizeVec3> for USizeVec3 {
- type Output = USizeVec3;
+impl Rem<&Self> for USizeVec3 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &USizeVec3) -> USizeVec3 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1308,7 +1309,7 @@
}
}
-impl RemAssign<USizeVec3> for USizeVec3 {
+impl RemAssign for USizeVec3 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1317,10 +1318,10 @@
}
}
-impl RemAssign<&USizeVec3> for USizeVec3 {
+impl RemAssign<&Self> for USizeVec3 {
#[inline]
- fn rem_assign(&mut self, rhs: &USizeVec3) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1337,9 +1338,9 @@
}
impl Rem<&usize> for USizeVec3 {
- type Output = USizeVec3;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &usize) -> USizeVec3 {
+ fn rem(self, rhs: &usize) -> Self {
self.rem(*rhs)
}
}
@@ -1372,7 +1373,7 @@
impl RemAssign<&usize> for USizeVec3 {
#[inline]
fn rem_assign(&mut self, rhs: &usize) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1416,7 +1417,7 @@
impl AsRef<[usize; 3]> for USizeVec3 {
#[inline]
fn as_ref(&self) -> &[usize; 3] {
- unsafe { &*(self as *const USizeVec3 as *const [usize; 3]) }
+ unsafe { &*(self as *const Self as *const [usize; 3]) }
}
}
@@ -1424,7 +1425,7 @@
impl AsMut<[usize; 3]> for USizeVec3 {
#[inline]
fn as_mut(&mut self) -> &mut [usize; 3] {
- unsafe { &mut *(self as *mut USizeVec3 as *mut [usize; 3]) }
+ unsafe { &mut *(self as *mut Self as *mut [usize; 3]) }
}
}
@@ -1471,7 +1472,7 @@
impl Not for USizeVec3 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1480,6 +1481,14 @@
}
}
+impl Not for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn not(self) -> USizeVec3 {
+ (*self).not()
+ }
+}
+
impl BitAnd for USizeVec3 {
type Output = Self;
#[inline]
@@ -1492,6 +1501,44 @@
}
}
+impl BitAnd<&Self> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&USizeVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitand(self, rhs: &USizeVec3) -> USizeVec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<USizeVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitand(self, rhs: USizeVec3) -> USizeVec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for USizeVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for USizeVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for USizeVec3 {
type Output = Self;
#[inline]
@@ -1504,6 +1551,44 @@
}
}
+impl BitOr<&Self> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&USizeVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitor(self, rhs: &USizeVec3) -> USizeVec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<USizeVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitor(self, rhs: USizeVec3) -> USizeVec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for USizeVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for USizeVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for USizeVec3 {
type Output = Self;
#[inline]
@@ -1516,6 +1601,44 @@
}
}
+impl BitXor<&Self> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&USizeVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitxor(self, rhs: &USizeVec3) -> USizeVec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<USizeVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitxor(self, rhs: USizeVec3) -> USizeVec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for USizeVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for USizeVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<usize> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1528,6 +1651,44 @@
}
}
+impl BitAnd<&usize> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &usize) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&usize> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitand(self, rhs: &usize) -> USizeVec3 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<usize> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitand(self, rhs: usize) -> USizeVec3 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<usize> for USizeVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: usize) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&usize> for USizeVec3 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &usize) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<usize> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1540,6 +1701,44 @@
}
}
+impl BitOr<&usize> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &usize) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&usize> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitor(self, rhs: &usize) -> USizeVec3 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<usize> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitor(self, rhs: usize) -> USizeVec3 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<usize> for USizeVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: usize) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&usize> for USizeVec3 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &usize) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<usize> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1552,6 +1751,44 @@
}
}
+impl BitXor<&usize> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &usize) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&usize> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitxor(self, rhs: &usize) -> USizeVec3 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<usize> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn bitxor(self, rhs: usize) -> USizeVec3 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<usize> for USizeVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: usize) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&usize> for USizeVec3 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &usize) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1564,6 +1801,44 @@
}
}
+impl Shl<&i8> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &i8) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: i8) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1576,6 +1851,44 @@
}
}
+impl Shr<&i8> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &i8) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: i8) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1588,6 +1901,44 @@
}
}
+impl Shl<&i16> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &i16) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: i16) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1600,6 +1951,44 @@
}
}
+impl Shr<&i16> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &i16) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: i16) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1612,6 +2001,44 @@
}
}
+impl Shl<&i32> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &i32) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: i32) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1624,6 +2051,44 @@
}
}
+impl Shr<&i32> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &i32) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: i32) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1636,6 +2101,44 @@
}
}
+impl Shl<&i64> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &i64) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: i64) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1648,6 +2151,44 @@
}
}
+impl Shr<&i64> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &i64) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: i64) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1660,6 +2201,44 @@
}
}
+impl Shl<&u8> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &u8) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: u8) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1672,6 +2251,44 @@
}
}
+impl Shr<&u8> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &u8) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: u8) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1684,6 +2301,44 @@
}
}
+impl Shl<&u16> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &u16) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: u16) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1696,6 +2351,44 @@
}
}
+impl Shr<&u16> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &u16) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: u16) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1708,6 +2401,44 @@
}
}
+impl Shl<&u32> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &u32) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: u32) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1720,6 +2451,44 @@
}
}
+impl Shr<&u32> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &u32) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: u32) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1732,6 +2501,44 @@
}
}
+impl Shl<&u64> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &u64) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: u64) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for USizeVec3 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for USizeVec3 {
type Output = Self;
#[inline]
@@ -1744,10 +2551,48 @@
}
}
-impl Shl<crate::IVec3> for USizeVec3 {
+impl Shr<&u64> for USizeVec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec3) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &u64) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: u64) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for USizeVec3 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec3> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1756,10 +2601,34 @@
}
}
-impl Shr<crate::IVec3> for USizeVec3 {
+impl Shl<&IVec3> for USizeVec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec3) -> Self::Output {
+ fn shl(self, rhs: &IVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &IVec3) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: IVec3) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec3> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1768,10 +2637,34 @@
}
}
-impl Shl<crate::UVec3> for USizeVec3 {
+impl Shr<&IVec3> for USizeVec3 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec3) -> Self::Output {
+ fn shr(self, rhs: &IVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &IVec3) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: IVec3) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec3> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1780,10 +2673,34 @@
}
}
-impl Shr<crate::UVec3> for USizeVec3 {
+impl Shl<&UVec3> for USizeVec3 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec3) -> Self::Output {
+ fn shl(self, rhs: &UVec3) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: &UVec3) -> USizeVec3 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shl(self, rhs: UVec3) -> USizeVec3 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec3> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1792,6 +2709,30 @@
}
}
+impl Shr<&UVec3> for USizeVec3 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: &UVec3) -> USizeVec3 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec3> for &USizeVec3 {
+ type Output = USizeVec3;
+ #[inline]
+ fn shr(self, rhs: UVec3) -> USizeVec3 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for USizeVec3 {
type Output = usize;
#[inline]
diff --git a/crates/glam/src/usize/usizevec4.rs b/crates/glam/src/usize/usizevec4.rs
index 97f81ef..37cc1d7 100644
--- a/crates/glam/src/usize/usizevec4.rs
+++ b/crates/glam/src/usize/usizevec4.rs
@@ -20,6 +20,7 @@
/// A 4-dimensional vector.
#[cfg_attr(not(target_arch = "spirv"), derive(Hash))]
#[derive(Clone, Copy, PartialEq, Eq)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
#[cfg_attr(feature = "cuda", repr(align(16)))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
@@ -434,11 +435,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> usize {
- self.x.abs_diff(other.x)
- + self.y.abs_diff(other.y)
- + self.z.abs_diff(other.z)
- + self.w.abs_diff(other.w)
+ pub fn manhattan_distance(self, rhs: Self) -> usize {
+ self.x.abs_diff(rhs.x)
+ + self.y.abs_diff(rhs.y)
+ + self.z.abs_diff(rhs.z)
+ + self.w.abs_diff(rhs.w)
}
/// Computes the [manhattan distance] between two points.
@@ -448,11 +449,11 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<usize> {
- let d = self.x.abs_diff(other.x);
- let d = d.checked_add(self.y.abs_diff(other.y))?;
- let d = d.checked_add(self.z.abs_diff(other.z))?;
- d.checked_add(self.w.abs_diff(other.w))
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<usize> {
+ let d = self.x.abs_diff(rhs.x);
+ let d = d.checked_add(self.y.abs_diff(rhs.y))?;
+ let d = d.checked_add(self.z.abs_diff(rhs.z))?;
+ d.checked_add(self.w.abs_diff(rhs.w))
}
/// Computes the [chebyshev distance] between two points.
@@ -460,13 +461,13 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> usize {
+ pub fn chebyshev_distance(self, rhs: Self) -> usize {
// Note: the compiler will eventually optimize out the loop
[
- self.x.abs_diff(other.x),
- self.y.abs_diff(other.y),
- self.z.abs_diff(other.z),
- self.w.abs_diff(other.w),
+ self.x.abs_diff(rhs.x),
+ self.y.abs_diff(rhs.y),
+ self.z.abs_diff(rhs.z),
+ self.w.abs_diff(rhs.w),
]
.into_iter()
.max()
@@ -767,7 +768,7 @@
}
}
-impl Div<USizeVec4> for USizeVec4 {
+impl Div for USizeVec4 {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -780,10 +781,10 @@
}
}
-impl Div<&USizeVec4> for USizeVec4 {
- type Output = USizeVec4;
+impl Div<&Self> for USizeVec4 {
+ type Output = Self;
#[inline]
- fn div(self, rhs: &USizeVec4) -> USizeVec4 {
+ fn div(self, rhs: &Self) -> Self {
self.div(*rhs)
}
}
@@ -804,7 +805,7 @@
}
}
-impl DivAssign<USizeVec4> for USizeVec4 {
+impl DivAssign for USizeVec4 {
#[inline]
fn div_assign(&mut self, rhs: Self) {
self.x.div_assign(rhs.x);
@@ -814,10 +815,10 @@
}
}
-impl DivAssign<&USizeVec4> for USizeVec4 {
+impl DivAssign<&Self> for USizeVec4 {
#[inline]
- fn div_assign(&mut self, rhs: &USizeVec4) {
- self.div_assign(*rhs)
+ fn div_assign(&mut self, rhs: &Self) {
+ self.div_assign(*rhs);
}
}
@@ -835,9 +836,9 @@
}
impl Div<&usize> for USizeVec4 {
- type Output = USizeVec4;
+ type Output = Self;
#[inline]
- fn div(self, rhs: &usize) -> USizeVec4 {
+ fn div(self, rhs: &usize) -> Self {
self.div(*rhs)
}
}
@@ -871,7 +872,7 @@
impl DivAssign<&usize> for USizeVec4 {
#[inline]
fn div_assign(&mut self, rhs: &usize) {
- self.div_assign(*rhs)
+ self.div_assign(*rhs);
}
}
@@ -912,7 +913,7 @@
}
}
-impl Mul<USizeVec4> for USizeVec4 {
+impl Mul for USizeVec4 {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -925,10 +926,10 @@
}
}
-impl Mul<&USizeVec4> for USizeVec4 {
- type Output = USizeVec4;
+impl Mul<&Self> for USizeVec4 {
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &USizeVec4) -> USizeVec4 {
+ fn mul(self, rhs: &Self) -> Self {
self.mul(*rhs)
}
}
@@ -949,7 +950,7 @@
}
}
-impl MulAssign<USizeVec4> for USizeVec4 {
+impl MulAssign for USizeVec4 {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
self.x.mul_assign(rhs.x);
@@ -959,10 +960,10 @@
}
}
-impl MulAssign<&USizeVec4> for USizeVec4 {
+impl MulAssign<&Self> for USizeVec4 {
#[inline]
- fn mul_assign(&mut self, rhs: &USizeVec4) {
- self.mul_assign(*rhs)
+ fn mul_assign(&mut self, rhs: &Self) {
+ self.mul_assign(*rhs);
}
}
@@ -980,9 +981,9 @@
}
impl Mul<&usize> for USizeVec4 {
- type Output = USizeVec4;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: &usize) -> USizeVec4 {
+ fn mul(self, rhs: &usize) -> Self {
self.mul(*rhs)
}
}
@@ -1016,7 +1017,7 @@
impl MulAssign<&usize> for USizeVec4 {
#[inline]
fn mul_assign(&mut self, rhs: &usize) {
- self.mul_assign(*rhs)
+ self.mul_assign(*rhs);
}
}
@@ -1057,7 +1058,7 @@
}
}
-impl Add<USizeVec4> for USizeVec4 {
+impl Add for USizeVec4 {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -1070,10 +1071,10 @@
}
}
-impl Add<&USizeVec4> for USizeVec4 {
- type Output = USizeVec4;
+impl Add<&Self> for USizeVec4 {
+ type Output = Self;
#[inline]
- fn add(self, rhs: &USizeVec4) -> USizeVec4 {
+ fn add(self, rhs: &Self) -> Self {
self.add(*rhs)
}
}
@@ -1094,7 +1095,7 @@
}
}
-impl AddAssign<USizeVec4> for USizeVec4 {
+impl AddAssign for USizeVec4 {
#[inline]
fn add_assign(&mut self, rhs: Self) {
self.x.add_assign(rhs.x);
@@ -1104,10 +1105,10 @@
}
}
-impl AddAssign<&USizeVec4> for USizeVec4 {
+impl AddAssign<&Self> for USizeVec4 {
#[inline]
- fn add_assign(&mut self, rhs: &USizeVec4) {
- self.add_assign(*rhs)
+ fn add_assign(&mut self, rhs: &Self) {
+ self.add_assign(*rhs);
}
}
@@ -1125,9 +1126,9 @@
}
impl Add<&usize> for USizeVec4 {
- type Output = USizeVec4;
+ type Output = Self;
#[inline]
- fn add(self, rhs: &usize) -> USizeVec4 {
+ fn add(self, rhs: &usize) -> Self {
self.add(*rhs)
}
}
@@ -1161,7 +1162,7 @@
impl AddAssign<&usize> for USizeVec4 {
#[inline]
fn add_assign(&mut self, rhs: &usize) {
- self.add_assign(*rhs)
+ self.add_assign(*rhs);
}
}
@@ -1202,7 +1203,7 @@
}
}
-impl Sub<USizeVec4> for USizeVec4 {
+impl Sub for USizeVec4 {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -1215,10 +1216,10 @@
}
}
-impl Sub<&USizeVec4> for USizeVec4 {
- type Output = USizeVec4;
+impl Sub<&Self> for USizeVec4 {
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &USizeVec4) -> USizeVec4 {
+ fn sub(self, rhs: &Self) -> Self {
self.sub(*rhs)
}
}
@@ -1239,9 +1240,9 @@
}
}
-impl SubAssign<USizeVec4> for USizeVec4 {
+impl SubAssign for USizeVec4 {
#[inline]
- fn sub_assign(&mut self, rhs: USizeVec4) {
+ fn sub_assign(&mut self, rhs: Self) {
self.x.sub_assign(rhs.x);
self.y.sub_assign(rhs.y);
self.z.sub_assign(rhs.z);
@@ -1249,10 +1250,10 @@
}
}
-impl SubAssign<&USizeVec4> for USizeVec4 {
+impl SubAssign<&Self> for USizeVec4 {
#[inline]
- fn sub_assign(&mut self, rhs: &USizeVec4) {
- self.sub_assign(*rhs)
+ fn sub_assign(&mut self, rhs: &Self) {
+ self.sub_assign(*rhs);
}
}
@@ -1270,9 +1271,9 @@
}
impl Sub<&usize> for USizeVec4 {
- type Output = USizeVec4;
+ type Output = Self;
#[inline]
- fn sub(self, rhs: &usize) -> USizeVec4 {
+ fn sub(self, rhs: &usize) -> Self {
self.sub(*rhs)
}
}
@@ -1306,7 +1307,7 @@
impl SubAssign<&usize> for USizeVec4 {
#[inline]
fn sub_assign(&mut self, rhs: &usize) {
- self.sub_assign(*rhs)
+ self.sub_assign(*rhs);
}
}
@@ -1347,7 +1348,7 @@
}
}
-impl Rem<USizeVec4> for USizeVec4 {
+impl Rem for USizeVec4 {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -1360,10 +1361,10 @@
}
}
-impl Rem<&USizeVec4> for USizeVec4 {
- type Output = USizeVec4;
+impl Rem<&Self> for USizeVec4 {
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &USizeVec4) -> USizeVec4 {
+ fn rem(self, rhs: &Self) -> Self {
self.rem(*rhs)
}
}
@@ -1384,7 +1385,7 @@
}
}
-impl RemAssign<USizeVec4> for USizeVec4 {
+impl RemAssign for USizeVec4 {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
self.x.rem_assign(rhs.x);
@@ -1394,10 +1395,10 @@
}
}
-impl RemAssign<&USizeVec4> for USizeVec4 {
+impl RemAssign<&Self> for USizeVec4 {
#[inline]
- fn rem_assign(&mut self, rhs: &USizeVec4) {
- self.rem_assign(*rhs)
+ fn rem_assign(&mut self, rhs: &Self) {
+ self.rem_assign(*rhs);
}
}
@@ -1415,9 +1416,9 @@
}
impl Rem<&usize> for USizeVec4 {
- type Output = USizeVec4;
+ type Output = Self;
#[inline]
- fn rem(self, rhs: &usize) -> USizeVec4 {
+ fn rem(self, rhs: &usize) -> Self {
self.rem(*rhs)
}
}
@@ -1451,7 +1452,7 @@
impl RemAssign<&usize> for USizeVec4 {
#[inline]
fn rem_assign(&mut self, rhs: &usize) {
- self.rem_assign(*rhs)
+ self.rem_assign(*rhs);
}
}
@@ -1496,7 +1497,7 @@
impl AsRef<[usize; 4]> for USizeVec4 {
#[inline]
fn as_ref(&self) -> &[usize; 4] {
- unsafe { &*(self as *const USizeVec4 as *const [usize; 4]) }
+ unsafe { &*(self as *const Self as *const [usize; 4]) }
}
}
@@ -1504,7 +1505,7 @@
impl AsMut<[usize; 4]> for USizeVec4 {
#[inline]
fn as_mut(&mut self) -> &mut [usize; 4] {
- unsafe { &mut *(self as *mut USizeVec4 as *mut [usize; 4]) }
+ unsafe { &mut *(self as *mut Self as *mut [usize; 4]) }
}
}
@@ -1551,7 +1552,7 @@
impl Not for USizeVec4 {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
x: self.x.not(),
y: self.y.not(),
@@ -1561,6 +1562,14 @@
}
}
+impl Not for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn not(self) -> USizeVec4 {
+ (*self).not()
+ }
+}
+
impl BitAnd for USizeVec4 {
type Output = Self;
#[inline]
@@ -1574,6 +1583,44 @@
}
}
+impl BitAnd<&Self> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &Self) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&USizeVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitand(self, rhs: &USizeVec4) -> USizeVec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<USizeVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitand(self, rhs: USizeVec4) -> USizeVec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign for USizeVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: Self) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&Self> for USizeVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &Self) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr for USizeVec4 {
type Output = Self;
#[inline]
@@ -1587,6 +1634,44 @@
}
}
+impl BitOr<&Self> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &Self) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&USizeVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitor(self, rhs: &USizeVec4) -> USizeVec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<USizeVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitor(self, rhs: USizeVec4) -> USizeVec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign for USizeVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: Self) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&Self> for USizeVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &Self) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor for USizeVec4 {
type Output = Self;
#[inline]
@@ -1600,6 +1685,44 @@
}
}
+impl BitXor<&Self> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &Self) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&USizeVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitxor(self, rhs: &USizeVec4) -> USizeVec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<USizeVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitxor(self, rhs: USizeVec4) -> USizeVec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign for USizeVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: Self) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&Self> for USizeVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &Self) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl BitAnd<usize> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1613,6 +1736,44 @@
}
}
+impl BitAnd<&usize> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitand(self, rhs: &usize) -> Self {
+ self.bitand(*rhs)
+ }
+}
+
+impl BitAnd<&usize> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitand(self, rhs: &usize) -> USizeVec4 {
+ (*self).bitand(*rhs)
+ }
+}
+
+impl BitAnd<usize> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitand(self, rhs: usize) -> USizeVec4 {
+ (*self).bitand(rhs)
+ }
+}
+
+impl BitAndAssign<usize> for USizeVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: usize) {
+ *self = self.bitand(rhs);
+ }
+}
+
+impl BitAndAssign<&usize> for USizeVec4 {
+ #[inline]
+ fn bitand_assign(&mut self, rhs: &usize) {
+ self.bitand_assign(*rhs);
+ }
+}
+
impl BitOr<usize> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1626,6 +1787,44 @@
}
}
+impl BitOr<&usize> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitor(self, rhs: &usize) -> Self {
+ self.bitor(*rhs)
+ }
+}
+
+impl BitOr<&usize> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitor(self, rhs: &usize) -> USizeVec4 {
+ (*self).bitor(*rhs)
+ }
+}
+
+impl BitOr<usize> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitor(self, rhs: usize) -> USizeVec4 {
+ (*self).bitor(rhs)
+ }
+}
+
+impl BitOrAssign<usize> for USizeVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: usize) {
+ *self = self.bitor(rhs);
+ }
+}
+
+impl BitOrAssign<&usize> for USizeVec4 {
+ #[inline]
+ fn bitor_assign(&mut self, rhs: &usize) {
+ self.bitor_assign(*rhs);
+ }
+}
+
impl BitXor<usize> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1639,6 +1838,44 @@
}
}
+impl BitXor<&usize> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn bitxor(self, rhs: &usize) -> Self {
+ self.bitxor(*rhs)
+ }
+}
+
+impl BitXor<&usize> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitxor(self, rhs: &usize) -> USizeVec4 {
+ (*self).bitxor(*rhs)
+ }
+}
+
+impl BitXor<usize> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn bitxor(self, rhs: usize) -> USizeVec4 {
+ (*self).bitxor(rhs)
+ }
+}
+
+impl BitXorAssign<usize> for USizeVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: usize) {
+ *self = self.bitxor(rhs);
+ }
+}
+
+impl BitXorAssign<&usize> for USizeVec4 {
+ #[inline]
+ fn bitxor_assign(&mut self, rhs: &usize) {
+ self.bitxor_assign(*rhs);
+ }
+}
+
impl Shl<i8> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1652,6 +1889,44 @@
}
}
+impl Shl<&i8> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i8> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &i8) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i8> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: i8) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i8> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i8> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i8> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1665,6 +1940,44 @@
}
}
+impl Shr<&i8> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i8> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &i8) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i8> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: i8) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i8> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i8> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i16> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1678,6 +1991,44 @@
}
}
+impl Shl<&i16> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i16> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &i16) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i16> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: i16) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i16> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i16> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i16> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1691,6 +2042,44 @@
}
}
+impl Shr<&i16> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i16> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &i16) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i16> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: i16) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i16> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i16> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i32> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1704,6 +2093,44 @@
}
}
+impl Shl<&i32> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i32> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &i32) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i32> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: i32) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i32> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i32> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i32> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1717,6 +2144,44 @@
}
}
+impl Shr<&i32> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i32> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &i32) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i32> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: i32) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i32> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i32> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<i64> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1730,6 +2195,44 @@
}
}
+impl Shl<&i64> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &i64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&i64> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &i64) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<i64> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: i64) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<i64> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: i64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&i64> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &i64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<i64> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1743,6 +2246,44 @@
}
}
+impl Shr<&i64> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &i64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&i64> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &i64) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<i64> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: i64) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<i64> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: i64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&i64> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &i64) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u8> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1756,6 +2297,44 @@
}
}
+impl Shl<&u8> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u8) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u8> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &u8) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u8> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: u8) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u8> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u8) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u8> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u8) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u8> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1769,6 +2348,44 @@
}
}
+impl Shr<&u8> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u8) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u8> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &u8) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u8> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: u8) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u8> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u8) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u8> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u8) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u16> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1782,6 +2399,44 @@
}
}
+impl Shl<&u16> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u16) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u16> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &u16) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u16> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: u16) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u16> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u16) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u16> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u16) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u16> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1795,6 +2450,44 @@
}
}
+impl Shr<&u16> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u16) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u16> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &u16) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u16> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: u16) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u16> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u16) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u16> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u16) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u32> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1808,6 +2501,44 @@
}
}
+impl Shl<&u32> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u32) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u32> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &u32) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u32> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: u32) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u32> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u32) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u32> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u32) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u32> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1821,6 +2552,44 @@
}
}
+impl Shr<&u32> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &u32) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u32> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &u32) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u32> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: u32) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u32> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u32) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u32> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u32) {
+ self.shr_assign(*rhs);
+ }
+}
+
impl Shl<u64> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1834,6 +2603,44 @@
}
}
+impl Shl<&u64> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: &u64) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&u64> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &u64) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<u64> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: u64) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl ShlAssign<u64> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: u64) {
+ *self = self.shl(rhs);
+ }
+}
+
+impl ShlAssign<&u64> for USizeVec4 {
+ #[inline]
+ fn shl_assign(&mut self, rhs: &u64) {
+ self.shl_assign(*rhs);
+ }
+}
+
impl Shr<u64> for USizeVec4 {
type Output = Self;
#[inline]
@@ -1847,10 +2654,48 @@
}
}
-impl Shl<crate::IVec4> for USizeVec4 {
+impl Shr<&u64> for USizeVec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::IVec4) -> Self::Output {
+ fn shr(self, rhs: &u64) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&u64> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &u64) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<u64> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: u64) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl ShrAssign<u64> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: u64) {
+ *self = self.shr(rhs);
+ }
+}
+
+impl ShrAssign<&u64> for USizeVec4 {
+ #[inline]
+ fn shr_assign(&mut self, rhs: &u64) {
+ self.shr_assign(*rhs);
+ }
+}
+
+impl Shl<IVec4> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1860,10 +2705,34 @@
}
}
-impl Shr<crate::IVec4> for USizeVec4 {
+impl Shl<&IVec4> for USizeVec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::IVec4) -> Self::Output {
+ fn shl(self, rhs: &IVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&IVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &IVec4) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<IVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: IVec4) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<IVec4> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1873,10 +2742,34 @@
}
}
-impl Shl<crate::UVec4> for USizeVec4 {
+impl Shr<&IVec4> for USizeVec4 {
type Output = Self;
#[inline]
- fn shl(self, rhs: crate::UVec4) -> Self::Output {
+ fn shr(self, rhs: &IVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&IVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &IVec4) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<IVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: IVec4) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
+impl Shl<UVec4> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> Self {
Self {
x: self.x.shl(rhs.x),
y: self.y.shl(rhs.y),
@@ -1886,10 +2779,34 @@
}
}
-impl Shr<crate::UVec4> for USizeVec4 {
+impl Shl<&UVec4> for USizeVec4 {
type Output = Self;
#[inline]
- fn shr(self, rhs: crate::UVec4) -> Self::Output {
+ fn shl(self, rhs: &UVec4) -> Self {
+ self.shl(*rhs)
+ }
+}
+
+impl Shl<&UVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: &UVec4) -> USizeVec4 {
+ (*self).shl(*rhs)
+ }
+}
+
+impl Shl<UVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shl(self, rhs: UVec4) -> USizeVec4 {
+ (*self).shl(rhs)
+ }
+}
+
+impl Shr<UVec4> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> Self {
Self {
x: self.x.shr(rhs.x),
y: self.y.shr(rhs.y),
@@ -1899,6 +2816,30 @@
}
}
+impl Shr<&UVec4> for USizeVec4 {
+ type Output = Self;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> Self {
+ self.shr(*rhs)
+ }
+}
+
+impl Shr<&UVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: &UVec4) -> USizeVec4 {
+ (*self).shr(*rhs)
+ }
+}
+
+impl Shr<UVec4> for &USizeVec4 {
+ type Output = USizeVec4;
+ #[inline]
+ fn shr(self, rhs: UVec4) -> USizeVec4 {
+ (*self).shr(rhs)
+ }
+}
+
impl Index<usize> for USizeVec4 {
type Output = usize;
#[inline]
diff --git a/crates/glam/templates/affine.rs.tera b/crates/glam/templates/affine.rs.tera
index 4033678..861946f 100644
--- a/crates/glam/templates/affine.rs.tera
+++ b/crates/glam/templates/affine.rs.tera
@@ -1,3 +1,5 @@
+{% import "macros.rs.tera" as macros %}
+
// Generated from {{template_path}} template. Edit the template, not the generated file.
{% if scalar_t == "f32" %}
@@ -6,9 +8,9 @@
{% set col_t = "Vec3A" %}
{% set mat_t = "Mat3A" %}
{% else %}
- {% set self_t = "Affine" ~ dim %}
- {% set col_t = "Vec" ~ dim %}
- {% set mat_t = "Mat" ~ dim %}
+ {% set self_t = "Affine2" %}
+ {% set col_t = "Vec2" %}
+ {% set mat_t = "Mat2" %}
{% endif %}
{% set quat_t = "Quat" %}
{% set vec2_t = "Vec2" %}
@@ -59,6 +61,14 @@
/// This type is 16 byte aligned.
{%- endif %}
#[derive(Copy, Clone)]
+{%- if self_t == "Affine2" %}
+#[cfg_attr(all(feature = "bytemuck", not(feature = "scalar-math")), derive(bytemuck::AnyBitPattern))]
+#[cfg_attr(all(feature = "bytemuck", feature = "scalar-math"), derive(bytemuck::Pod, bytemuck::Zeroable))]
+{%- elif self_t == "Affine3A" and is_scalar %}
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::AnyBitPattern))]
+{%- else %}
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
+{%- endif %}
#[repr(C)]
pub struct {{ self_t }} {
pub matrix{{ dim }}: {{ mat_t }},
@@ -814,10 +824,10 @@
}
impl Mul for {{ self_t }} {
- type Output = {{ self_t }};
+ type Output = Self;
#[inline]
- fn mul(self, rhs: {{ self_t }}) -> Self::Output {
+ fn mul(self, rhs: Self) -> Self {
Self {
matrix{{ dim }}: self.matrix{{ dim }} * rhs.matrix{{ dim }},
translation: self.matrix{{ dim }} * rhs.translation + self.translation,
@@ -825,17 +835,14 @@
}
}
-impl MulAssign for {{ self_t }} {
- #[inline]
- fn mul_assign(&mut self, rhs: {{ self_t }}) {
- *self = self.mul(rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Mul", self_t=self_t, rhs_t=self_t) }}
{% if dim == 2 %}
impl From<{{ self_t }}> for {{ mat3_t }} {
#[inline]
- fn from(m: {{ self_t }}) -> {{ mat3_t }} {
+ fn from(m: {{ self_t }}) -> Self {
Self::from_cols(
m.matrix2.x_axis.extend(0.0),
m.matrix2.y_axis.extend(0.0),
@@ -853,27 +860,22 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=mat3_t, output_t=mat3_t) }}
+
impl Mul<{{ self_t }}> for {{ mat3_t }} {
- type Output = {{ mat3_t }};
+ type Output = Self;
#[inline]
- fn mul(self, rhs: {{ self_t }}) -> Self::Output {
- self * {{ mat3_t }}::from(rhs)
+ fn mul(self, rhs: {{ self_t }}) -> Self {
+ self * Self::from(rhs)
}
}
+
+{{ macros::impl_ref_binop(imp="Mul", self_t=mat3_t, rhs_t=self_t, output_t=mat3_t) }}
+
+{{ macros::impl_op_assign(imp="Mul", self_t=mat3_t, rhs_t=self_t) }}
+
{% elif dim == 3 %}
-impl From<{{ self_t }}> for {{ mat4_t }} {
- #[inline]
- fn from(m: {{ self_t }}) -> {{ mat4_t }} {
- {{ mat4_t }}::from_cols(
- m.matrix3.x_axis.extend(0.0),
- m.matrix3.y_axis.extend(0.0),
- m.matrix3.z_axis.extend(0.0),
- m.translation.extend(1.0),
- )
- }
-}
-
impl Mul<{{ mat4_t }}> for {{ self_t }} {
type Output = {{ mat4_t }};
@@ -883,28 +885,37 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=mat4_t, output_t=mat4_t) }}
+
impl Mul<{{ self_t }}> for {{ mat4_t }} {
- type Output = {{ mat4_t }};
+ type Output = Self;
#[inline]
- fn mul(self, rhs: {{ self_t }}) -> Self::Output {
- self * {{ mat4_t }}::from(rhs)
+ fn mul(self, rhs: {{ self_t }}) -> Self {
+ self * Self::from(rhs)
}
}
-{% endif %}
-{% if self_t == "Affine2" %}
-impl From<Affine2> for Mat3A {
+{{ macros::impl_ref_binop(imp="Mul", self_t=mat4_t, rhs_t=self_t, output_t=mat4_t) }}
+
+{{ macros::impl_op_assign(imp="Mul", self_t=mat4_t, rhs_t=self_t) }}
+
+
+impl From<{{ self_t }}> for {{ mat4_t }} {
#[inline]
- fn from(m: Affine2) -> Mat3A {
+ fn from(m: {{ self_t }}) -> Self {
Self::from_cols(
- Vec3A::from((m.matrix2.x_axis, 0.0)),
- Vec3A::from((m.matrix2.y_axis, 0.0)),
- Vec3A::from((m.translation, 1.0)),
+ m.matrix3.x_axis.extend(0.0),
+ m.matrix3.y_axis.extend(0.0),
+ m.matrix3.z_axis.extend(0.0),
+ m.translation.extend(1.0),
)
}
}
+{% endif %}
+
+{% if self_t == "Affine2" %}
impl Mul<Mat3A> for Affine2 {
type Output = Mat3A;
@@ -914,12 +925,29 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t="Mat3A", output_t="Mat3A") }}
+
impl Mul<Affine2> for Mat3A {
- type Output = Mat3A;
+ type Output = Self;
#[inline]
- fn mul(self, rhs: Affine2) -> Self::Output {
- self * Mat3A::from(rhs)
+ fn mul(self, rhs: Affine2) -> Self {
+ self * Self::from(rhs)
+ }
+}
+
+{{ macros::impl_ref_binop(imp="Mul", self_t="Mat3A", rhs_t=self_t, output_t="Mat3A") }}
+
+{{ macros::impl_op_assign(imp="Mul", self_t="Mat3A", rhs_t=self_t) }}
+
+impl From<Affine2> for Mat3A {
+ #[inline]
+ fn from(m: Affine2) -> Self {
+ Self::from_cols(
+ Vec3A::from((m.matrix2.x_axis, 0.0)),
+ Vec3A::from((m.matrix2.y_axis, 0.0)),
+ Vec3A::from((m.translation, 1.0)),
+ )
}
}
{% endif %}
diff --git a/crates/glam/templates/float.rs.tera b/crates/glam/templates/float.rs.tera
index 0f708e8..46263c1 100644
--- a/crates/glam/templates/float.rs.tera
+++ b/crates/glam/templates/float.rs.tera
@@ -4,23 +4,23 @@
impl FloatExt for {{ scalar_t }} {
#[inline]
- fn lerp(self, rhs: {{ scalar_t }}, t: {{ scalar_t }}) -> {{ scalar_t }} {
+ fn lerp(self, rhs: Self, t: Self) -> Self {
self + (rhs - self) * t
}
#[inline]
- fn inverse_lerp(a: {{ scalar_t }}, b: {{ scalar_t }}, v: {{ scalar_t }}) -> {{ scalar_t }} {
+ fn inverse_lerp(a: Self, b: Self, v: Self) -> Self {
(v - a) / (b - a)
}
#[inline]
- fn remap(self, in_start: {{ scalar_t }}, in_end: {{ scalar_t }}, out_start: {{ scalar_t }}, out_end: {{ scalar_t }}) -> {{ scalar_t }} {
- let t = {{ scalar_t }}::inverse_lerp(in_start, in_end, self);
- {{ scalar_t }}::lerp(out_start, out_end, t)
+ fn remap(self, in_start: Self, in_end: Self, out_start: Self, out_end: Self) -> Self {
+ let t = Self::inverse_lerp(in_start, in_end, self);
+ Self::lerp(out_start, out_end, t)
}
#[inline]
- fn fract_gl(self) -> {{ scalar_t }} {
+ fn fract_gl(self) -> Self {
self - crate::{{ scalar_t }}::math::floor(self)
}
}
diff --git a/crates/glam/templates/macros.rs.tera b/crates/glam/templates/macros.rs.tera
index 83b6c6b..f1862d8 100644
--- a/crates/glam/templates/macros.rs.tera
+++ b/crates/glam/templates/macros.rs.tera
@@ -72,35 +72,77 @@
}
{% endmacro impl_mat4_minor %}
-
-{% macro impl_op_ref_inner(op, self_t, rhs_t, output_t, self, self_ref, rhs_ref) %}
-{% set method = op | snake_case %}
-{% if rhs_ref and rhs_t %}
- {% set rhs = "&" ~ rhs_t %}
-{% elif rhs_t %}
- {% set rhs = rhs_t %}
-{% endif %}
-
-impl {{ op }}{% if rhs_t %}<{{ rhs }}>{% endif %} for {% if self_ref %}&{% endif %}{{ self_t }} {
- {% if output_t %}
- type Output = {{ output_t }};
- {% endif -%}
- #[inline]
- fn {{ method }}({{ self }}{% if rhs_t %}, rhs: {{ rhs }}{% endif %}){% if output_t %} -> {{ output_t }}{% endif %}{
- {% if self_ref %} (*self) {% else %} self {% endif %}.{{method}}
- ({% if rhs_ref %} *rhs {% elif rhs_t %} rhs {% endif %})
+{% macro impl_ref_unop(imp, self_t, output_t) %}
+ {% set op = imp | lower %}
+ impl {{ imp }} for &{{ self_t }} {
+ type Output = {{ output_t }};
+ #[inline]
+ fn {{ op }}(self) -> {{ output_t }} {
+ (*self).{{ op }}()
+ }
}
-}
-{% endmacro impl_op_ref_inner %}
+{% endmacro impl_ref_unop %}
-{% macro impl_op_ref(op, self_t, rhs_t=false, output_t=false, self="self") %}
-{%if rhs_t %}
- {{ self::impl_op_ref_inner(op=op, self_t=self_t, rhs_t=rhs_t, output_t=output_t, self=self, self_ref=false, rhs_ref=true) }}
- {%if output_t %}
- {{ self::impl_op_ref_inner(op=op, self_t=self_t, rhs_t=rhs_t, output_t=output_t, self=self, self_ref=true, rhs_ref=true) }}
+{% macro impl_ref_binop(imp, self_t, rhs_t, output_t) %}
+ {% set op = imp | lower %}
+ {% if rhs_t == self_t %}
+ {% set val_rhs_t = "Self" %}
+ {% else %}
+ {% set val_rhs_t = rhs_t %}
{% endif %}
-{% endif %}
-{%if output_t %}
- {{ self::impl_op_ref_inner(op=op, self_t=self_t, rhs_t=rhs_t, output_t=output_t, self=self, self_ref=true, rhs_ref=false) }}
-{% endif %}
-{% endmacro impl_op_ref %}
+ {% if output_t == self_t %}
+ {% set val_output_t = "Self" %}
+ {% else %}
+ {% set val_output_t = output_t %}
+ {% endif %}
+ impl {{ imp }}<&{{ val_rhs_t }}> for {{ self_t }} {
+ type Output = {{ val_output_t }};
+ #[inline]
+ fn {{ op }}(self, rhs: &{{ val_rhs_t }}) -> {{ val_output_t }}
+ {
+ self.{{ op }}(*rhs)
+ }
+ }
+
+ impl {{ imp }}<&{{ rhs_t }}> for &{{ self_t }} {
+ type Output = {{ output_t }};
+ #[inline]
+ fn {{ op }}(self, rhs: &{{ rhs_t }}) -> {{ output_t }} {
+ (*self).{{ op }}(*rhs)
+ }
+ }
+
+ impl {{ imp }}<{{ rhs_t }}> for &{{ self_t }} {
+ type Output = {{ output_t }};
+ #[inline]
+ fn {{ op }}(self, rhs: {{ rhs_t }}) -> {{ output_t }} {
+ (*self).{{ op }}(rhs)
+ }
+ }
+{% endmacro impl_ref_biop %}
+
+{% macro impl_ref_op_assign(imp, self_t, rhs_t) %}
+ {% set op = imp | lower %}
+ {% if rhs_t == self_t %}
+ {% set rhs_t = "Self" %}
+ {% endif %}
+ impl {{ imp }}Assign<&{{ rhs_t }}> for {{ self_t }} {
+ #[inline]
+ fn {{ op }}_assign(&mut self, rhs: &{{ rhs_t }}) {
+ self.{{ op }}_assign(*rhs);
+ }
+ }
+{% endmacro forward_ref_op_assign %}
+
+{% macro impl_op_assign(imp, self_t, rhs_t) %}
+ {% set op = imp | lower %}
+ impl {{ imp }}Assign{% if rhs_t != self_t %}<{{rhs_t}}>{% endif %} for {{ self_t }} {
+ #[inline]
+ fn {{ op }}_assign(&mut self, rhs: {% if rhs_t == self_t %} Self {% else %} {{ rhs_t }} {% endif %}) {
+ *self = self.{{ op }}(rhs);
+ }
+ }
+
+ {{ self::impl_ref_op_assign(imp=imp, self_t=self_t, rhs_t=rhs_t) }}
+{% endmacro impl_op_assign %}
+
diff --git a/crates/glam/templates/mat.rs.tera b/crates/glam/templates/mat.rs.tera
index 1503467..e624d48 100644
--- a/crates/glam/templates/mat.rs.tera
+++ b/crates/glam/templates/mat.rs.tera
@@ -200,6 +200,11 @@
/// This type is 16 byte aligned.
{%- endif %}
#[derive(Clone, Copy)]
+{%- if self_t == "Mat3A" and is_scalar %}
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::AnyBitPattern))]
+{%- else %}
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
+{%- endif %}
{%- if self_t == "Mat4" and is_scalar %}
#[cfg_attr(
any(
@@ -1804,6 +1809,103 @@
Self::look_to_rh(eye, center.sub(eye).normalize(), up)
}
+ /// Creates a right-handed perspective projection matrix with [-1,1] depth range.
+ ///
+ /// This is the same as the OpenGL `glFurstum` function.
+ ///
+ /// See <https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml>
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh_gl(
+ left: {{ scalar_t }},
+ right: {{ scalar_t }},
+ bottom: {{ scalar_t }},
+ top: {{ scalar_t }},
+ z_near: {{ scalar_t }},
+ z_far: {{ scalar_t }},
+ ) -> Self {
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -(z_far + z_near) * inv_depth;
+ let d = -(2.0 * z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ {{ col_t }}::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ {{ col_t }}::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ {{ col_t }}::new(a, b, c, -1.0),
+ {{ col_t }}::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a left-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_lh(
+ left: {{ scalar_t }},
+ right: {{ scalar_t }},
+ bottom: {{ scalar_t }},
+ top: {{ scalar_t }},
+ z_near: {{ scalar_t }},
+ z_far: {{ scalar_t }},
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ {{ col_t }}::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ {{ col_t }}::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ {{ col_t }}::new(a, b, c, 1.0),
+ {{ col_t }}::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
+ /// Creates a right-handed perspective projection matrix with `[0,1]` depth range.
+ ///
+ /// # Panics
+ ///
+ /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is
+ /// enabled.
+ #[inline]
+ #[must_use]
+ pub fn frustum_rh(
+ left: {{ scalar_t }},
+ right: {{ scalar_t }},
+ bottom: {{ scalar_t }},
+ top: {{ scalar_t }},
+ z_near: {{ scalar_t }},
+ z_far: {{ scalar_t }},
+ ) -> Self {
+ glam_assert!(z_near > 0.0 && z_far > 0.0);
+ let inv_width = 1.0 / (right - left);
+ let inv_height = 1.0 / (top - bottom);
+ let inv_depth = 1.0 / (z_far - z_near);
+ let a = (right + left) * inv_width;
+ let b = (top + bottom) * inv_height;
+ let c = -z_far * inv_depth;
+ let d = -(z_far * z_near) * inv_depth;
+ let two_z_near = 2.0 * z_near;
+ Self::from_cols(
+ {{ col_t }}::new(two_z_near * inv_width, 0.0, 0.0, 0.0),
+ {{ col_t }}::new(0.0, two_z_near * inv_height, 0.0, 0.0),
+ {{ col_t }}::new(a, b, c, -1.0),
+ {{ col_t }}::new(0.0, 0.0, d, 0.0),
+ )
+ }
+
/// Creates a right-handed perspective projection matrix with `[-1,1]` depth range.
///
/// Useful to map the standard right-handed coordinate system into what OpenGL expects.
@@ -2285,107 +2387,21 @@
#[inline]
#[must_use]
pub fn mul_mat{{ dim }}(&self, rhs: &Self) -> Self {
- {% if self_t == "Mat2" and is_sse2 %}
- unsafe {
- let abcd = self.0;
- let rhs = rhs.0;
- let xxyy0 = _mm_shuffle_ps(rhs, rhs, 0b01_01_00_00);
- let xxyy1 = _mm_shuffle_ps(rhs, rhs, 0b11_11_10_10);
- let axbxcydy0 = _mm_mul_ps(abcd, xxyy0);
- let axbxcydy1 = _mm_mul_ps(abcd, xxyy1);
- let cydyaxbx0 = _mm_shuffle_ps(axbxcydy0, axbxcydy0, 0b01_00_11_10);
- let cydyaxbx1 = _mm_shuffle_ps(axbxcydy1, axbxcydy1, 0b01_00_11_10);
- let result0 = _mm_add_ps(axbxcydy0, cydyaxbx0);
- let result1 = _mm_add_ps(axbxcydy1, cydyaxbx1);
- Self(_mm_shuffle_ps(result0, result1, 0b01_00_01_00))
- }
- {% elif self_t == "Mat2" and is_wasm32 %}
- let abcd = self.0;
- let rhs = rhs.0;
- let xxyy0 = i32x4_shuffle::<0, 0, 5, 5>(rhs, rhs);
- let xxyy1 = i32x4_shuffle::<2, 2, 7, 7>(rhs, rhs);
- let axbxcydy0 = f32x4_mul(abcd, xxyy0);
- let axbxcydy1 = f32x4_mul(abcd, xxyy1);
- let cydyaxbx0 = i32x4_shuffle::<2, 3, 4, 5>(axbxcydy0, axbxcydy0);
- let cydyaxbx1 = i32x4_shuffle::<2, 3, 4, 5>(axbxcydy1, axbxcydy1);
- let result0 = f32x4_add(axbxcydy0, cydyaxbx0);
- let result1 = f32x4_add(axbxcydy1, cydyaxbx1);
- Self(i32x4_shuffle::<0, 1, 4, 5>(result0, result1))
- {% elif self_t == "Mat2" and is_coresimd %}
- let abcd = self.0;
- let xxyy0 = simd_swizzle!(rhs.0, [0, 0, 1, 1]);
- let xxyy1 = simd_swizzle!(rhs.0, [2, 2, 3, 3]);
- let axbxcydy0 = abcd * xxyy0;
- let axbxcydy1 = abcd * xxyy1;
- let cydyaxbx0 = simd_swizzle!(axbxcydy0, [2, 3, 0, 1]);
- let cydyaxbx1 = simd_swizzle!(axbxcydy1, [2, 3, 0, 1]);
- let result0 = axbxcydy0 + cydyaxbx0;
- let result1 = axbxcydy1 + cydyaxbx1;
- Self(simd_swizzle!(result0, result1, [0, 1, 4, 5]))
- {% elif self_t == "Mat2" and is_neon %}
- unsafe {
- let abcd = self.0;
- let xxyy0 = vzip1q_f32(rhs.0, rhs.0);
- let xxyy1 = vzip2q_f32(rhs.0, rhs.0);
- let axbxcydy0 = vmulq_f32(abcd, xxyy0);
- let axbxcydy1 = vmulq_f32(abcd, xxyy1);
- let cydyaxbx0 = vextq_f32(axbxcydy0, axbxcydy0, 2);
- let cydyaxbx1 = vextq_f32(axbxcydy1, axbxcydy1, 2);
- let result0 = vaddq_f32(axbxcydy0, cydyaxbx0);
- let result1 = vaddq_f32(axbxcydy1, cydyaxbx1);
- Self(vreinterpretq_f32_u64(
- vsetq_lane_u64(vgetq_lane_u64(vreinterpretq_u64_f32(result1), 0),
- vreinterpretq_u64_f32(result0), 1)))
- }
- {% else %}
- Self::from_cols(
- {% for axis in axes %}
- self.mul(rhs.{{ axis }}),
- {%- endfor %}
- )
- {% endif %}
+ self.mul(rhs)
}
/// Adds two {{ nxn }} matrices.
#[inline]
#[must_use]
pub fn add_mat{{ dim }}(&self, rhs: &Self) -> Self {
- {% if self_t == "Mat2" and is_sse2 %}
- Self(unsafe { _mm_add_ps(self.0, rhs.0) })
- {% elif self_t == "Mat2" and is_wasm32 %}
- Self(f32x4_add(self.0, rhs.0))
- {% elif self_t == "Mat2" and is_coresimd %}
- Self(self.0 + rhs.0)
- {% elif self_t == "Mat2" and is_neon %}
- Self(unsafe { vaddq_f32(self.0, rhs.0) })
- {% else %}
- Self::from_cols(
- {% for axis in axes %}
- self.{{ axis }}.add(rhs.{{ axis }}),
- {%- endfor %}
- )
- {% endif %}
+ self.add(rhs)
}
/// Subtracts two {{ nxn }} matrices.
#[inline]
#[must_use]
pub fn sub_mat{{ dim }}(&self, rhs: &Self) -> Self {
- {% if self_t == "Mat2" and is_sse2 %}
- Self(unsafe { _mm_sub_ps(self.0, rhs.0) })
- {% elif self_t == "Mat2" and is_wasm32 %}
- Self(f32x4_sub(self.0, rhs.0))
- {% elif self_t == "Mat2" and is_coresimd %}
- Self(self.0 - rhs.0)
- {% elif self_t == "Mat2" and is_neon %}
- Self(unsafe { vsubq_f32(self.0, rhs.0) })
- {% else %}
- Self::from_cols(
- {% for axis in axes %}
- self.{{ axis }}.sub(rhs.{{ axis }}),
- {%- endfor %}
- )
- {% endif %}
+ self.sub(rhs)
}
/// Multiplies a {{ nxn }} matrix by a scalar.
@@ -2488,35 +2504,57 @@
}
}
-impl Add<{{ self_t }}> for {{ self_t }} {
+impl Add for {{ self_t }} {
type Output = Self;
#[inline]
- fn add(self, rhs: Self) -> Self::Output {
- self.add_mat{{ dim }}(&rhs)
+ fn add(self, rhs: Self) -> Self {
+ {% if self_t == "Mat2" and is_sse2 %}
+ Self(unsafe { _mm_add_ps(self.0, rhs.0) })
+ {% elif self_t == "Mat2" and is_wasm32 %}
+ Self(f32x4_add(self.0, rhs.0))
+ {% elif self_t == "Mat2" and is_coresimd %}
+ Self(self.0 + rhs.0)
+ {% elif self_t == "Mat2" and is_neon %}
+ Self(unsafe { vaddq_f32(self.0, rhs.0) })
+ {% else %}
+ Self::from_cols(
+ {% for axis in axes %}
+ self.{{ axis }}.add(rhs.{{ axis }}),
+ {%- endfor %}
+ )
+ {% endif %}
}
}
-impl AddAssign<{{ self_t }}> for {{ self_t }} {
- #[inline]
- fn add_assign(&mut self, rhs: Self) {
- *self = self.add_mat{{ dim }}(&rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="Add", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
-impl Sub<{{ self_t }}> for {{ self_t }} {
+{{ macros::impl_op_assign(imp="Add", self_t=self_t, rhs_t=self_t) }}
+
+impl Sub for {{ self_t }} {
type Output = Self;
#[inline]
- fn sub(self, rhs: Self) -> Self::Output {
- self.sub_mat{{ dim }}(&rhs)
+ fn sub(self, rhs: Self) -> Self {
+ {% if self_t == "Mat2" and is_sse2 %}
+ Self(unsafe { _mm_sub_ps(self.0, rhs.0) })
+ {% elif self_t == "Mat2" and is_wasm32 %}
+ Self(f32x4_sub(self.0, rhs.0))
+ {% elif self_t == "Mat2" and is_coresimd %}
+ Self(self.0 - rhs.0)
+ {% elif self_t == "Mat2" and is_neon %}
+ Self(unsafe { vsubq_f32(self.0, rhs.0) })
+ {% else %}
+ Self::from_cols(
+ {% for axis in axes %}
+ self.{{ axis }}.sub(rhs.{{ axis }}),
+ {%- endfor %}
+ )
+ {% endif %}
}
}
-impl SubAssign<{{ self_t }}> for {{ self_t }} {
- #[inline]
- fn sub_assign(&mut self, rhs: Self) {
- *self = self.sub_mat{{ dim }}(&rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="Sub", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Sub", self_t=self_t, rhs_t=self_t) }}
impl Neg for {{ self_t }} {
type Output = Self;
@@ -2540,20 +2578,77 @@
}
}
-impl Mul<{{ self_t }}> for {{ self_t }} {
+{{ macros::impl_ref_unop(imp="Neg", self_t=self_t, output_t=self_t) }}
+
+impl Mul for {{ self_t }} {
type Output = Self;
#[inline]
- fn mul(self, rhs: Self) -> Self::Output {
- self.mul_mat{{ dim }}(&rhs)
+ fn mul(self, rhs: Self) -> Self {
+ {% if self_t == "Mat2" and is_sse2 %}
+ unsafe {
+ let abcd = self.0;
+ let rhs = rhs.0;
+ let xxyy0 = _mm_shuffle_ps(rhs, rhs, 0b01_01_00_00);
+ let xxyy1 = _mm_shuffle_ps(rhs, rhs, 0b11_11_10_10);
+ let axbxcydy0 = _mm_mul_ps(abcd, xxyy0);
+ let axbxcydy1 = _mm_mul_ps(abcd, xxyy1);
+ let cydyaxbx0 = _mm_shuffle_ps(axbxcydy0, axbxcydy0, 0b01_00_11_10);
+ let cydyaxbx1 = _mm_shuffle_ps(axbxcydy1, axbxcydy1, 0b01_00_11_10);
+ let result0 = _mm_add_ps(axbxcydy0, cydyaxbx0);
+ let result1 = _mm_add_ps(axbxcydy1, cydyaxbx1);
+ Self(_mm_shuffle_ps(result0, result1, 0b01_00_01_00))
+ }
+ {% elif self_t == "Mat2" and is_wasm32 %}
+ let abcd = self.0;
+ let rhs = rhs.0;
+ let xxyy0 = i32x4_shuffle::<0, 0, 5, 5>(rhs, rhs);
+ let xxyy1 = i32x4_shuffle::<2, 2, 7, 7>(rhs, rhs);
+ let axbxcydy0 = f32x4_mul(abcd, xxyy0);
+ let axbxcydy1 = f32x4_mul(abcd, xxyy1);
+ let cydyaxbx0 = i32x4_shuffle::<2, 3, 4, 5>(axbxcydy0, axbxcydy0);
+ let cydyaxbx1 = i32x4_shuffle::<2, 3, 4, 5>(axbxcydy1, axbxcydy1);
+ let result0 = f32x4_add(axbxcydy0, cydyaxbx0);
+ let result1 = f32x4_add(axbxcydy1, cydyaxbx1);
+ Self(i32x4_shuffle::<0, 1, 4, 5>(result0, result1))
+ {% elif self_t == "Mat2" and is_coresimd %}
+ let abcd = self.0;
+ let xxyy0 = simd_swizzle!(rhs.0, [0, 0, 1, 1]);
+ let xxyy1 = simd_swizzle!(rhs.0, [2, 2, 3, 3]);
+ let axbxcydy0 = abcd * xxyy0;
+ let axbxcydy1 = abcd * xxyy1;
+ let cydyaxbx0 = simd_swizzle!(axbxcydy0, [2, 3, 0, 1]);
+ let cydyaxbx1 = simd_swizzle!(axbxcydy1, [2, 3, 0, 1]);
+ let result0 = axbxcydy0 + cydyaxbx0;
+ let result1 = axbxcydy1 + cydyaxbx1;
+ Self(simd_swizzle!(result0, result1, [0, 1, 4, 5]))
+ {% elif self_t == "Mat2" and is_neon %}
+ unsafe {
+ let abcd = self.0;
+ let xxyy0 = vzip1q_f32(rhs.0, rhs.0);
+ let xxyy1 = vzip2q_f32(rhs.0, rhs.0);
+ let axbxcydy0 = vmulq_f32(abcd, xxyy0);
+ let axbxcydy1 = vmulq_f32(abcd, xxyy1);
+ let cydyaxbx0 = vextq_f32(axbxcydy0, axbxcydy0, 2);
+ let cydyaxbx1 = vextq_f32(axbxcydy1, axbxcydy1, 2);
+ let result0 = vaddq_f32(axbxcydy0, cydyaxbx0);
+ let result1 = vaddq_f32(axbxcydy1, cydyaxbx1);
+ Self(vreinterpretq_f32_u64(
+ vsetq_lane_u64(vgetq_lane_u64(vreinterpretq_u64_f32(result1), 0),
+ vreinterpretq_u64_f32(result0), 1)))
+ }
+ {% else %}
+ Self::from_cols(
+ {% for axis in axes %}
+ self.mul(rhs.{{ axis }}),
+ {%- endfor %}
+ )
+ {% endif %}
}
}
-impl MulAssign<{{ self_t }}> for {{ self_t }} {
- #[inline]
- fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_mat{{ dim }}(&rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Mul", self_t=self_t, rhs_t=self_t) }}
impl Mul<{{ col_t }}> for {{ self_t }} {
type Output = {{ col_t }};
@@ -2567,6 +2662,8 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=col_t, output_t=col_t) }}
+
impl Mul<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
#[inline]
@@ -2575,20 +2672,19 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
+
impl Mul<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
- fn mul(self, rhs: {{ scalar_t }}) -> Self::Output {
+ fn mul(self, rhs: {{ scalar_t }}) -> Self {
self.mul_scalar(rhs)
}
}
-impl MulAssign<{{ scalar_t }}> for {{ self_t }} {
- #[inline]
- fn mul_assign(&mut self, rhs: {{ scalar_t }}) {
- *self = self.mul_scalar(rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Mul", self_t=self_t, rhs_t=scalar_t) }}
impl Div<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
@@ -2598,20 +2694,19 @@
}
}
+{{ macros::impl_ref_binop(imp="Div", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
+
impl Div<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
- fn div(self, rhs: {{ scalar_t }}) -> Self::Output {
+ fn div(self, rhs: {{ scalar_t }}) -> Self {
self.div_scalar(rhs)
}
}
-impl DivAssign<{{ scalar_t }}> for {{ self_t }} {
- #[inline]
- fn div_assign(&mut self, rhs: {{ scalar_t }}) {
- *self = self.div_scalar(rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="Div", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Div", self_t=self_t, rhs_t=scalar_t) }}
{% if self_t == "Mat3" %}
impl Mul<Vec3A> for Mat3 {
@@ -2622,6 +2717,8 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t="Vec3A", output_t="Vec3A") }}
+
impl From<Mat3A> for Mat3 {
#[inline]
fn from(m: Mat3A) -> Self {
@@ -2641,6 +2738,8 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t="Vec3", output_t="Vec3") }}
+
impl From<Mat3> for Mat3A {
#[inline]
fn from(m: Mat3) -> Self {
diff --git a/crates/glam/templates/quat.rs.tera b/crates/glam/templates/quat.rs.tera
index eabd8b1..714bd22 100644
--- a/crates/glam/templates/quat.rs.tera
+++ b/crates/glam/templates/quat.rs.tera
@@ -1,3 +1,5 @@
+{% import "macros.rs.tera" as macros %}
+
// Generated from {{template_path}} template. Edit the template, not the generated file.
{% if not is_scalar %}
@@ -69,7 +71,7 @@
{% if not is_scalar %}
Deref, DerefMut,
{% endif %}
- Add, Div, Mul, MulAssign, Neg, Sub
+ Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign
};
{% if is_sse2 or is_neon %}
@@ -102,6 +104,7 @@
/// This type is 16 byte aligned.
{%- endif %}
#[derive(Clone, Copy)]
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
{%- if is_scalar %}
{%- if scalar_t == "f32" %}
#[cfg_attr(not(any(feature = "scalar-math", target_arch = "spirv")), repr(align(16)))]
@@ -576,6 +579,7 @@
///
/// Will panic if `up` is not normalized when `glam_assert` is enabled.
#[inline]
+ #[must_use]
pub fn look_at_rh(eye: {{ vec3_t }}, center: {{ vec3_t }}, up: {{ vec3_t }}) -> Self {
Self::look_to_rh(center.sub(eye).normalize(), up)
}
@@ -1242,7 +1246,7 @@
}
}
-impl Add<{{ self_t }}> for {{ self_t }} {
+impl Add for {{ self_t }} {
type Output = Self;
/// Adds two quaternions.
///
@@ -1256,7 +1260,11 @@
}
}
-impl Sub<{{ self_t }}> for {{ self_t }} {
+{{ macros::impl_ref_binop(imp="Add", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Add", self_t=self_t, rhs_t=self_t) }}
+
+impl Sub for {{ self_t }} {
type Output = Self;
/// Subtracts the `rhs` quaternion from `self`.
///
@@ -1267,6 +1275,10 @@
}
}
+{{ macros::impl_ref_binop(imp="Sub", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Sub", self_t=self_t, rhs_t=self_t) }}
+
impl Mul<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
/// Multiplies a quaternion by a scalar value.
@@ -1278,6 +1290,10 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Mul", self_t=self_t, rhs_t=scalar_t) }}
+
impl Div<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
/// Divides a quaternion by a scalar value.
@@ -1288,7 +1304,11 @@
}
}
-impl Mul<{{ self_t }}> for {{ self_t }} {
+{{ macros::impl_ref_binop(imp="Div", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Div", self_t=self_t, rhs_t=scalar_t) }}
+
+impl Mul for {{ self_t }} {
type Output = Self;
/// Multiplies two quaternions. If they each represent a rotation, the result will
/// represent the combined rotation.
@@ -1305,21 +1325,9 @@
}
}
-impl MulAssign<{{ self_t }}> for {{ self_t }} {
- /// Multiplies two quaternions. If they each represent a rotation, the result will
- /// represent the combined rotation.
- ///
- /// Note that due to floating point rounding the result may not be perfectly
- /// normalized.
- ///
- /// # Panics
- ///
- /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.
- #[inline]
- fn mul_assign(&mut self, rhs: Self) {
- *self = self.mul_quat(rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="Mul", self_t=self_t, rhs_t=self_t) }}
impl Mul<{{ vec3_t }}> for {{ self_t }} {
type Output = {{ vec3_t }};
@@ -1334,6 +1342,20 @@
}
}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=vec3_t, output_t=vec3_t) }}
+
+{% if scalar_t == "f32" %}
+impl Mul<Vec3A> for Quat {
+ type Output = Vec3A;
+ #[inline]
+ fn mul(self, rhs: Vec3A) -> Self::Output {
+ self.mul_vec3a(rhs)
+ }
+}
+
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t="Vec3A", output_t="Vec3A") }}
+{% endif %}
+
impl Neg for {{ self_t }} {
type Output = Self;
#[inline]
@@ -1342,6 +1364,8 @@
}
}
+{{ macros::impl_ref_unop(imp="Neg", self_t=self_t, output_t=self_t) }}
+
impl Default for {{ self_t }} {
#[inline]
fn default() -> Self {
@@ -1400,16 +1424,6 @@
}
}
-{% if scalar_t == "f32" %}
-impl Mul<Vec3A> for Quat {
- type Output = Vec3A;
- #[inline]
- fn mul(self, rhs: Vec3A) -> Self::Output {
- self.mul_vec3a(rhs)
- }
-}
-{% endif %}
-
impl From<{{ self_t }}> for {{ vec4_t }} {
#[inline]
fn from(q: {{ self_t }}) -> Self {
diff --git a/crates/glam/templates/swizzle_impl.rs.tera b/crates/glam/templates/swizzle_impl.rs.tera
index b948169..1796889 100644
--- a/crates/glam/templates/swizzle_impl.rs.tera
+++ b/crates/glam/templates/swizzle_impl.rs.tera
@@ -55,9 +55,15 @@
{% if i == 2 %}
{% set skip = dim == 2 and j0 == 0 and j1 == 1 %}
{% if not skip %}
+ {% if vec2_t == self_t %}
+ {% set ret_t = "Self" %}
+ {% else %}
+ {% set ret_t = vec2_t %}
+ {% endif %}
+
#[inline]
- fn {{ e[j0] }}{{ e[j1] }}(self) -> {{ vec2_t }} {
- {{ vec2_t }} { x: self.{{ e[j0] }}, y: self.{{ e[j1] }} }
+ fn {{ e[j0] }}{{ e[j1] }}(self) -> {{ ret_t }} {
+ {{ ret_t }} { x: self.{{ e[j0] }}, y: self.{{ e[j1] }} }
}
{% endif %}
{% set skip = dim == 2 or j0 == j1 %}
@@ -82,16 +88,21 @@
{% if i == 3 %}
{% set skip = dim == 3 and j0 == 0 and j1 == 1 and j2 == 2 %}
{% if not skip %}
+ {% if vec3_t == self_t %}
+ {% set ret_t = "Self" %}
+ {% else %}
+ {% set ret_t = vec3_t %}
+ {% endif %}
#[inline]
- fn {{ e[j0] }}{{ e[j1] }}{{ e[j2] }}(self) -> {{ vec3_t }} {
+ fn {{ e[j0] }}{{ e[j1] }}{{ e[j2] }}(self) -> {{ ret_t }} {
{% if vec3_t == "Vec3A" and is_sse2 %}
- {{ vec3_t }}((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_{{ b[j2] }}_{{ b[j1] }}_{{ b[j0] }}) }).into())
+ {{ ret_t }}((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_{{ b[j2] }}_{{ b[j1] }}_{{ b[j0] }}) }).into())
{% elif vec3_t == "Vec3A" and is_wasm32 %}
- {{ vec3_t }}(i32x4_shuffle::<{{ l[j0] }}, {{ l[j1] }}, {{ h[j2] }}, {{ h[0] }}>(self.0, self.0).into())
+ {{ ret_t }}(i32x4_shuffle::<{{ l[j0] }}, {{ l[j1] }}, {{ h[j2] }}, {{ h[0] }}>(self.0, self.0).into())
{% elif vec3_t == "Vec3A" and is_coresimd %}
- {{ vec3_t }}(simd_swizzle!(self.0, [{{ l[j0] }}, {{ l[j1] }}, {{ l[j2] }}, {{ l[0] }}]).into())
+ {{ ret_t }}(simd_swizzle!(self.0, [{{ l[j0] }}, {{ l[j1] }}, {{ l[j2] }}, {{ l[0] }}]).into())
{% else %}
- {{ vec3_t }}::new(self.{{ e[j0] }}, self.{{ e[j1] }}, self.{{ e[j2] }})
+ {{ ret_t }}::new(self.{{ e[j0] }}, self.{{ e[j1] }}, self.{{ e[j2] }})
{% endif %}
}
{% endif %}
@@ -118,16 +129,21 @@
{% for j3 in indices | slice(end=dim) %}
{% set skip = dim == 4 and j0 == 0 and j1 == 1 and j2 == 2 and j3 == 3 %}
{% if not skip %}
+ {% if vec4_t == self_t %}
+ {% set ret_t = "Self" %}
+ {% else %}
+ {% set ret_t = vec4_t %}
+ {% endif %}
#[inline]
- fn {{ e[j0] }}{{ e[j1] }}{{ e[j2] }}{{ e[j3] }}(self) -> {{ vec4_t }} {
+ fn {{ e[j0] }}{{ e[j1] }}{{ e[j2] }}{{ e[j3] }}(self) -> {{ ret_t }} {
{% if is_sse2 %}
- {{ vec4_t }}(unsafe { _mm_shuffle_ps(self.0, self.0, 0b{{ b[j3] }}_{{ b[j2] }}_{{ b[j1] }}_{{ b[j0] }}) })
+ {{ ret_t }}(unsafe { _mm_shuffle_ps(self.0, self.0, 0b{{ b[j3] }}_{{ b[j2] }}_{{ b[j1] }}_{{ b[j0] }}) })
{% elif is_wasm32 %}
- {{ vec4_t}}(i32x4_shuffle::<{{ l[j0] }}, {{ l[j1] }}, {{ h[j2] }}, {{ h[j3] }}>(self.0, self.0))
+ {{ ret_t }}(i32x4_shuffle::<{{ l[j0] }}, {{ l[j1] }}, {{ h[j2] }}, {{ h[j3] }}>(self.0, self.0))
{% elif is_coresimd %}
- {{ vec4_t}}(simd_swizzle!(self.0, [{{ l[j0] }}, {{ l[j1] }}, {{ l[j2] }}, {{ l[j3] }}]))
+ {{ ret_t }}(simd_swizzle!(self.0, [{{ l[j0] }}, {{ l[j1] }}, {{ l[j2] }}, {{ l[j3] }}]))
{% else %}
- {{ vec4_t }}::new(self.{{ e[j0] }}, self.{{ e[j1] }}, self.{{ e[j2] }}, self.{{ e[j3] }})
+ {{ ret_t }}::new(self.{{ e[j0] }}, self.{{ e[j1] }}, self.{{ e[j2] }}, self.{{ e[j3] }})
{% endif %}
}
{% endif %}
diff --git a/crates/glam/templates/vec.rs.tera b/crates/glam/templates/vec.rs.tera
index d73cf0b..3f36c4f 100644
--- a/crates/glam/templates/vec.rs.tera
+++ b/crates/glam/templates/vec.rs.tera
@@ -312,6 +312,11 @@
{% endif %}
)]
{%- if self_t == "Vec3A" and is_scalar %}
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::AnyBitPattern))]
+{%- else %}
+#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
+{%- endif %}
+{%- if self_t == "Vec3A" and is_scalar %}
#[cfg_attr(not(target_arch = "spirv"), repr(align(16)))]
{%- elif self_t == "Vec4" and is_scalar %}
#[cfg_attr(
@@ -538,7 +543,7 @@
{% endfor %}
]
{% else %}
- unsafe { *(self as *const {{ self_t }} as *const [{{ scalar_t }}; {{ dim }}]) }
+ unsafe { *(self as *const Self as *const [{{ scalar_t }}; {{ dim }}]) }
{% endif %}
}
@@ -1535,6 +1540,8 @@
/// Performs `is_finite` on each element of self, returning a vector mask of the results.
///
/// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.
+ #[inline]
+ #[must_use]
pub fn is_finite_mask(self) -> {{ mask_t }} {
{% if is_scalar %}
{{ mask_t }}::new(
@@ -2407,10 +2414,10 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn manhattan_distance(self, other: Self) -> {{ unsigned_scalar_t }} {
+ pub fn manhattan_distance(self, rhs: Self) -> {{ unsigned_scalar_t }} {
{% for c in components %}
{% if not loop.first %} + {% endif %}
- self.{{c}}.abs_diff(other.{{c}})
+ self.{{c}}.abs_diff(rhs.{{c}})
{% endfor %}
}
@@ -2421,14 +2428,14 @@
/// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
#[inline]
#[must_use]
- pub fn checked_manhattan_distance(self, other: Self) -> Option<{{ unsigned_scalar_t }}> {
+ pub fn checked_manhattan_distance(self, rhs: Self) -> Option<{{ unsigned_scalar_t }}> {
{% for c in components %}
{%- if loop.first -%}
- let d = self.{{c}}.abs_diff(other.{{c}});
+ let d = self.{{c}}.abs_diff(rhs.{{c}});
{%- elif loop.last -%}
- d.checked_add(self.{{c}}.abs_diff(other.{{c}}))
+ d.checked_add(self.{{c}}.abs_diff(rhs.{{c}}))
{%- else -%}
- let d = d.checked_add(self.{{c}}.abs_diff(other.{{c}}))?;
+ let d = d.checked_add(self.{{c}}.abs_diff(rhs.{{c}}))?;
{%- endif -%}
{% endfor %}
}
@@ -2438,11 +2445,11 @@
/// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
#[inline]
#[must_use]
- pub fn chebyshev_distance(self, other: Self) -> {{ unsigned_scalar_t }} {
+ pub fn chebyshev_distance(self, rhs: Self) -> {{ unsigned_scalar_t }} {
// Note: the compiler will eventually optimize out the loop
[
{% for c in components %}
- self.{{c}}.abs_diff(other.{{c}}),
+ self.{{c}}.abs_diff(rhs.{{c}}),
{% endfor %}
].into_iter().max().unwrap()
}
@@ -3098,7 +3105,7 @@
}
{% endif %}
-impl Div<{{ self_t }}> for {{ self_t }} {
+impl Div for {{ self_t }} {
type Output = Self;
#[inline]
fn div(self, rhs: Self) -> Self {
@@ -3122,9 +3129,9 @@
}
}
-{{ macros::impl_op_ref(op="Div", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Div", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
-impl DivAssign<{{ self_t }}> for {{ self_t }} {
+impl DivAssign for {{ self_t }} {
#[inline]
fn div_assign(&mut self, rhs: Self) {
{% if is_scalar %}
@@ -3145,7 +3152,7 @@
}
}
-{{ macros::impl_op_ref(op="DivAssign", self_t=self_t, rhs_t=self_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Div", self_t=self_t, rhs_t=self_t) }}
impl Div<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
@@ -3171,7 +3178,7 @@
}
}
-{{ macros::impl_op_ref(op="Div", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Div", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
impl DivAssign<{{ scalar_t }}> for {{ self_t }} {
#[inline]
@@ -3194,7 +3201,7 @@
}
}
-{{ macros::impl_op_ref(op="DivAssign", self_t=self_t, rhs_t=scalar_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Div", self_t=self_t, rhs_t=scalar_t) }}
impl Div<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
@@ -3220,9 +3227,9 @@
}
}
-{{ macros::impl_op_ref(op="Div", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Div", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
-impl Mul<{{ self_t }}> for {{ self_t }} {
+impl Mul for {{ self_t }} {
type Output = Self;
#[inline]
fn mul(self, rhs: Self) -> Self {
@@ -3246,9 +3253,9 @@
}
}
-{{ macros::impl_op_ref(op="Mul", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
-impl MulAssign<{{ self_t }}> for {{ self_t }} {
+impl MulAssign for {{ self_t }} {
#[inline]
fn mul_assign(&mut self, rhs: Self) {
{% if is_scalar %}
@@ -3269,7 +3276,7 @@
}
}
-{{ macros::impl_op_ref(op="MulAssign", self_t=self_t, rhs_t=self_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Mul", self_t=self_t, rhs_t=self_t) }}
impl Mul<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
@@ -3295,7 +3302,7 @@
}
}
-{{ macros::impl_op_ref(op="Mul", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Mul", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
impl MulAssign<{{ scalar_t }}> for {{ self_t }} {
#[inline]
@@ -3318,7 +3325,7 @@
}
}
-{{ macros::impl_op_ref(op="MulAssign", self_t=self_t, rhs_t=scalar_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Mul", self_t=self_t, rhs_t=scalar_t) }}
impl Mul<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
@@ -3344,9 +3351,9 @@
}
}
-{{ macros::impl_op_ref(op="Mul", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Mul", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
-impl Add<{{ self_t }}> for {{ self_t }} {
+impl Add for {{ self_t }} {
type Output = Self;
#[inline]
fn add(self, rhs: Self) -> Self {
@@ -3370,9 +3377,9 @@
}
}
-{{ macros::impl_op_ref(op="Add", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Add", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
-impl AddAssign<{{ self_t }}> for {{ self_t }} {
+impl AddAssign for {{ self_t }} {
#[inline]
fn add_assign(&mut self, rhs: Self) {
{% if is_scalar %}
@@ -3393,7 +3400,7 @@
}
}
-{{ macros::impl_op_ref(op="AddAssign", self_t=self_t, rhs_t=self_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Add", self_t=self_t, rhs_t=self_t) }}
impl Add<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
@@ -3419,7 +3426,7 @@
}
}
-{{ macros::impl_op_ref(op="Add", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Add", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
impl AddAssign<{{ scalar_t }}> for {{ self_t }} {
#[inline]
@@ -3442,7 +3449,7 @@
}
}
-{{ macros::impl_op_ref(op="AddAssign", self_t=self_t, rhs_t=scalar_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Add", self_t=self_t, rhs_t=scalar_t) }}
impl Add<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
@@ -3468,9 +3475,9 @@
}
}
-{{ macros::impl_op_ref(op="Add", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Add", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
-impl Sub<{{ self_t }}> for {{ self_t }} {
+impl Sub for {{ self_t }} {
type Output = Self;
#[inline]
fn sub(self, rhs: Self) -> Self {
@@ -3494,11 +3501,11 @@
}
}
-{{ macros::impl_op_ref(op="Sub", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Sub", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
-impl SubAssign<{{ self_t }}> for {{ self_t }} {
+impl SubAssign for {{ self_t }} {
#[inline]
- fn sub_assign(&mut self, rhs: {{ self_t }}) {
+ fn sub_assign(&mut self, rhs: Self) {
{% if is_scalar %}
{% for c in components %}
self.{{ c }}.sub_assign(rhs.{{ c }});
@@ -3517,7 +3524,7 @@
}
}
-{{ macros::impl_op_ref(op="SubAssign", self_t=self_t, rhs_t=self_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Sub", self_t=self_t, rhs_t=self_t) }}
impl Sub<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
@@ -3543,7 +3550,7 @@
}
}
-{{ macros::impl_op_ref(op="Sub", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Sub", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
impl SubAssign<{{ scalar_t }}> for {{ self_t }} {
#[inline]
@@ -3566,7 +3573,7 @@
}
}
-{{ macros::impl_op_ref(op="SubAssign", self_t=self_t, rhs_t=scalar_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Sub", self_t=self_t, rhs_t=scalar_t) }}
impl Sub<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
@@ -3592,9 +3599,9 @@
}
}
-{{ macros::impl_op_ref(op="Sub", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Sub", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
-impl Rem<{{ self_t }}> for {{ self_t }} {
+impl Rem for {{ self_t }} {
type Output = Self;
#[inline]
fn rem(self, rhs: Self) -> Self {
@@ -3625,9 +3632,9 @@
}
}
-{{ macros::impl_op_ref(op="Rem", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Rem", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
-impl RemAssign<{{ self_t }}> for {{ self_t }} {
+impl RemAssign for {{ self_t }} {
#[inline]
fn rem_assign(&mut self, rhs: Self) {
{% if is_scalar %}
@@ -3642,7 +3649,7 @@
}
}
-{{ macros::impl_op_ref(op="RemAssign", self_t=self_t, rhs_t=self_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Rem", self_t=self_t, rhs_t=self_t) }}
impl Rem<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
@@ -3660,7 +3667,7 @@
}
}
-{{ macros::impl_op_ref(op="Rem", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Rem", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
impl RemAssign<{{ scalar_t }}> for {{ self_t }} {
#[inline]
@@ -3677,7 +3684,7 @@
}
}
-{{ macros::impl_op_ref(op="RemAssign", self_t=self_t, rhs_t=scalar_t, self="&mut self") }}
+{{ macros::impl_ref_op_assign(imp="Rem", self_t=self_t, rhs_t=scalar_t) }}
impl Rem<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
@@ -3695,13 +3702,13 @@
}
}
-{{ macros::impl_op_ref(op="Rem", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_binop(imp="Rem", self_t=scalar_t, rhs_t=self_t, output_t=self_t) }}
#[cfg(not(target_arch = "spirv"))]
impl AsRef<[{{ scalar_t }}; {{ dim }}]> for {{ self_t }} {
#[inline]
fn as_ref(&self) -> &[{{ scalar_t }}; {{ dim }}] {
- unsafe { &*(self as *const {{ self_t }} as *const [{{ scalar_t }}; {{ dim }}]) }
+ unsafe { &*(self as *const Self as *const [{{ scalar_t }}; {{ dim }}]) }
}
}
@@ -3709,7 +3716,7 @@
impl AsMut<[{{ scalar_t }}; {{ dim }}]> for {{ self_t }} {
#[inline]
fn as_mut(&mut self) -> &mut [{{ scalar_t }}; {{ dim }}] {
- unsafe { &mut *(self as *mut {{ self_t }} as *mut [{{ scalar_t }}; {{ dim }}]) }
+ unsafe { &mut *(self as *mut Self as *mut [{{ scalar_t }}; {{ dim }}]) }
}
}
@@ -3778,14 +3785,14 @@
}
}
-{{ macros::impl_op_ref(op="Neg", self_t=self_t, output_t=self_t) }}
+{{ macros::impl_ref_unop(imp="Neg", self_t=self_t, output_t=self_t) }}
{% endif %}
{% if not is_float %}
impl Not for {{ self_t }} {
type Output = Self;
#[inline]
- fn not(self) -> Self::Output {
+ fn not(self) -> Self {
Self {
{% for c in components %}
{{ c }}: self.{{ c }}.not(),
@@ -3794,6 +3801,8 @@
}
}
+{{ macros::impl_ref_unop(imp="Not", self_t=self_t, output_t=self_t) }}
+
impl BitAnd for {{ self_t }} {
type Output = Self;
#[inline]
@@ -3806,6 +3815,10 @@
}
}
+{{ macros::impl_ref_binop(imp="BitAnd", method="bitand", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitAnd", self_t=self_t, rhs_t=self_t) }}
+
impl BitOr for {{ self_t }} {
type Output = Self;
#[inline]
@@ -3818,6 +3831,10 @@
}
}
+{{ macros::impl_ref_binop(imp="BitOr", method="bitor", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitOr", self_t=self_t, rhs_t=self_t) }}
+
impl BitXor for {{ self_t }} {
type Output = Self;
#[inline]
@@ -3830,6 +3847,10 @@
}
}
+{{ macros::impl_ref_binop(imp="BitXor", method="bitxor", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitXor", self_t=self_t, rhs_t=self_t) }}
+
impl BitAnd<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
@@ -3842,6 +3863,10 @@
}
}
+{{ macros::impl_ref_binop(imp="BitAnd", method="bitand", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitAnd", self_t=self_t, rhs_t=scalar_t) }}
+
impl BitOr<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
@@ -3854,6 +3879,10 @@
}
}
+{{ macros::impl_ref_binop(imp="BitOr", method="bitor", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitOr", self_t=self_t, rhs_t=scalar_t) }}
+
impl BitXor<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
@@ -3866,6 +3895,10 @@
}
}
+{{ macros::impl_ref_binop(imp="BitXor", method="bitxor", self_t=self_t, rhs_t=scalar_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitXor", self_t=self_t, rhs_t=scalar_t) }}
+
{% for rhs_t in ["i8", "i16", "i32", "i64", "u8", "u16", "u32", "u64"] %}
impl Shl<{{ rhs_t }}> for {{ self_t }} {
type Output = Self;
@@ -3879,6 +3912,10 @@
}
}
+ {{ macros::impl_ref_binop(imp="Shl", self_t=self_t, rhs_t=rhs_t, output_t=self_t) }}
+
+ {{ macros::impl_op_assign(imp="Shl", self_t=self_t, rhs_t=rhs_t) }}
+
impl Shr<{{ rhs_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
@@ -3890,13 +3927,17 @@
}
}
}
+
+ {{ macros::impl_ref_binop(imp="Shr", self_t=self_t, rhs_t=rhs_t, output_t=self_t) }}
+
+ {{ macros::impl_op_assign(imp="Shr", self_t=self_t, rhs_t=rhs_t) }}
{% endfor %}
-{% for rhs_t in ["crate::IVec" ~ dim, "crate::UVec" ~ dim] %}
- impl Shl<{{ rhs_t }}> for {{ self_t }} {
+{% for rhs_t in ["IVec" ~ dim, "UVec" ~ dim] %}
+ impl Shl{% if rhs_t != self_t %}<{{ rhs_t }}>{% endif %} for {{ self_t }} {
type Output = Self;
#[inline]
- fn shl(self, rhs: {{ rhs_t }}) -> Self::Output {
+ fn shl(self, rhs: {% if rhs_t != self_t %}{{ rhs_t }}{% else %}Self{% endif %}) -> Self {
Self {
{% for c in components %}
{{ c }}: self.{{ c }}.shl(rhs.{{ c }}),
@@ -3905,10 +3946,12 @@
}
}
- impl Shr<{{ rhs_t }}> for {{ self_t }} {
+ {{ macros::impl_ref_binop(imp="Shl", self_t=self_t, rhs_t=rhs_t, output_t=self_t) }}
+
+ impl Shr{% if rhs_t != self_t %}<{{ rhs_t }}>{% endif %} for {{ self_t }} {
type Output = Self;
#[inline]
- fn shr(self, rhs: {{ rhs_t }}) -> Self::Output {
+ fn shr(self, rhs: {% if rhs_t != self_t %}{{ rhs_t }}{% else %}Self{% endif %}) -> Self {
Self {
{% for c in components %}
{{ c }}: self.{{ c }}.shr(rhs.{{ c }}),
@@ -3916,6 +3959,8 @@
}
}
}
+
+ {{ macros::impl_ref_binop(imp="Shr", self_t=self_t, rhs_t=rhs_t, output_t=self_t) }}
{% endfor %}
{% endif %}
@@ -4047,7 +4092,7 @@
{% elif is_coresimd %}
{% if dim == 3 %}
unsafe {
- *(v.0.to_array().as_ptr() as *const Self)
+ *(v.0.as_array().as_ptr() as *const Self)
}
{% elif dim == 4 %}
v.0.to_array()
@@ -4080,39 +4125,11 @@
impl From<{{ self_t }}> for {{ macros::make_tuple_t(t=scalar_t, n=dim) }} {
#[inline]
fn from(v: {{ self_t }}) -> Self {
- {% if is_scalar %}
- (
- {% for c in components %}
- v.{{ c }},
- {%- endfor %}
- )
- {% elif is_sse2 %}
- use core::mem::MaybeUninit;
- use crate::Align16;
- let mut out: MaybeUninit<Align16<Self>> = MaybeUninit::uninit();
- unsafe {
- _mm_store_ps(out.as_mut_ptr().cast(), v.0);
- out.assume_init().0
- }
- {% elif is_wasm32 %}
- unsafe {
- *(&v.0 as *const v128 as *const Self)
- }
- {% elif is_coresimd %}
- unsafe {
- *(v.0.to_array().as_ptr() as *const Self)
- }
- {% elif is_neon %}
- use core::mem::MaybeUninit;
- use crate::align16::Align16;
- let mut out: MaybeUninit<Align16<Self>> = MaybeUninit::uninit();
- unsafe {
- vst1q_f32(out.as_mut_ptr().cast(), v.0);
- out.assume_init().0
- }
- {% else %}
- unimplemented!()
- {% endif %}
+ (
+ {% for c in components %}
+ v.{{ c }},
+ {%- endfor %}
+ )
}
}
@@ -4147,7 +4164,7 @@
}
{% elif is_coresimd %}
unsafe {
- *(v.0.to_array().as_ptr() as *const Self)
+ *(v.0.as_array().as_ptr() as *const Self)
}
{% elif is_neon %}
use core::mem::MaybeUninit;
diff --git a/crates/glam/templates/vec_mask.rs.tera b/crates/glam/templates/vec_mask.rs.tera
index de1b6bd..a84308b 100644
--- a/crates/glam/templates/vec_mask.rs.tera
+++ b/crates/glam/templates/vec_mask.rs.tera
@@ -1,3 +1,5 @@
+{% import "macros.rs.tera" as macros %}
+
// Generated from {{template_path}} template. Edit the template, not the generated file.
{% if scalar_t == "bool" %}
@@ -438,12 +440,9 @@
}
}
-impl BitAndAssign for {{ self_t }} {
- #[inline]
- fn bitand_assign(&mut self, rhs: Self) {
- *self = self.bitand(rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="BitAnd", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitAnd", self_t=self_t, rhs_t=self_t) }}
impl BitOr for {{ self_t }} {
type Output = Self;
@@ -469,12 +468,9 @@
}
}
-impl BitOrAssign for {{ self_t }} {
- #[inline]
- fn bitor_assign(&mut self, rhs: Self) {
- *self = self.bitor(rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="BitOr", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitOr", self_t=self_t, rhs_t=self_t) }}
impl BitXor for {{ self_t }} {
type Output = Self;
@@ -500,12 +496,9 @@
}
}
-impl BitXorAssign for {{ self_t }} {
- #[inline]
- fn bitxor_assign(&mut self, rhs: Self) {
- *self = self.bitxor(rhs);
- }
-}
+{{ macros::impl_ref_binop(imp="BitXor", self_t=self_t, rhs_t=self_t, output_t=self_t) }}
+
+{{ macros::impl_op_assign(imp="BitXor", self_t=self_t, rhs_t=self_t) }}
impl Not for {{ self_t }} {
type Output = Self;
@@ -533,6 +526,8 @@
}
}
+{{ macros::impl_ref_unop(imp="Not", self_t=self_t, output_t=self_t) }}
+
{% if not is_scalar %}
impl From<{{ self_t }}> for {{ simd_t }} {
#[inline]
diff --git a/crates/glam/tests/affine2.rs b/crates/glam/tests/affine2.rs
index b5f44a2..82c66dd 100644
--- a/crates/glam/tests/affine2.rs
+++ b/crates/glam/tests/affine2.rs
@@ -217,13 +217,36 @@
assert_approx_eq!(m0, m0 * $affine2::IDENTITY);
assert_approx_eq!(m0, $affine2::IDENTITY * m0);
+ assert_approx_eq!(m0, &$affine2::IDENTITY * m0);
+ assert_approx_eq!(m0, $affine2::IDENTITY * &m0);
+ assert_approx_eq!(m0, &$affine2::IDENTITY * &m0);
+
let mut m1 = m0;
m1 *= $affine2::IDENTITY;
assert_approx_eq!(m1, m0);
+ let mut m1 = m0;
+ m1 *= &$affine2::IDENTITY;
+ assert_approx_eq!(m1, m0);
+
let mat3 = $mat3::from(m0);
assert_approx_eq!(mat3, $affine2::IDENTITY * mat3);
assert_approx_eq!(mat3, mat3 * $affine2::IDENTITY);
+
+ assert_approx_eq!(mat3, &$affine2::IDENTITY * mat3);
+ assert_approx_eq!(mat3, &mat3 * $affine2::IDENTITY);
+ assert_approx_eq!(mat3, $affine2::IDENTITY * &mat3);
+ assert_approx_eq!(mat3, mat3 * &$affine2::IDENTITY);
+ assert_approx_eq!(mat3, &$affine2::IDENTITY * &mat3);
+ assert_approx_eq!(mat3, &mat3 * &$affine2::IDENTITY);
+
+ let mut n = mat3;
+ n *= $affine2::IDENTITY;
+ assert_approx_eq!(mat3, n);
+
+ let mut n = mat3;
+ n *= &$affine2::IDENTITY;
+ assert_approx_eq!(mat3, n);
});
glam_test!(test_affine2_fmt, {
diff --git a/crates/glam/tests/affine3.rs b/crates/glam/tests/affine3.rs
index 1218ebd..d04fc30 100644
--- a/crates/glam/tests/affine3.rs
+++ b/crates/glam/tests/affine3.rs
@@ -291,13 +291,36 @@
assert_approx_eq!(m0, m0 * $affine3::IDENTITY);
assert_approx_eq!(m0, $affine3::IDENTITY * m0);
+ assert_approx_eq!(m0, &$affine3::IDENTITY * m0);
+ assert_approx_eq!(m0, $affine3::IDENTITY * &m0);
+ assert_approx_eq!(m0, &$affine3::IDENTITY * &m0);
+
let mut m1 = m0;
m1 *= $affine3::IDENTITY;
assert_approx_eq!(m1, m0);
+ let mut m1 = m0;
+ m1 *= &$affine3::IDENTITY;
+ assert_approx_eq!(m1, m0);
+
let mat4 = $mat4::from(m0);
assert_approx_eq!(mat4, $affine3::IDENTITY * mat4);
assert_approx_eq!(mat4, mat4 * $affine3::IDENTITY);
+
+ assert_approx_eq!(mat4, &$affine3::IDENTITY * mat4);
+ assert_approx_eq!(mat4, &mat4 * $affine3::IDENTITY);
+ assert_approx_eq!(mat4, $affine3::IDENTITY * &mat4);
+ assert_approx_eq!(mat4, mat4 * &$affine3::IDENTITY);
+ assert_approx_eq!(mat4, &$affine3::IDENTITY * &mat4);
+ assert_approx_eq!(mat4, &mat4 * &$affine3::IDENTITY);
+
+ let mut n = mat4;
+ n *= $affine3::IDENTITY;
+ assert_approx_eq!(mat4, n);
+
+ let mut n = mat4;
+ n *= &$affine3::IDENTITY;
+ assert_approx_eq!(mat4, n);
});
glam_test!(test_affine3_fmt, {
diff --git a/crates/glam/tests/mat2.rs b/crates/glam/tests/mat2.rs
index 2746e56..860907c 100644
--- a/crates/glam/tests/mat2.rs
+++ b/crates/glam/tests/mat2.rs
@@ -169,15 +169,48 @@
let m0 = $mat2::from_cols_array_2d(&ARRAY2X2);
let m0x2 = $mat2::from_cols_array_2d(&[[2.0, 4.0], [6.0, 8.0]]);
let m0_neg = $mat2::from_cols_array_2d(&[[-1.0, -2.0], [-3.0, -4.0]]);
+
assert_eq!(m0x2, m0 * 2.0);
+ assert_eq!(m0x2, &m0 * 2.0);
+ assert_eq!(m0x2, m0 * &2.0);
+ assert_eq!(m0x2, &m0 * &2.0);
+
assert_eq!(m0x2, 2.0 * m0);
+ assert_eq!(m0x2, &2.0 * m0);
+ assert_eq!(m0x2, 2.0 * &m0);
+ assert_eq!(m0x2, &2.0 * &m0);
+
assert_eq!(m0, m0x2 / 2.0);
+ assert_eq!(m0, &m0x2 / 2.0);
+ assert_eq!(m0, m0x2 / &2.0);
+ assert_eq!(m0, &m0x2 / &2.0);
+
assert_eq!(m0, 2.0 / m0x2);
+ assert_eq!(m0, &2.0 / m0x2);
+ assert_eq!(m0, 2.0 / &m0x2);
+ assert_eq!(m0, &2.0 / &m0x2);
+
+ assert_eq!(m0x2, m0.add_mat2(&m0));
assert_eq!(m0x2, m0 + m0);
+ assert_eq!(m0x2, &m0 + m0);
+ assert_eq!(m0x2, m0 + &m0);
+ assert_eq!(m0x2, &m0 + &m0);
+
+ assert_eq!($mat2::ZERO, m0.sub_mat2(&m0));
assert_eq!($mat2::ZERO, m0 - m0);
+ assert_eq!($mat2::ZERO, &m0 - m0);
+ assert_eq!($mat2::ZERO, m0 - &m0);
+ assert_eq!($mat2::ZERO, &m0 - &m0);
+
assert_eq!(m0_neg, -m0);
+ assert_eq!(m0_neg, -&m0);
+
+ assert_approx_eq!(m0, m0.mul_mat2(&$mat2::IDENTITY));
assert_approx_eq!(m0, m0 * $mat2::IDENTITY);
assert_approx_eq!(m0, $mat2::IDENTITY * m0);
+ assert_approx_eq!(m0, &$mat2::IDENTITY * m0);
+ assert_approx_eq!(m0, $mat2::IDENTITY * &m0);
+ assert_approx_eq!(m0, &$mat2::IDENTITY * &m0);
let mut m1 = m0;
m1 *= 2.0;
@@ -197,7 +230,6 @@
let mut m1 = $mat2::IDENTITY;
m1 *= m0;
- assert_approx_eq!(m0, m1);
});
glam_test!(test_mat2_fmt, {
diff --git a/crates/glam/tests/mat3.rs b/crates/glam/tests/mat3.rs
index 886f4c9..fc9bfa7 100644
--- a/crates/glam/tests/mat3.rs
+++ b/crates/glam/tests/mat3.rs
@@ -132,7 +132,7 @@
should_glam_assert!({ $mat3::from_quat($quat::from_xyzw(0.0, 0.0, 0.0, 0.0)) });
});
- glam_test!(test_mat3_mul, {
+ glam_test!(test_mat3_mul_vec3, {
let mat_a = $mat3::from_axis_angle($vec3::Z, deg(90.0));
assert_approx_eq!($newvec3(-1.0, 0.0, 0.0), mat_a * $newvec3(0.0, 1.0, 0.0));
assert_approx_eq!(
@@ -329,15 +329,48 @@
[-4.0, -5.0, -6.0],
[-7.0, -8.0, -9.0],
]);
+
assert_eq!(m0x2, m0 * 2.0);
+ assert_eq!(m0x2, &m0 * 2.0);
+ assert_eq!(m0x2, m0 * &2.0);
+ assert_eq!(m0x2, &m0 * &2.0);
+
assert_eq!(m0x2, 2.0 * m0);
+ assert_eq!(m0x2, &2.0 * m0);
+ assert_eq!(m0x2, 2.0 * &m0);
+ assert_eq!(m0x2, &2.0 * &m0);
+
assert_eq!(m0, m0x2 / 2.0);
+ assert_eq!(m0, &m0x2 / 2.0);
+ assert_eq!(m0, m0x2 / &2.0);
+ assert_eq!(m0, &m0x2 / &2.0);
+
assert_eq!(m0, 2.0 / m0x2);
+ assert_eq!(m0, &2.0 / m0x2);
+ assert_eq!(m0, 2.0 / &m0x2);
+ assert_eq!(m0, &2.0 / &m0x2);
+
+ assert_eq!(m0x2, m0.add_mat3(&m0));
assert_eq!(m0x2, m0 + m0);
+ assert_eq!(m0x2, &m0 + m0);
+ assert_eq!(m0x2, m0 + &m0);
+ assert_eq!(m0x2, &m0 + &m0);
+
+ assert_eq!($mat3::ZERO, m0.sub_mat3(&m0));
assert_eq!($mat3::ZERO, m0 - m0);
+ assert_eq!($mat3::ZERO, &m0 - m0);
+ assert_eq!($mat3::ZERO, m0 - &m0);
+ assert_eq!($mat3::ZERO, &m0 - &m0);
+
assert_eq!(m0_neg, -m0);
+ assert_eq!(m0_neg, -&m0);
+
+ assert_approx_eq!(m0, m0.mul_mat3(&$mat3::IDENTITY));
assert_approx_eq!(m0, m0 * $mat3::IDENTITY);
assert_approx_eq!(m0, $mat3::IDENTITY * m0);
+ assert_approx_eq!(m0, &$mat3::IDENTITY * m0);
+ assert_approx_eq!(m0, $mat3::IDENTITY * &m0);
+ assert_approx_eq!(m0, &$mat3::IDENTITY * &m0);
let mut m1 = m0;
m1 *= 2.0;
@@ -360,6 +393,12 @@
assert_approx_eq!(m0, m1);
});
+ glam_test!(test_mat3_abs, {
+ let a = $mat3::from_cols_array_2d(&ARRAY3X3);
+ let b = -a;
+ assert_eq!(a, b.abs());
+ });
+
glam_test!(test_mat3_fmt, {
let a = $mat3::from_cols_array_2d(&ARRAY3X3);
assert_eq!(format!("{}", a), "[[1, 2, 3], [4, 5, 6], [7, 8, 9]]");
diff --git a/crates/glam/tests/mat4.rs b/crates/glam/tests/mat4.rs
index ecb5709..faf3802 100644
--- a/crates/glam/tests/mat4.rs
+++ b/crates/glam/tests/mat4.rs
@@ -468,6 +468,45 @@
should_glam_assert!({ $mat4::look_to_rh($vec3::ONE, $vec3::ZERO, $vec3::ONE) });
});
+ glam_test!(test_mat4_frustum_gl_rh, {
+ let fov_y_radians = $t::to_radians(90.0);
+ let aspect_ratio = 2.0;
+ let z_near = 5.0;
+ let z_far = 15.0;
+ let f = (0.5 * fov_y_radians).tan();
+ let height = z_near * f;
+ let width = height * aspect_ratio;
+ let projection = $mat4::frustum_rh_gl(-width, width, -height, height, z_near, z_far);
+ let other_projection = $mat4::perspective_rh_gl(fov_y_radians, aspect_ratio, z_near, z_far);
+ assert_approx_eq!(projection, other_projection);
+ });
+
+ glam_test!(test_mat4_frustum_lh, {
+ let fov_y_radians = $t::to_radians(90.0);
+ let aspect_ratio = 2.0;
+ let z_near = 5.0;
+ let z_far = 15.0;
+ let f = (0.5 * fov_y_radians).tan();
+ let height = z_near * f;
+ let width = height * aspect_ratio;
+ let projection = $mat4::frustum_lh(-width, width, -height, height, z_near, z_far);
+ let other_projection = $mat4::perspective_lh(fov_y_radians, aspect_ratio, z_near, z_far);
+ assert_approx_eq!(projection, other_projection);
+ });
+
+ glam_test!(test_mat4_frustum_rh, {
+ let fov_y_radians = $t::to_radians(90.0);
+ let aspect_ratio = 2.0;
+ let z_near = 5.0;
+ let z_far = 15.0;
+ let f = (0.5 * fov_y_radians).tan();
+ let height = z_near * f;
+ let width = height * aspect_ratio;
+ let projection = $mat4::frustum_rh(-width, width, -height, height, z_near, z_far);
+ let other_projection = $mat4::perspective_rh(fov_y_radians, aspect_ratio, z_near, z_far);
+ assert_approx_eq!(projection, other_projection);
+ });
+
glam_test!(test_mat4_perspective_gl_rh, {
let projection = $mat4::perspective_rh_gl($t::to_radians(90.0), 2.0, 5.0, 15.0);
@@ -609,15 +648,48 @@
[-9.0, -10.0, -11.0, -12.0],
[-13.0, -14.0, -15.0, -16.0],
]);
+
assert_eq!(m0x2, m0 * 2.0);
+ assert_eq!(m0x2, &m0 * 2.0);
+ assert_eq!(m0x2, m0 * &2.0);
+ assert_eq!(m0x2, &m0 * &2.0);
+
assert_eq!(m0x2, 2.0 * m0);
+ assert_eq!(m0x2, &2.0 * m0);
+ assert_eq!(m0x2, 2.0 * &m0);
+ assert_eq!(m0x2, &2.0 * &m0);
+
assert_eq!(m0, m0x2 / 2.0);
+ assert_eq!(m0, &m0x2 / 2.0);
+ assert_eq!(m0, m0x2 / &2.0);
+ assert_eq!(m0, &m0x2 / &2.0);
+
assert_eq!(m0, 2.0 / m0x2);
+ assert_eq!(m0, &2.0 / m0x2);
+ assert_eq!(m0, 2.0 / &m0x2);
+ assert_eq!(m0, &2.0 / &m0x2);
+
+ assert_eq!(m0x2, m0.add_mat4(&m0));
assert_eq!(m0x2, m0 + m0);
+ assert_eq!(m0x2, &m0 + m0);
+ assert_eq!(m0x2, m0 + &m0);
+ assert_eq!(m0x2, &m0 + &m0);
+
+ assert_eq!($mat4::ZERO, m0.sub_mat4(&m0));
assert_eq!($mat4::ZERO, m0 - m0);
+ assert_eq!($mat4::ZERO, &m0 - m0);
+ assert_eq!($mat4::ZERO, m0 - &m0);
+ assert_eq!($mat4::ZERO, &m0 - &m0);
+
assert_eq!(m0_neg, -m0);
+ assert_eq!(m0_neg, -&m0);
+
+ assert_approx_eq!(m0, m0.mul_mat4(&$mat4::IDENTITY));
assert_approx_eq!(m0, m0 * $mat4::IDENTITY);
assert_approx_eq!(m0, $mat4::IDENTITY * m0);
+ assert_approx_eq!(m0, &$mat4::IDENTITY * m0);
+ assert_approx_eq!(m0, $mat4::IDENTITY * &m0);
+ assert_approx_eq!(m0, &$mat4::IDENTITY * &m0);
let mut m1 = m0;
m1 *= 2.0;
diff --git a/crates/glam/tests/quat.rs b/crates/glam/tests/quat.rs
index e807984..bc5be84 100644
--- a/crates/glam/tests/quat.rs
+++ b/crates/glam/tests/quat.rs
@@ -248,6 +248,10 @@
assert_approx_eq!(-$vec3::X, mrzx * $vec3::Y);
assert_approx_eq!(-$vec3::X, mrzx.mul_vec3($vec3::Y));
+ assert_approx_eq!(-$vec3::X, &mrzx * $vec3::Y);
+ assert_approx_eq!(-$vec3::X, mrzx * &$vec3::Y);
+ assert_approx_eq!(-$vec3::X, &mrzx * &$vec3::Y);
+
should_glam_assert!({ ($quat::IDENTITY * 0.5).mul_vec3($vec3::X) });
should_glam_assert!({ ($quat::IDENTITY * 0.5) * $vec3::X });
});
@@ -445,23 +449,71 @@
glam_test!(test_addition, {
let a = $quat::from_xyzw(1.0, 2.0, 3.0, 4.0);
let b = $quat::from_xyzw(5.0, 6.0, 7.0, -9.0);
- assert_eq!(a + b, $quat::from_xyzw(6.0, 8.0, 10.0, -5.0));
+ let result = $quat::from_xyzw(6.0, 8.0, 10.0, -5.0);
+ assert_eq!(a + b, result);
+ assert_eq!(&a + b, result);
+ assert_eq!(a + &b, result);
+ assert_eq!(&a + &b, result);
+
+ let mut c = a;
+ c += b;
+ assert_eq!(c, result);
+
+ let mut c = a;
+ c += &b;
+ assert_eq!(c, result);
});
glam_test!(test_subtraction, {
let a = $quat::from_xyzw(6.0, 8.0, 10.0, -5.0);
let b = $quat::from_xyzw(5.0, 6.0, 7.0, -9.0);
- assert_eq!(a - b, $quat::from_xyzw(1.0, 2.0, 3.0, 4.0));
+ let result = $quat::from_xyzw(1.0, 2.0, 3.0, 4.0);
+ assert_eq!(a - b, result);
+ assert_eq!(&a - b, result);
+ assert_eq!(a - &b, result);
+ assert_eq!(&a - &b, result);
+
+ let mut c = a;
+ c -= b;
+ assert_eq!(c, result);
+
+ let mut c = a;
+ c -= &b;
+ assert_eq!(c, result);
});
glam_test!(test_scalar_multiplication, {
let a = $quat::from_xyzw(1.0, 2.0, 3.0, 4.0);
- assert_eq!(a * 2.0, $quat::from_xyzw(2.0, 4.0, 6.0, 8.0));
+ let result = $quat::from_xyzw(2.0, 4.0, 6.0, 8.0);
+ assert_eq!(a * 2.0, result);
+ assert_eq!(&a * 2.0, result);
+ assert_eq!(a * &2.0, result);
+ assert_eq!(&a * &2.0, result);
+
+ let mut b = a;
+ b *= 2.0;
+ assert_eq!(b, result);
+
+ let mut b = a;
+ b *= &2.0;
+ assert_eq!(b, result);
});
glam_test!(test_scalar_division, {
let a = $quat::from_xyzw(2.0, 4.0, 6.0, 8.0);
- assert_eq!(a / 2.0, $quat::from_xyzw(1.0, 2.0, 3.0, 4.0));
+ let result = $quat::from_xyzw(1.0, 2.0, 3.0, 4.0);
+ assert_eq!(a / 2.0, result);
+ assert_eq!(&a / 2.0, result);
+ assert_eq!(a / &2.0, result);
+ assert_eq!(&a / &2.0, result);
+
+ let mut b = a;
+ b /= 2.0;
+ assert_eq!(b, result);
+
+ let mut b = a;
+ b /= &2.0;
+ assert_eq!(b, result);
});
glam_test!(test_sum, {
@@ -607,6 +659,38 @@
assert_approx_eq!(angle, angle2);
}
});
+
+ glam_test!(test_add_assign, {
+ {
+ // Normalization not needed for this test.
+ let q = $quat::from_xyzw(1.0, 2.0, 3.0, 4.0);
+ let p = $quat::from_xyzw(5.0, 6.0, 7.0, 8.0);
+
+ let mut pq = p;
+ pq += q;
+ assert_eq!(p + q, pq);
+
+ let mut pq = p;
+ pq += &q;
+ assert_eq!(p + q, pq);
+ }
+ });
+
+ glam_test!(test_sub_assign, {
+ {
+ // Normalization not needed for this test.
+ let q = $quat::from_xyzw(1.0, 2.0, 3.0, 4.0);
+ let p = $quat::from_xyzw(5.0, 6.0, 7.0, 8.0);
+
+ let mut pq = p;
+ pq -= q;
+ assert_eq!(p - q, pq);
+
+ let mut pq = p;
+ pq -= &q;
+ assert_eq!(p - q, pq);
+ }
+ });
};
}
diff --git a/crates/glam/tests/vec2.rs b/crates/glam/tests/vec2.rs
index 46c3209..9a8e2e1 100644
--- a/crates/glam/tests/vec2.rs
+++ b/crates/glam/tests/vec2.rs
@@ -89,9 +89,64 @@
0b11,
);
+ assert_eq!(
+ (&$mask::new(false, false) & $mask::new(false, false)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ (&$mask::new(true, true) & $mask::new(true, false)).bitmask(),
+ 0b01,
+ );
+ assert_eq!(
+ (&$mask::new(true, false) & $mask::new(false, true)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ (&$mask::new(true, true) & $mask::new(true, true)).bitmask(),
+ 0b11,
+ );
+
+ assert_eq!(
+ ($mask::new(false, false) & &$mask::new(false, false)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ ($mask::new(true, true) & &$mask::new(true, false)).bitmask(),
+ 0b01,
+ );
+ assert_eq!(
+ ($mask::new(true, false) & &$mask::new(false, true)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ ($mask::new(true, true) & &$mask::new(true, true)).bitmask(),
+ 0b11,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false) & &$mask::new(false, false)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ (&$mask::new(true, true) & &$mask::new(true, false)).bitmask(),
+ 0b01,
+ );
+ assert_eq!(
+ (&$mask::new(true, false) & &$mask::new(false, true)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ (&$mask::new(true, true) & &$mask::new(true, true)).bitmask(),
+ 0b11,
+ );
+
let mut mask = $mask::new(true, true);
mask &= $mask::new(true, false);
assert_eq!(mask.bitmask(), 0b01);
+
+ let mut mask = $mask::new(true, true);
+ mask &= &$mask::new(true, false);
+ assert_eq!(mask.bitmask(), 0b01);
});
glam_test!(test_mask_or, {
@@ -112,9 +167,64 @@
0b11,
);
+ assert_eq!(
+ (&$mask::new(false, false) | $mask::new(false, false)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ (&$mask::new(false, false) | $mask::new(false, true)).bitmask(),
+ 0b10,
+ );
+ assert_eq!(
+ (&$mask::new(true, false) | $mask::new(false, true)).bitmask(),
+ 0b11,
+ );
+ assert_eq!(
+ (&$mask::new(true, true) | $mask::new(true, true)).bitmask(),
+ 0b11,
+ );
+
+ assert_eq!(
+ ($mask::new(false, false) | &$mask::new(false, false)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ ($mask::new(false, false) | &$mask::new(false, true)).bitmask(),
+ 0b10,
+ );
+ assert_eq!(
+ ($mask::new(true, false) | &$mask::new(false, true)).bitmask(),
+ 0b11,
+ );
+ assert_eq!(
+ ($mask::new(true, true) | &$mask::new(true, true)).bitmask(),
+ 0b11,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false) | &$mask::new(false, false)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ (&$mask::new(false, false) | &$mask::new(false, true)).bitmask(),
+ 0b10,
+ );
+ assert_eq!(
+ (&$mask::new(true, false) | &$mask::new(false, true)).bitmask(),
+ 0b11,
+ );
+ assert_eq!(
+ (&$mask::new(true, true) | &$mask::new(true, true)).bitmask(),
+ 0b11,
+ );
+
let mut mask = $mask::new(true, true);
mask |= $mask::new(true, false);
assert_eq!(mask.bitmask(), 0b11);
+
+ let mut mask = $mask::new(true, true);
+ mask |= &$mask::new(true, false);
+ assert_eq!(mask.bitmask(), 0b11);
});
glam_test!(test_mask_xor, {
@@ -135,9 +245,47 @@
0b00,
);
+ assert_eq!(
+ ($mask::new(false, false) ^ &$mask::new(false, false)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ ($mask::new(false, false) ^ &$mask::new(false, true)).bitmask(),
+ 0b10,
+ );
+ assert_eq!(
+ ($mask::new(true, false) ^ &$mask::new(false, true)).bitmask(),
+ 0b11,
+ );
+ assert_eq!(
+ ($mask::new(true, true) ^ &$mask::new(true, true)).bitmask(),
+ 0b00,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false) ^ &$mask::new(false, false)).bitmask(),
+ 0b00,
+ );
+ assert_eq!(
+ (&$mask::new(false, false) ^ &$mask::new(false, true)).bitmask(),
+ 0b10,
+ );
+ assert_eq!(
+ (&$mask::new(true, false) ^ &$mask::new(false, true)).bitmask(),
+ 0b11,
+ );
+ assert_eq!(
+ (&$mask::new(true, true) ^ &$mask::new(true, true)).bitmask(),
+ 0b00,
+ );
+
let mut mask = $mask::new(false, true);
mask ^= $mask::new(true, false);
assert_eq!(mask.bitmask(), 0b11);
+
+ let mut mask = $mask::new(false, true);
+ mask ^= &$mask::new(true, false);
+ assert_eq!(mask.bitmask(), 0b11);
});
glam_test!(test_mask_not, {
@@ -145,6 +293,11 @@
assert_eq!((!$mask::new(true, false)).bitmask(), 0b10);
assert_eq!((!$mask::new(false, true)).bitmask(), 0b01);
assert_eq!((!$mask::new(true, true)).bitmask(), 0b00);
+
+ assert_eq!((!&$mask::new(false, false)).bitmask(), 0b11);
+ assert_eq!((!&$mask::new(true, false)).bitmask(), 0b10);
+ assert_eq!((!&$mask::new(false, true)).bitmask(), 0b01);
+ assert_eq!((!&$mask::new(true, true)).bitmask(), 0b00);
});
glam_test!(test_mask_fmt, {
@@ -1456,8 +1609,34 @@
for x in $t_min..$t_max {
for y in $t_min..$t_max {
for rhs in $rhs_min..$rhs_max {
- assert_eq!($vec2::new(x, y) << rhs, $vec2::new(x << rhs, y << rhs));
- assert_eq!($vec2::new(x, y) >> rhs, $vec2::new(x >> rhs, y >> rhs));
+ let lhs = $vec2::new(x, y);
+ assert_eq!(lhs << rhs, $vec2::new(x << rhs, y << rhs));
+ assert_eq!(lhs >> rhs, $vec2::new(x >> rhs, y >> rhs));
+
+ assert_eq!(&lhs << rhs, $vec2::new(x << rhs, y << rhs));
+ assert_eq!(&lhs >> rhs, $vec2::new(x >> rhs, y >> rhs));
+
+ assert_eq!(lhs << &rhs, $vec2::new(x << rhs, y << rhs));
+ assert_eq!(lhs >> &rhs, $vec2::new(x >> rhs, y >> rhs));
+
+ assert_eq!(&lhs << &rhs, $vec2::new(x << rhs, y << rhs));
+ assert_eq!(&lhs >> &rhs, $vec2::new(x >> rhs, y >> rhs));
+
+ let mut a = lhs;
+ a <<= rhs;
+ assert_eq!(a, lhs << rhs);
+
+ let mut a = lhs;
+ a <<= &rhs;
+ assert_eq!(a, lhs << rhs);
+
+ let mut a = lhs;
+ a >>= rhs;
+ assert_eq!(a, lhs >> rhs);
+
+ let mut a = lhs;
+ a >>= &rhs;
+ assert_eq!(a, lhs >> rhs);
}
}
}
@@ -1509,14 +1688,19 @@
for y1 in $t_min..$t_max {
for x2 in $t_min..$t_max {
for y2 in $t_min..$t_max {
- assert_eq!(
- $vec2::new(x1, y1) << $rhs::new(x2, y2),
- $vec2::new(x1 << x2, y1 << y2)
- );
- assert_eq!(
- $vec2::new(x1, y1) >> $rhs::new(x2, y2),
- $vec2::new(x1 >> x2, y1 >> y2)
- );
+ let lhs = $vec2::new(x1, y1);
+ let rhs = $rhs::new(x2, y2);
+ assert_eq!(lhs << rhs, $vec2::new(x1 << x2, y1 << y2));
+ assert_eq!(lhs >> rhs, $vec2::new(x1 >> x2, y1 >> y2));
+
+ assert_eq!(&lhs << rhs, $vec2::new(x1 << x2, y1 << y2));
+ assert_eq!(&lhs >> rhs, $vec2::new(x1 >> x2, y1 >> y2));
+
+ assert_eq!(lhs << &rhs, $vec2::new(x1 << x2, y1 << y2));
+ assert_eq!(lhs >> &rhs, $vec2::new(x1 >> x2, y1 >> y2));
+
+ assert_eq!(&lhs << &rhs, $vec2::new(x1 << x2, y1 << y2));
+ assert_eq!(&lhs >> &rhs, $vec2::new(x1 >> x2, y1 >> y2));
}
}
}
@@ -1544,9 +1728,46 @@
for x in $t_min..$t_max {
for y in $t_min..$t_max {
for rhs in $t_min..$t_max {
- assert_eq!($vec2::new(x, y) & rhs, $vec2::new(x & rhs, y & rhs));
- assert_eq!($vec2::new(x, y) | rhs, $vec2::new(x | rhs, y | rhs));
- assert_eq!($vec2::new(x, y) ^ rhs, $vec2::new(x ^ rhs, y ^ rhs));
+ let lhs = $vec2::new(x, y);
+ assert_eq!(lhs & rhs, $vec2::new(x & rhs, y & rhs));
+ assert_eq!(lhs | rhs, $vec2::new(x | rhs, y | rhs));
+ assert_eq!(lhs ^ rhs, $vec2::new(x ^ rhs, y ^ rhs));
+
+ assert_eq!(&lhs & rhs, $vec2::new(x & rhs, y & rhs));
+ assert_eq!(&lhs | rhs, $vec2::new(x | rhs, y | rhs));
+ assert_eq!(&lhs ^ rhs, $vec2::new(x ^ rhs, y ^ rhs));
+
+ assert_eq!(lhs & &rhs, $vec2::new(x & rhs, y & rhs));
+ assert_eq!(lhs | &rhs, $vec2::new(x | rhs, y | rhs));
+ assert_eq!(lhs ^ &rhs, $vec2::new(x ^ rhs, y ^ rhs));
+
+ assert_eq!(&lhs & &rhs, $vec2::new(x & rhs, y & rhs));
+ assert_eq!(&lhs | &rhs, $vec2::new(x | rhs, y | rhs));
+ assert_eq!(&lhs ^ &rhs, $vec2::new(x ^ rhs, y ^ rhs));
+
+ let mut a = lhs;
+ a &= rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a &= &rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a |= rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a |= &rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a ^= rhs;
+ assert_eq!(a, lhs ^ rhs);
+
+ let mut a = lhs;
+ a ^= &rhs;
+ assert_eq!(a, lhs ^ rhs);
}
}
}
@@ -1559,22 +1780,52 @@
glam_test!(test_vec2_bit_ops, {
for x1 in $t_min..$t_max {
for y1 in $t_min..$t_max {
- assert_eq!(!$vec2::new(x1, y1), $vec2::new(!x1, !y1));
+ let lhs = $vec2::new(x1, y1);
+ assert_eq!(!lhs, $vec2::new(!x1, !y1));
+ assert_eq!(!&lhs, $vec2::new(!x1, !y1));
for x2 in $t_min..$t_max {
for y2 in $t_min..$t_max {
- assert_eq!(
- $vec2::new(x1, y1) & $vec2::new(x2, y2),
- $vec2::new(x1 & x2, y1 & y2)
- );
- assert_eq!(
- $vec2::new(x1, y1) | $vec2::new(x2, y2),
- $vec2::new(x1 | x2, y1 | y2)
- );
- assert_eq!(
- $vec2::new(x1, y1) ^ $vec2::new(x2, y2),
- $vec2::new(x1 ^ x2, y1 ^ y2)
- );
+ let rhs = $vec2::new(x2, y2);
+ assert_eq!(lhs & rhs, $vec2::new(x1 & x2, y1 & y2));
+ assert_eq!(lhs | rhs, $vec2::new(x1 | x2, y1 | y2));
+ assert_eq!(lhs ^ rhs, $vec2::new(x1 ^ x2, y1 ^ y2));
+
+ assert_eq!(&lhs & rhs, $vec2::new(x1 & x2, y1 & y2));
+ assert_eq!(&lhs | rhs, $vec2::new(x1 | x2, y1 | y2));
+ assert_eq!(&lhs ^ rhs, $vec2::new(x1 ^ x2, y1 ^ y2));
+
+ assert_eq!(lhs & &rhs, $vec2::new(x1 & x2, y1 & y2));
+ assert_eq!(lhs | &rhs, $vec2::new(x1 | x2, y1 | y2));
+ assert_eq!(lhs ^ &rhs, $vec2::new(x1 ^ x2, y1 ^ y2));
+
+ assert_eq!(&lhs & &rhs, $vec2::new(x1 & x2, y1 & y2));
+ assert_eq!(&lhs | &rhs, $vec2::new(x1 | x2, y1 | y2));
+ assert_eq!(&lhs ^ &rhs, $vec2::new(x1 ^ x2, y1 ^ y2));
+
+ let mut a = lhs;
+ a &= rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a &= &rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a |= rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a |= &rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a ^= rhs;
+ assert_eq!(a, lhs ^ rhs);
+
+ let mut a = lhs;
+ a ^= &rhs;
+ assert_eq!(a, lhs ^ rhs);
}
}
}
diff --git a/crates/glam/tests/vec3.rs b/crates/glam/tests/vec3.rs
index 12d657a..b7dcc5d 100644
--- a/crates/glam/tests/vec3.rs
+++ b/crates/glam/tests/vec3.rs
@@ -144,9 +144,64 @@
0b101,
);
+ assert_eq!(
+ (&$mask::new(false, false, false) & $mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true) & $mask::new(true, true, true)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) & $mask::new(false, true, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) & $mask::new(true, true, true)).bitmask(),
+ 0b101,
+ );
+
+ assert_eq!(
+ ($mask::new(false, false, false) & &$mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ ($mask::new(true, true, true) & &$mask::new(true, true, true)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true) & &$mask::new(false, true, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true) & &$mask::new(true, true, true)).bitmask(),
+ 0b101,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false, false) & &$mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true) & &$mask::new(true, true, true)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) & &$mask::new(false, true, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) & &$mask::new(true, true, true)).bitmask(),
+ 0b101,
+ );
+
let mut mask = $mask::new(true, true, false);
mask &= $mask::new(true, false, false);
assert_eq!(mask.bitmask(), 0b001);
+
+ let mut mask = $mask::new(true, true, false);
+ mask &= &$mask::new(true, false, false);
+ assert_eq!(mask.bitmask(), 0b001);
});
glam_test!(test_mask_or, {
@@ -167,9 +222,64 @@
0b101,
);
+ assert_eq!(
+ (&$mask::new(false, false, false) | $mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true) | $mask::new(true, true, true)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) | $mask::new(false, true, false)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) | $mask::new(true, false, true)).bitmask(),
+ 0b101,
+ );
+
+ assert_eq!(
+ ($mask::new(false, false, false) | &$mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ ($mask::new(true, true, true) | &$mask::new(true, true, true)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true) | &$mask::new(false, true, false)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true) | &$mask::new(true, false, true)).bitmask(),
+ 0b101,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false, false) | &$mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true) | &$mask::new(true, true, true)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) | &$mask::new(false, true, false)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) | &$mask::new(true, false, true)).bitmask(),
+ 0b101,
+ );
+
let mut mask = $mask::new(true, true, false);
mask |= $mask::new(true, false, false);
assert_eq!(mask.bitmask(), 0b011);
+
+ let mut mask = $mask::new(true, true, false);
+ mask |= &$mask::new(true, false, false);
+ assert_eq!(mask.bitmask(), 0b011);
});
glam_test!(test_mask_xor, {
@@ -190,9 +300,64 @@
0b000,
);
+ assert_eq!(
+ (&$mask::new(false, false, false) ^ $mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true) ^ $mask::new(true, true, true)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) ^ $mask::new(false, true, false)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) ^ $mask::new(true, false, true)).bitmask(),
+ 0b000,
+ );
+
+ assert_eq!(
+ ($mask::new(false, false, false) ^ &$mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ ($mask::new(true, true, true) ^ &$mask::new(true, true, true)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true) ^ &$mask::new(false, true, false)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true) ^ &$mask::new(true, false, true)).bitmask(),
+ 0b000,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false, false) ^ &$mask::new(false, false, false)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true) ^ &$mask::new(true, true, true)).bitmask(),
+ 0b000,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) ^ &$mask::new(false, true, false)).bitmask(),
+ 0b111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true) ^ &$mask::new(true, false, true)).bitmask(),
+ 0b000,
+ );
+
let mut mask = $mask::new(true, true, false);
mask ^= $mask::new(true, false, false);
assert_eq!(mask.bitmask(), 0b010);
+
+ let mut mask = $mask::new(true, true, false);
+ mask ^= &$mask::new(true, false, false);
+ assert_eq!(mask.bitmask(), 0b010);
});
glam_test!(test_mask_not, {
@@ -200,6 +365,11 @@
assert_eq!((!$mask::new(true, true, true)).bitmask(), 0b000);
assert_eq!((!$mask::new(true, false, true)).bitmask(), 0b010);
assert_eq!((!$mask::new(false, true, false)).bitmask(), 0b101);
+
+ assert_eq!((!&$mask::new(false, false, false)).bitmask(), 0b111);
+ assert_eq!((!&$mask::new(true, true, true)).bitmask(), 0b000);
+ assert_eq!((!&$mask::new(true, false, true)).bitmask(), 0b010);
+ assert_eq!((!&$mask::new(false, true, false)).bitmask(), 0b101);
});
glam_test!(test_mask_fmt, {
@@ -1656,14 +1826,34 @@
for y in $t_min..$t_max {
for z in $t_min..$t_max {
for rhs in $rhs_min..$rhs_max {
- assert_eq!(
- $vec3::new(x, y, z) << rhs,
- $vec3::new(x << rhs, y << rhs, z << rhs)
- );
- assert_eq!(
- $vec3::new(x, y, z) >> rhs,
- $vec3::new(x >> rhs, y >> rhs, z >> rhs)
- );
+ let lhs = $vec3::new(x, y, z);
+ assert_eq!(lhs << rhs, $vec3::new(x << rhs, y << rhs, z << rhs));
+ assert_eq!(lhs >> rhs, $vec3::new(x >> rhs, y >> rhs, z >> rhs));
+
+ assert_eq!(&lhs << rhs, $vec3::new(x << rhs, y << rhs, z << rhs));
+ assert_eq!(&lhs >> rhs, $vec3::new(x >> rhs, y >> rhs, z >> rhs));
+
+ assert_eq!(lhs << &rhs, $vec3::new(x << rhs, y << rhs, z << rhs));
+ assert_eq!(lhs >> &rhs, $vec3::new(x >> rhs, y >> rhs, z >> rhs));
+
+ assert_eq!(&lhs << &rhs, $vec3::new(x << rhs, y << rhs, z << rhs));
+ assert_eq!(&lhs >> &rhs, $vec3::new(x >> rhs, y >> rhs, z >> rhs));
+
+ let mut a = lhs;
+ a <<= rhs;
+ assert_eq!(a, lhs << rhs);
+
+ let mut a = lhs;
+ a <<= &rhs;
+ assert_eq!(a, lhs << rhs);
+
+ let mut a = lhs;
+ a >>= rhs;
+ assert_eq!(a, lhs >> rhs);
+
+ let mut a = lhs;
+ a >>= &rhs;
+ assert_eq!(a, lhs >> rhs);
}
}
}
@@ -1718,12 +1908,41 @@
for x2 in $t_min..$t_max {
for y2 in $t_min..$t_max {
for z2 in $t_min..$t_max {
+ let lhs = $vec3::new(x1, y1, z1);
+ let rhs = $rhs::new(x2, y2, z2);
assert_eq!(
- $vec3::new(x1, y1, z1) << $rhs::new(x2, y2, z2),
+ lhs << rhs,
$vec3::new(x1 << x2, y1 << y2, z1 << z2)
);
assert_eq!(
- $vec3::new(x1, y1, z1) >> $rhs::new(x2, y2, z2),
+ lhs >> rhs,
+ $vec3::new(x1 >> x2, y1 >> y2, z1 >> z2)
+ );
+
+ assert_eq!(
+ &lhs << rhs,
+ $vec3::new(x1 << x2, y1 << y2, z1 << z2)
+ );
+ assert_eq!(
+ &lhs >> rhs,
+ $vec3::new(x1 >> x2, y1 >> y2, z1 >> z2)
+ );
+
+ assert_eq!(
+ lhs << &rhs,
+ $vec3::new(x1 << x2, y1 << y2, z1 << z2)
+ );
+ assert_eq!(
+ lhs >> &rhs,
+ $vec3::new(x1 >> x2, y1 >> y2, z1 >> z2)
+ );
+
+ assert_eq!(
+ &lhs << &rhs,
+ $vec3::new(x1 << x2, y1 << y2, z1 << z2)
+ );
+ assert_eq!(
+ &lhs >> &rhs,
$vec3::new(x1 >> x2, y1 >> y2, z1 >> z2)
);
}
@@ -1756,18 +1975,46 @@
for y in $t_min..$t_max {
for z in $t_min..$t_max {
for rhs in $t_min..$t_max {
- assert_eq!(
- $vec3::new(x, y, z) & rhs,
- $vec3::new(x & rhs, y & rhs, z & rhs)
- );
- assert_eq!(
- $vec3::new(x, y, z) | rhs,
- $vec3::new(x | rhs, y | rhs, z | rhs)
- );
- assert_eq!(
- $vec3::new(x, y, z) ^ rhs,
- $vec3::new(x ^ rhs, y ^ rhs, z ^ rhs)
- );
+ let lhs = $vec3::new(x, y, z);
+ assert_eq!(lhs & rhs, $vec3::new(x & rhs, y & rhs, z & rhs));
+ assert_eq!(lhs | rhs, $vec3::new(x | rhs, y | rhs, z | rhs));
+ assert_eq!(lhs ^ rhs, $vec3::new(x ^ rhs, y ^ rhs, z ^ rhs));
+
+ assert_eq!(&lhs & rhs, $vec3::new(x & rhs, y & rhs, z & rhs));
+ assert_eq!(&lhs | rhs, $vec3::new(x | rhs, y | rhs, z | rhs));
+ assert_eq!(&lhs ^ rhs, $vec3::new(x ^ rhs, y ^ rhs, z ^ rhs));
+
+ assert_eq!(lhs & &rhs, $vec3::new(x & rhs, y & rhs, z & rhs));
+ assert_eq!(lhs | &rhs, $vec3::new(x | rhs, y | rhs, z | rhs));
+ assert_eq!(lhs ^ &rhs, $vec3::new(x ^ rhs, y ^ rhs, z ^ rhs));
+
+ assert_eq!(&lhs & &rhs, $vec3::new(x & rhs, y & rhs, z & rhs));
+ assert_eq!(&lhs | &rhs, $vec3::new(x | rhs, y | rhs, z | rhs));
+ assert_eq!(&lhs ^ &rhs, $vec3::new(x ^ rhs, y ^ rhs, z ^ rhs));
+
+ let mut a = lhs;
+ a &= rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a &= &rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a |= rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a |= &rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a ^= rhs;
+ assert_eq!(a, lhs ^ rhs);
+
+ let mut a = lhs;
+ a ^= &rhs;
+ assert_eq!(a, lhs ^ rhs);
}
}
}
@@ -1782,23 +2029,53 @@
for x1 in $t_min..$t_max {
for y1 in $t_min..$t_max {
for z1 in $t_min..$t_max {
- assert_eq!(!$vec3::new(x1, y1, z1), $vec3::new(!x1, !y1, !z1));
+ let lhs = $vec3::new(x1, y1, z1);
+ assert_eq!(!lhs, $vec3::new(!x1, !y1, !z1));
+ assert_eq!(!&lhs, $vec3::new(!x1, !y1, !z1));
for x2 in $t_min..$t_max {
for y2 in $t_min..$t_max {
for z2 in $t_min..$t_max {
- assert_eq!(
- $vec3::new(x1, y1, z1) & $vec3::new(x2, y2, z2),
- $vec3::new(x1 & x2, y1 & y2, z1 & z2)
- );
- assert_eq!(
- $vec3::new(x1, y1, z1) | $vec3::new(x2, y2, z2),
- $vec3::new(x1 | x2, y1 | y2, z1 | z2)
- );
- assert_eq!(
- $vec3::new(x1, y1, z1) ^ $vec3::new(x2, y2, z2),
- $vec3::new(x1 ^ x2, y1 ^ y2, z1 ^ z2)
- );
+ let rhs = $vec3::new(x2, y2, z2);
+ assert_eq!(lhs & rhs, $vec3::new(x1 & x2, y1 & y2, z1 & z2));
+ assert_eq!(lhs | rhs, $vec3::new(x1 | x2, y1 | y2, z1 | z2));
+ assert_eq!(lhs ^ rhs, $vec3::new(x1 ^ x2, y1 ^ y2, z1 ^ z2));
+
+ assert_eq!(&lhs & rhs, $vec3::new(x1 & x2, y1 & y2, z1 & z2));
+ assert_eq!(&lhs | rhs, $vec3::new(x1 | x2, y1 | y2, z1 | z2));
+ assert_eq!(&lhs ^ rhs, $vec3::new(x1 ^ x2, y1 ^ y2, z1 ^ z2));
+
+ assert_eq!(lhs & &rhs, $vec3::new(x1 & x2, y1 & y2, z1 & z2));
+ assert_eq!(lhs | &rhs, $vec3::new(x1 | x2, y1 | y2, z1 | z2));
+ assert_eq!(lhs ^ &rhs, $vec3::new(x1 ^ x2, y1 ^ y2, z1 ^ z2));
+
+ assert_eq!(&lhs & &rhs, $vec3::new(x1 & x2, y1 & y2, z1 & z2));
+ assert_eq!(&lhs | &rhs, $vec3::new(x1 | x2, y1 | y2, z1 | z2));
+ assert_eq!(&lhs ^ &rhs, $vec3::new(x1 ^ x2, y1 ^ y2, z1 ^ z2));
+
+ let mut a = lhs;
+ a &= rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a &= &rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a |= rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a |= &rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a ^= rhs;
+ assert_eq!(a, lhs ^ rhs);
+
+ let mut a = lhs;
+ a ^= &rhs;
+ assert_eq!(a, lhs ^ rhs);
}
}
}
@@ -3269,6 +3546,62 @@
}
});
+ glam_test!(test_wrapping_add, {
+ assert_eq!(
+ I64Vec3::new(i64::MAX, 5, i64::MAX).wrapping_add(I64Vec3::new(1, 3, i64::MAX)),
+ I64Vec3::new(-9223372036854775808, 8, -2),
+ );
+ });
+
+ glam_test!(test_wrapping_sub, {
+ assert_eq!(
+ I64Vec3::new(-1, 5, i64::MIN).wrapping_sub(I64Vec3::new(i64::MAX, 3, i64::MAX)),
+ I64Vec3::new(i64::MIN, 2, 1)
+ );
+ });
+
+ glam_test!(test_wrapping_mul, {
+ assert_eq!(
+ I64Vec3::new(i64::MAX, 5, i64::MAX).wrapping_mul(I64Vec3::new(3, 3, 5)),
+ I64Vec3::new(9223372036854775805, 15, 9223372036854775803)
+ );
+ });
+
+ glam_test!(test_wrapping_div, {
+ assert_eq!(
+ I64Vec3::new(i64::MAX, 5, i64::MAX).wrapping_div(I64Vec3::new(3, 3, 5)),
+ I64Vec3::new(3074457345618258602, 1, 1844674407370955161)
+ );
+ });
+
+ glam_test!(test_saturating_add, {
+ assert_eq!(
+ I64Vec3::new(i64::MAX, i64::MAX, 0).saturating_add(I64Vec3::new(1, i64::MAX, 2)),
+ I64Vec3::new(i64::MAX, i64::MAX, 2)
+ );
+ });
+
+ glam_test!(test_saturating_sub, {
+ assert_eq!(
+ I64Vec3::new(0, i64::MAX, 0).saturating_sub(I64Vec3::new(1, 1, 2)),
+ I64Vec3::new(-1, 9223372036854775806, -2)
+ );
+ });
+
+ glam_test!(test_saturating_mul, {
+ assert_eq!(
+ I64Vec3::new(i64::MAX, i64::MAX, 0).saturating_mul(I64Vec3::new(2, i64::MAX, 0)),
+ I64Vec3::new(i64::MAX, i64::MAX, 0)
+ );
+ });
+
+ glam_test!(test_saturating_div, {
+ assert_eq!(
+ I64Vec3::new(i64::MAX, i64::MAX, 0).saturating_div(I64Vec3::new(2, i64::MAX, 3)),
+ I64Vec3::new(4611686018427387903, 1, 0)
+ );
+ });
+
glam_test!(test_checked_add_unsigned, {
assert_eq!(I64Vec3::MAX.checked_add_unsigned(U64Vec3::ONE), None);
assert_eq!(
diff --git a/crates/glam/tests/vec4.rs b/crates/glam/tests/vec4.rs
index a0dfca8..f4b7c72 100644
--- a/crates/glam/tests/vec4.rs
+++ b/crates/glam/tests/vec4.rs
@@ -164,9 +164,76 @@
0b0101,
);
+ assert_eq!(
+ (&$mask::new(false, false, false, false) & $mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true, true) & $mask::new(true, true, true, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) & $mask::new(false, true, false, true))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, true) & $mask::new(true, true, true, false))
+ .bitmask(),
+ 0b0101,
+ );
+
+ assert_eq!(
+ ($mask::new(false, false, false, false) & &$mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ ($mask::new(true, true, true, true) & &$mask::new(true, true, true, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true, false) & &$mask::new(false, true, false, true))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true, true) & &$mask::new(true, true, true, false))
+ .bitmask(),
+ 0b0101,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false, false, false) & &$mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true, true) & &$mask::new(true, true, true, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) & &$mask::new(false, true, false, true))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, true) & &$mask::new(true, true, true, false))
+ .bitmask(),
+ 0b0101,
+ );
+
let mut mask = $mask::new(true, true, false, false);
mask &= $mask::new(true, false, true, false);
assert_eq!(mask.bitmask(), 0b0001);
+
+ let mut mask = $mask::new(true, true, false, false);
+ mask &= &$mask::new(true, false, true, false);
+ assert_eq!(mask.bitmask(), 0b0001);
});
glam_test!(test_mask_or, {
@@ -190,9 +257,76 @@
0b0101,
);
+ assert_eq!(
+ (&$mask::new(false, false, false, false) | $mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true, true) | $mask::new(true, true, true, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) | $mask::new(false, true, false, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) | $mask::new(true, false, true, false))
+ .bitmask(),
+ 0b0101,
+ );
+
+ assert_eq!(
+ ($mask::new(false, false, false, false) | &$mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ ($mask::new(true, true, true, true) | &$mask::new(true, true, true, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true, false) | &$mask::new(false, true, false, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true, false) | &$mask::new(true, false, true, false))
+ .bitmask(),
+ 0b0101,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false, false, false) | &$mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true, true) | &$mask::new(true, true, true, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) | &$mask::new(false, true, false, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) | &$mask::new(true, false, true, false))
+ .bitmask(),
+ 0b0101,
+ );
+
let mut mask = $mask::new(true, true, false, false);
mask |= $mask::new(true, false, true, false);
assert_eq!(mask.bitmask(), 0b0111);
+
+ let mut mask = $mask::new(true, true, false, false);
+ mask |= &$mask::new(true, false, true, false);
+ assert_eq!(mask.bitmask(), 0b0111);
});
glam_test!(test_mask_xor, {
@@ -216,9 +350,76 @@
0b0000,
);
+ assert_eq!(
+ (&$mask::new(false, false, false, false) ^ $mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true, true) ^ $mask::new(true, true, true, true))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) ^ $mask::new(false, true, false, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) ^ $mask::new(true, false, true, false))
+ .bitmask(),
+ 0b0000,
+ );
+
+ assert_eq!(
+ ($mask::new(false, false, false, false) ^ &$mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ ($mask::new(true, true, true, true) ^ &$mask::new(true, true, true, true))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true, false) ^ &$mask::new(false, true, false, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ ($mask::new(true, false, true, false) ^ &$mask::new(true, false, true, false))
+ .bitmask(),
+ 0b0000,
+ );
+
+ assert_eq!(
+ (&$mask::new(false, false, false, false) ^ &$mask::new(false, false, false, false))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, true, true, true) ^ &$mask::new(true, true, true, true))
+ .bitmask(),
+ 0b0000,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) ^ &$mask::new(false, true, false, true))
+ .bitmask(),
+ 0b1111,
+ );
+ assert_eq!(
+ (&$mask::new(true, false, true, false) ^ &$mask::new(true, false, true, false))
+ .bitmask(),
+ 0b0000,
+ );
+
let mut mask = $mask::new(true, true, false, false);
mask ^= $mask::new(true, false, true, false);
assert_eq!(mask.bitmask(), 0b0110);
+
+ let mut mask = $mask::new(true, true, false, false);
+ mask ^= &$mask::new(true, false, true, false);
+ assert_eq!(mask.bitmask(), 0b0110);
});
glam_test!(test_mask_not, {
@@ -226,6 +427,11 @@
assert_eq!((!$mask::new(true, true, true, true)).bitmask(), 0b0000);
assert_eq!((!$mask::new(true, false, true, false)).bitmask(), 0b1010);
assert_eq!((!$mask::new(false, true, false, true)).bitmask(), 0b0101);
+
+ assert_eq!((!&$mask::new(false, false, false, false)).bitmask(), 0b1111);
+ assert_eq!((!&$mask::new(true, true, true, true)).bitmask(), 0b0000);
+ assert_eq!((!&$mask::new(true, false, true, false)).bitmask(), 0b1010);
+ assert_eq!((!&$mask::new(false, true, false, true)).bitmask(), 0b0101);
});
glam_test!(test_mask_fmt, {
@@ -1692,14 +1898,58 @@
for z in $t_min..$t_max {
for w in $t_min..$t_max {
for rhs in $rhs_min..$rhs_max {
+ let lhs = $vec4::new(x, y, z, w);
assert_eq!(
- $vec4::new(x, y, z, w) << rhs,
+ lhs << rhs,
$vec4::new(x << rhs, y << rhs, z << rhs, w << rhs)
);
assert_eq!(
- $vec4::new(x, y, z, w) >> rhs,
+ lhs >> rhs,
$vec4::new(x >> rhs, y >> rhs, z >> rhs, w >> rhs)
);
+
+ assert_eq!(
+ &lhs << rhs,
+ $vec4::new(x << rhs, y << rhs, z << rhs, w << rhs)
+ );
+ assert_eq!(
+ &lhs >> rhs,
+ $vec4::new(x >> rhs, y >> rhs, z >> rhs, w >> rhs)
+ );
+
+ assert_eq!(
+ lhs << &rhs,
+ $vec4::new(x << rhs, y << rhs, z << rhs, w << rhs)
+ );
+ assert_eq!(
+ lhs >> &rhs,
+ $vec4::new(x >> rhs, y >> rhs, z >> rhs, w >> rhs)
+ );
+
+ assert_eq!(
+ &lhs << &rhs,
+ $vec4::new(x << rhs, y << rhs, z << rhs, w << rhs)
+ );
+ assert_eq!(
+ &lhs >> &rhs,
+ $vec4::new(x >> rhs, y >> rhs, z >> rhs, w >> rhs)
+ );
+
+ let mut a = lhs;
+ a <<= rhs;
+ assert_eq!(a, lhs << rhs);
+
+ let mut a = lhs;
+ a <<= &rhs;
+ assert_eq!(a, lhs << rhs);
+
+ let mut a = lhs;
+ a >>= rhs;
+ assert_eq!(a, lhs >> rhs);
+
+ let mut a = lhs;
+ a >>= &rhs;
+ assert_eq!(a, lhs >> rhs);
}
}
}
@@ -1757,14 +2007,13 @@
for y2 in $t_min..$t_max {
for z2 in $t_min..$t_max {
for w2 in $t_min..$t_max {
+ let lhs = $vec4::new(x1, y1, z1, w1);
assert_eq!(
- $vec4::new(x1, y1, z1, w1)
- << $rhs::new(x2, y2, z2, w2),
+ lhs << $rhs::new(x2, y2, z2, w2),
$vec4::new(x1 << x2, y1 << y2, z1 << z2, w1 << w2)
);
assert_eq!(
- $vec4::new(x1, y1, z1, w1)
- >> $rhs::new(x2, y2, z2, w2),
+ lhs >> $rhs::new(x2, y2, z2, w2),
$vec4::new(x1 >> x2, y1 >> y2, z1 >> z2, w1 >> w2)
);
}
@@ -1800,18 +2049,82 @@
for z in $t_min..$t_max {
for w in $t_min..$t_max {
for rhs in $t_min..$t_max {
+ let lhs = $vec4::new(x, y, z, w);
assert_eq!(
- $vec4::new(x, y, z, w) & rhs,
+ lhs & rhs,
$vec4::new(x & rhs, y & rhs, z & rhs, w & rhs)
);
assert_eq!(
- $vec4::new(x, y, z, w) | rhs,
+ lhs | rhs,
$vec4::new(x | rhs, y | rhs, z | rhs, w | rhs)
);
assert_eq!(
- $vec4::new(x, y, z, w) ^ rhs,
+ lhs ^ rhs,
$vec4::new(x ^ rhs, y ^ rhs, z ^ rhs, w ^ rhs)
);
+
+ assert_eq!(
+ &lhs & rhs,
+ $vec4::new(x & rhs, y & rhs, z & rhs, w & rhs)
+ );
+ assert_eq!(
+ &lhs | rhs,
+ $vec4::new(x | rhs, y | rhs, z | rhs, w | rhs)
+ );
+ assert_eq!(
+ &lhs ^ rhs,
+ $vec4::new(x ^ rhs, y ^ rhs, z ^ rhs, w ^ rhs)
+ );
+
+ assert_eq!(
+ lhs & &rhs,
+ $vec4::new(x & rhs, y & rhs, z & rhs, w & rhs)
+ );
+ assert_eq!(
+ lhs | &rhs,
+ $vec4::new(x | rhs, y | rhs, z | rhs, w | rhs)
+ );
+ assert_eq!(
+ lhs ^ &rhs,
+ $vec4::new(x ^ rhs, y ^ rhs, z ^ rhs, w ^ rhs)
+ );
+
+ assert_eq!(
+ &lhs & &rhs,
+ $vec4::new(x & rhs, y & rhs, z & rhs, w & rhs)
+ );
+ assert_eq!(
+ &lhs | &rhs,
+ $vec4::new(x | rhs, y | rhs, z | rhs, w | rhs)
+ );
+ assert_eq!(
+ &lhs ^ &rhs,
+ $vec4::new(x ^ rhs, y ^ rhs, z ^ rhs, w ^ rhs)
+ );
+
+ let mut a = lhs;
+ a &= rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a &= &rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a |= rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a |= &rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a ^= rhs;
+ assert_eq!(a, lhs ^ rhs);
+
+ let mut a = lhs;
+ a ^= &rhs;
+ assert_eq!(a, lhs ^ rhs);
}
}
}
@@ -1828,27 +2141,90 @@
for y1 in $t_min..$t_max {
for z1 in $t_min..$t_max {
for w1 in $t_min..$t_max {
- assert_eq!(!$vec4::new(x1, y1, z1, w1), $vec4::new(!x1, !y1, !z1, !w1));
+ let lhs = $vec4::new(x1, y1, z1, w1);
+ assert_eq!(!lhs, $vec4::new(!x1, !y1, !z1, !w1));
+ assert_eq!(!&lhs, $vec4::new(!x1, !y1, !z1, !w1));
for x2 in $t_min..$t_max {
for y2 in $t_min..$t_max {
for z2 in $t_min..$t_max {
for w2 in $t_min..$t_max {
+ let rhs = $vec4::new(x2, y2, z2, w2);
assert_eq!(
- $vec4::new(x1, y1, z1, w1)
- & $vec4::new(x2, y2, z2, w2),
+ lhs & rhs,
$vec4::new(x1 & x2, y1 & y2, z1 & z2, w1 & w2)
);
assert_eq!(
- $vec4::new(x1, y1, z1, w1)
- | $vec4::new(x2, y2, z2, w2),
+ lhs | rhs,
$vec4::new(x1 | x2, y1 | y2, z1 | z2, w1 | w2)
);
assert_eq!(
- $vec4::new(x1, y1, z1, w1)
- ^ $vec4::new(x2, y2, z2, w2),
+ lhs ^ rhs,
$vec4::new(x1 ^ x2, y1 ^ y2, z1 ^ z2, w1 ^ w2)
);
+
+ assert_eq!(
+ &lhs & rhs,
+ $vec4::new(x1 & x2, y1 & y2, z1 & z2, w1 & w2)
+ );
+ assert_eq!(
+ &lhs | rhs,
+ $vec4::new(x1 | x2, y1 | y2, z1 | z2, w1 | w2)
+ );
+ assert_eq!(
+ &lhs ^ rhs,
+ $vec4::new(x1 ^ x2, y1 ^ y2, z1 ^ z2, w1 ^ w2)
+ );
+
+ assert_eq!(
+ lhs & &rhs,
+ $vec4::new(x1 & x2, y1 & y2, z1 & z2, w1 & w2)
+ );
+ assert_eq!(
+ lhs | &rhs,
+ $vec4::new(x1 | x2, y1 | y2, z1 | z2, w1 | w2)
+ );
+ assert_eq!(
+ lhs ^ &rhs,
+ $vec4::new(x1 ^ x2, y1 ^ y2, z1 ^ z2, w1 ^ w2)
+ );
+
+ assert_eq!(
+ &lhs & &rhs,
+ $vec4::new(x1 & x2, y1 & y2, z1 & z2, w1 & w2)
+ );
+ assert_eq!(
+ &lhs | &rhs,
+ $vec4::new(x1 | x2, y1 | y2, z1 | z2, w1 | w2)
+ );
+ assert_eq!(
+ &lhs ^ &rhs,
+ $vec4::new(x1 ^ x2, y1 ^ y2, z1 ^ z2, w1 ^ w2)
+ );
+
+ let mut a = lhs;
+ a &= rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a &= &rhs;
+ assert_eq!(a, lhs & rhs);
+
+ let mut a = lhs;
+ a |= rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a |= &rhs;
+ assert_eq!(a, lhs | rhs);
+
+ let mut a = lhs;
+ a ^= rhs;
+ assert_eq!(a, lhs ^ rhs);
+
+ let mut a = lhs;
+ a ^= &rhs;
+ assert_eq!(a, lhs ^ rhs);
}
}
}
@@ -2759,6 +3135,14 @@
);
});
+ glam_test!(test_checked_add_signed, {
+ assert_eq!(U8Vec4::MAX.checked_add_signed(I8Vec4::ONE), None);
+ assert_eq!(
+ U8Vec4::ONE.checked_add_signed(I8Vec4::NEG_ONE),
+ Some(U8Vec4::ZERO)
+ );
+ });
+
glam_test!(test_wrapping_add_signed, {
assert_eq!(
U8Vec4::new(u8::MAX, u8::MAX, u8::MAX, u8::MAX)
@@ -3135,6 +3519,14 @@
);
});
+ glam_test!(test_checked_add_signed, {
+ assert_eq!(U16Vec4::MAX.checked_add_signed(I16Vec4::ONE), None);
+ assert_eq!(
+ U16Vec4::ONE.checked_add_signed(I16Vec4::NEG_ONE),
+ Some(U16Vec4::ZERO)
+ );
+ });
+
glam_test!(test_wrapping_add_signed, {
assert_eq!(
U16Vec4::new(u16::MAX, u16::MAX, u16::MAX, u16::MAX)
@@ -3481,6 +3873,14 @@
);
});
+ glam_test!(test_checked_add_signed, {
+ assert_eq!(UVec4::MAX.checked_add_signed(IVec4::ONE), None);
+ assert_eq!(
+ UVec4::ONE.checked_add_signed(IVec4::NEG_ONE),
+ Some(UVec4::ZERO)
+ );
+ });
+
glam_test!(test_wrapping_add_signed, {
assert_eq!(
UVec4::new(u32::MAX, u32::MAX, u32::MAX, u32::MAX)
@@ -3700,6 +4100,14 @@
);
});
+ glam_test!(test_checked_add_signed, {
+ assert_eq!(U64Vec4::MAX.checked_add_signed(I64Vec4::ONE), None);
+ assert_eq!(
+ U64Vec4::ONE.checked_add_signed(I64Vec4::NEG_ONE),
+ Some(U64Vec4::ZERO)
+ );
+ });
+
glam_test!(test_wrapping_add_signed, {
assert_eq!(
U64Vec4::new(u64::MAX, u64::MAX, u64::MAX, u64::MAX)
diff --git a/pseudo_crate/Cargo.lock b/pseudo_crate/Cargo.lock
index 1c3e5aa..76dac4d 100644
--- a/pseudo_crate/Cargo.lock
+++ b/pseudo_crate/Cargo.lock
@@ -2924,9 +2924,9 @@
[[package]]
name = "glam"
-version = "0.30.3"
+version = "0.30.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b46b9ca4690308844c644e7c634d68792467260e051c8543e0c7871662b3ba7"
+checksum = "50a99dbe56b72736564cfa4b85bf9a33079f16ae8b74983ab06af3b1a3696b11"
[[package]]
name = "glob"
diff --git a/pseudo_crate/Cargo.toml b/pseudo_crate/Cargo.toml
index 19d2585..58f2152 100644
--- a/pseudo_crate/Cargo.toml
+++ b/pseudo_crate/Cargo.toml
@@ -160,7 +160,7 @@
getrandom = "=0.3.3"
gl = "=0.14.0"
gl_common = "=0.1.0"
-glam = "=0.30.3"
+glam = "=0.30.4"
glob = "=0.3.2"
googletest = "=0.13.0"
googletest_macro = "=0.13.0"