1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] 2 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)] 3 #[repr(C)] 4 pub struct Matrix3x2 { 5 pub M11: f32, 6 pub M12: f32, 7 pub M21: f32, 8 pub M22: f32, 9 pub M31: f32, 10 pub M32: f32, 11 } 12 impl Matrix3x2 {} 13 impl ::std::default::Default for Matrix3x2 { default() -> Self14 fn default() -> Self { 15 unsafe { ::std::mem::zeroed() } 16 } 17 } 18 impl ::std::fmt::Debug for Matrix3x2 { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result19 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 20 fmt.debug_struct("Matrix3x2").field("M11", &self.M11).field("M12", &self.M12).field("M21", &self.M21).field("M22", &self.M22).field("M31", &self.M31).field("M32", &self.M32).finish() 21 } 22 } 23 impl ::std::cmp::PartialEq for Matrix3x2 { eq(&self, other: &Self) -> bool24 fn eq(&self, other: &Self) -> bool { 25 self.M11 == other.M11 && self.M12 == other.M12 && self.M21 == other.M21 && self.M22 == other.M22 && self.M31 == other.M31 && self.M32 == other.M32 26 } 27 } 28 impl ::std::cmp::Eq for Matrix3x2 {} 29 unsafe impl ::windows::runtime::Abi for Matrix3x2 { 30 type Abi = Self; 31 type DefaultType = Self; 32 } 33 unsafe impl ::windows::runtime::RuntimeType for Matrix3x2 { 34 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Foundation.Numerics.Matrix3x2;f4;f4;f4;f4;f4;f4)"); 35 } 36 impl Matrix3x2 { identity() -> Self37 pub fn identity() -> Self { 38 Self { M11: 1.0, M12: 0.0, M21: 0.0, M22: 1.0, M31: 0.0, M32: 0.0 } 39 } translation(x: f32, y: f32) -> Self40 pub fn translation(x: f32, y: f32) -> Self { 41 Self { M11: 1.0, M12: 0.0, M21: 0.0, M22: 1.0, M31: x, M32: y } 42 } rotation(angle: f32, x: f32, y: f32) -> Self43 pub fn rotation(angle: f32, x: f32, y: f32) -> Self { 44 #[repr(C)] 45 pub struct D2D_POINT_2F { 46 pub x: f32, 47 pub y: f32, 48 } 49 #[link(name = "d2d1")] 50 extern "system" { 51 fn D2D1MakeRotateMatrix(angle: f32, center: D2D_POINT_2F, matrix: *mut Matrix3x2); 52 } 53 let mut matrix = Self::default(); 54 unsafe { 55 D2D1MakeRotateMatrix(angle, D2D_POINT_2F { x, y }, &mut matrix); 56 } 57 matrix 58 } impl_add(&self, rhs: &Self) -> Self59 fn impl_add(&self, rhs: &Self) -> Self { 60 Self { 61 M11: self.M11 + rhs.M11, 62 M12: self.M12 + rhs.M12, 63 M21: self.M21 + rhs.M21, 64 M22: self.M22 + rhs.M22, 65 M31: self.M31 + rhs.M31, 66 M32: self.M32 + rhs.M32, 67 } 68 } impl_sub(&self, rhs: &Self) -> Self69 fn impl_sub(&self, rhs: &Self) -> Self { 70 Self { 71 M11: self.M11 - rhs.M11, 72 M12: self.M12 - rhs.M12, 73 M21: self.M21 - rhs.M21, 74 M22: self.M22 - rhs.M22, 75 M31: self.M31 - rhs.M31, 76 M32: self.M32 - rhs.M32, 77 } 78 } impl_mul(&self, rhs: &Self) -> Self79 fn impl_mul(&self, rhs: &Self) -> Self { 80 Self { 81 M11: self.M11 * rhs.M11 + self.M12 * rhs.M21, 82 M12: self.M11 * rhs.M12 + self.M12 * rhs.M22, 83 M21: self.M21 * rhs.M11 + self.M22 * rhs.M21, 84 M22: self.M21 * rhs.M12 + self.M22 * rhs.M22, 85 M31: self.M31 * rhs.M11 + self.M32 * rhs.M21 + rhs.M31, 86 M32: self.M31 * rhs.M12 + self.M32 * rhs.M22 + rhs.M32, 87 } 88 } impl_mul_f32(&self, rhs: f32) -> Self89 fn impl_mul_f32(&self, rhs: f32) -> Self { 90 Self { 91 M11: self.M11 * rhs, 92 M12: self.M12 * rhs, 93 M21: self.M21 * rhs, 94 M22: self.M22 * rhs, 95 M31: self.M31 * rhs, 96 M32: self.M32 * rhs, 97 } 98 } 99 } 100 impl ::std::ops::Add<Matrix3x2> for Matrix3x2 { 101 type Output = Matrix3x2; add(self, rhs: Matrix3x2) -> Matrix3x2102 fn add(self, rhs: Matrix3x2) -> Matrix3x2 { 103 self.impl_add(&rhs) 104 } 105 } 106 impl ::std::ops::Add<&Matrix3x2> for Matrix3x2 { 107 type Output = Matrix3x2; add(self, rhs: &Matrix3x2) -> Matrix3x2108 fn add(self, rhs: &Matrix3x2) -> Matrix3x2 { 109 self.impl_add(rhs) 110 } 111 } 112 impl ::std::ops::Add<Matrix3x2> for &Matrix3x2 { 113 type Output = Matrix3x2; add(self, rhs: Matrix3x2) -> Matrix3x2114 fn add(self, rhs: Matrix3x2) -> Matrix3x2 { 115 self.impl_add(&rhs) 116 } 117 } 118 impl ::std::ops::Add<&Matrix3x2> for &Matrix3x2 { 119 type Output = Matrix3x2; add(self, rhs: &Matrix3x2) -> Matrix3x2120 fn add(self, rhs: &Matrix3x2) -> Matrix3x2 { 121 self.impl_add(rhs) 122 } 123 } 124 impl ::std::ops::Sub<Matrix3x2> for Matrix3x2 { 125 type Output = Matrix3x2; sub(self, rhs: Matrix3x2) -> Matrix3x2126 fn sub(self, rhs: Matrix3x2) -> Matrix3x2 { 127 self.impl_sub(&rhs) 128 } 129 } 130 impl ::std::ops::Sub<&Matrix3x2> for Matrix3x2 { 131 type Output = Matrix3x2; sub(self, rhs: &Matrix3x2) -> Matrix3x2132 fn sub(self, rhs: &Matrix3x2) -> Matrix3x2 { 133 self.impl_sub(rhs) 134 } 135 } 136 impl ::std::ops::Sub<Matrix3x2> for &Matrix3x2 { 137 type Output = Matrix3x2; sub(self, rhs: Matrix3x2) -> Matrix3x2138 fn sub(self, rhs: Matrix3x2) -> Matrix3x2 { 139 self.impl_sub(&rhs) 140 } 141 } 142 impl ::std::ops::Sub<&Matrix3x2> for &Matrix3x2 { 143 type Output = Matrix3x2; sub(self, rhs: &Matrix3x2) -> Matrix3x2144 fn sub(self, rhs: &Matrix3x2) -> Matrix3x2 { 145 self.impl_sub(rhs) 146 } 147 } 148 impl ::std::ops::Mul<Matrix3x2> for Matrix3x2 { 149 type Output = Matrix3x2; mul(self, rhs: Matrix3x2) -> Matrix3x2150 fn mul(self, rhs: Matrix3x2) -> Matrix3x2 { 151 self.impl_mul(&rhs) 152 } 153 } 154 impl ::std::ops::Mul<&Matrix3x2> for Matrix3x2 { 155 type Output = Matrix3x2; mul(self, rhs: &Matrix3x2) -> Matrix3x2156 fn mul(self, rhs: &Matrix3x2) -> Matrix3x2 { 157 self.impl_mul(rhs) 158 } 159 } 160 impl ::std::ops::Mul<Matrix3x2> for &Matrix3x2 { 161 type Output = Matrix3x2; mul(self, rhs: Matrix3x2) -> Matrix3x2162 fn mul(self, rhs: Matrix3x2) -> Matrix3x2 { 163 self.impl_mul(&rhs) 164 } 165 } 166 impl ::std::ops::Mul<&Matrix3x2> for &Matrix3x2 { 167 type Output = Matrix3x2; mul(self, rhs: &Matrix3x2) -> Matrix3x2168 fn mul(self, rhs: &Matrix3x2) -> Matrix3x2 { 169 self.impl_mul(rhs) 170 } 171 } 172 impl ::std::ops::Mul<f32> for Matrix3x2 { 173 type Output = Matrix3x2; mul(self, rhs: f32) -> Matrix3x2174 fn mul(self, rhs: f32) -> Matrix3x2 { 175 self.impl_mul_f32(rhs) 176 } 177 } 178 impl ::std::ops::Mul<f32> for &Matrix3x2 { 179 type Output = Matrix3x2; mul(self, rhs: f32) -> Matrix3x2180 fn mul(self, rhs: f32) -> Matrix3x2 { 181 self.impl_mul_f32(rhs) 182 } 183 } 184 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)] 185 #[repr(C)] 186 pub struct Matrix4x4 { 187 pub M11: f32, 188 pub M12: f32, 189 pub M13: f32, 190 pub M14: f32, 191 pub M21: f32, 192 pub M22: f32, 193 pub M23: f32, 194 pub M24: f32, 195 pub M31: f32, 196 pub M32: f32, 197 pub M33: f32, 198 pub M34: f32, 199 pub M41: f32, 200 pub M42: f32, 201 pub M43: f32, 202 pub M44: f32, 203 } 204 impl Matrix4x4 {} 205 impl ::std::default::Default for Matrix4x4 { default() -> Self206 fn default() -> Self { 207 unsafe { ::std::mem::zeroed() } 208 } 209 } 210 impl ::std::fmt::Debug for Matrix4x4 { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result211 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 212 fmt.debug_struct("Matrix4x4") 213 .field("M11", &self.M11) 214 .field("M12", &self.M12) 215 .field("M13", &self.M13) 216 .field("M14", &self.M14) 217 .field("M21", &self.M21) 218 .field("M22", &self.M22) 219 .field("M23", &self.M23) 220 .field("M24", &self.M24) 221 .field("M31", &self.M31) 222 .field("M32", &self.M32) 223 .field("M33", &self.M33) 224 .field("M34", &self.M34) 225 .field("M41", &self.M41) 226 .field("M42", &self.M42) 227 .field("M43", &self.M43) 228 .field("M44", &self.M44) 229 .finish() 230 } 231 } 232 impl ::std::cmp::PartialEq for Matrix4x4 { eq(&self, other: &Self) -> bool233 fn eq(&self, other: &Self) -> bool { 234 self.M11 == other.M11 && self.M12 == other.M12 && self.M13 == other.M13 && self.M14 == other.M14 && self.M21 == other.M21 && self.M22 == other.M22 && self.M23 == other.M23 && self.M24 == other.M24 && self.M31 == other.M31 && self.M32 == other.M32 && self.M33 == other.M33 && self.M34 == other.M34 && self.M41 == other.M41 && self.M42 == other.M42 && self.M43 == other.M43 && self.M44 == other.M44 235 } 236 } 237 impl ::std::cmp::Eq for Matrix4x4 {} 238 unsafe impl ::windows::runtime::Abi for Matrix4x4 { 239 type Abi = Self; 240 type DefaultType = Self; 241 } 242 unsafe impl ::windows::runtime::RuntimeType for Matrix4x4 { 243 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Foundation.Numerics.Matrix4x4;f4;f4;f4;f4;f4;f4;f4;f4;f4;f4;f4;f4;f4;f4;f4;f4)"); 244 } 245 impl Matrix4x4 { impl_add(&self, rhs: &Self) -> Self246 fn impl_add(&self, rhs: &Self) -> Self { 247 Self { 248 M11: self.M11 + rhs.M11, 249 M12: self.M12 + rhs.M12, 250 M13: self.M13 + rhs.M13, 251 M14: self.M14 + rhs.M14, 252 M21: self.M21 + rhs.M21, 253 M22: self.M22 + rhs.M22, 254 M23: self.M23 + rhs.M23, 255 M24: self.M24 + rhs.M24, 256 M31: self.M31 + rhs.M31, 257 M32: self.M32 + rhs.M32, 258 M33: self.M33 + rhs.M33, 259 M34: self.M34 + rhs.M34, 260 M41: self.M41 + rhs.M41, 261 M42: self.M42 + rhs.M42, 262 M43: self.M43 + rhs.M43, 263 M44: self.M44 + rhs.M44, 264 } 265 } impl_sub(&self, rhs: &Self) -> Self266 fn impl_sub(&self, rhs: &Self) -> Self { 267 Self { 268 M11: self.M11 - rhs.M11, 269 M12: self.M12 - rhs.M12, 270 M13: self.M13 - rhs.M13, 271 M14: self.M14 - rhs.M14, 272 M21: self.M21 - rhs.M21, 273 M22: self.M22 - rhs.M22, 274 M23: self.M23 - rhs.M23, 275 M24: self.M24 - rhs.M24, 276 M31: self.M31 - rhs.M31, 277 M32: self.M32 - rhs.M32, 278 M33: self.M33 - rhs.M33, 279 M34: self.M34 - rhs.M34, 280 M41: self.M41 - rhs.M41, 281 M42: self.M42 - rhs.M42, 282 M43: self.M43 - rhs.M43, 283 M44: self.M44 - rhs.M44, 284 } 285 } impl_mul(&self, rhs: &Self) -> Self286 fn impl_mul(&self, rhs: &Self) -> Self { 287 Self { 288 M11: self.M11 * rhs.M11 + self.M12 * rhs.M21 + self.M13 * rhs.M31 + self.M14 * rhs.M41, 289 M12: self.M11 * rhs.M12 + self.M12 * rhs.M22 + self.M13 * rhs.M32 + self.M14 * rhs.M42, 290 M13: self.M11 * rhs.M13 + self.M12 * rhs.M23 + self.M13 * rhs.M33 + self.M14 * rhs.M43, 291 M14: self.M11 * rhs.M14 + self.M12 * rhs.M24 + self.M13 * rhs.M34 + self.M14 * rhs.M44, 292 M21: self.M21 * rhs.M11 + self.M22 * rhs.M21 + self.M23 * rhs.M31 + self.M24 * rhs.M41, 293 M22: self.M21 * rhs.M12 + self.M22 * rhs.M22 + self.M23 * rhs.M32 + self.M24 * rhs.M42, 294 M23: self.M21 * rhs.M13 + self.M22 * rhs.M23 + self.M23 * rhs.M33 + self.M24 * rhs.M43, 295 M24: self.M21 * rhs.M14 + self.M22 * rhs.M24 + self.M23 * rhs.M34 + self.M24 * rhs.M44, 296 M31: self.M31 * rhs.M11 + self.M32 * rhs.M21 + self.M33 * rhs.M31 + self.M34 * rhs.M41, 297 M32: self.M31 * rhs.M12 + self.M32 * rhs.M22 + self.M33 * rhs.M32 + self.M34 * rhs.M42, 298 M33: self.M31 * rhs.M13 + self.M32 * rhs.M23 + self.M33 * rhs.M33 + self.M34 * rhs.M43, 299 M34: self.M31 * rhs.M14 + self.M32 * rhs.M24 + self.M33 * rhs.M34 + self.M34 * rhs.M44, 300 M41: self.M41 * rhs.M11 + self.M42 * rhs.M21 + self.M43 * rhs.M31 + self.M44 * rhs.M41, 301 M42: self.M41 * rhs.M12 + self.M42 * rhs.M22 + self.M43 * rhs.M32 + self.M44 * rhs.M42, 302 M43: self.M41 * rhs.M13 + self.M42 * rhs.M23 + self.M43 * rhs.M33 + self.M44 * rhs.M43, 303 M44: self.M41 * rhs.M14 + self.M42 * rhs.M24 + self.M43 * rhs.M34 + self.M44 * rhs.M44, 304 } 305 } impl_mul_f32(&self, rhs: f32) -> Self306 fn impl_mul_f32(&self, rhs: f32) -> Self { 307 Self { 308 M11: self.M11 * rhs, 309 M12: self.M12 * rhs, 310 M13: self.M13 * rhs, 311 M14: self.M14 * rhs, 312 M21: self.M21 * rhs, 313 M22: self.M22 * rhs, 314 M23: self.M23 * rhs, 315 M24: self.M24 * rhs, 316 M31: self.M31 * rhs, 317 M32: self.M32 * rhs, 318 M33: self.M33 * rhs, 319 M34: self.M34 * rhs, 320 M41: self.M41 * rhs, 321 M42: self.M42 * rhs, 322 M43: self.M43 * rhs, 323 M44: self.M44 * rhs, 324 } 325 } 326 } 327 impl ::std::ops::Add<Matrix4x4> for Matrix4x4 { 328 type Output = Matrix4x4; add(self, rhs: Matrix4x4) -> Matrix4x4329 fn add(self, rhs: Matrix4x4) -> Matrix4x4 { 330 self.impl_add(&rhs) 331 } 332 } 333 impl ::std::ops::Add<&Matrix4x4> for Matrix4x4 { 334 type Output = Matrix4x4; add(self, rhs: &Matrix4x4) -> Matrix4x4335 fn add(self, rhs: &Matrix4x4) -> Matrix4x4 { 336 self.impl_add(rhs) 337 } 338 } 339 impl ::std::ops::Add<Matrix4x4> for &Matrix4x4 { 340 type Output = Matrix4x4; add(self, rhs: Matrix4x4) -> Matrix4x4341 fn add(self, rhs: Matrix4x4) -> Matrix4x4 { 342 self.impl_add(&rhs) 343 } 344 } 345 impl ::std::ops::Add<&Matrix4x4> for &Matrix4x4 { 346 type Output = Matrix4x4; add(self, rhs: &Matrix4x4) -> Matrix4x4347 fn add(self, rhs: &Matrix4x4) -> Matrix4x4 { 348 self.impl_add(rhs) 349 } 350 } 351 impl ::std::ops::Sub<Matrix4x4> for Matrix4x4 { 352 type Output = Matrix4x4; sub(self, rhs: Matrix4x4) -> Matrix4x4353 fn sub(self, rhs: Matrix4x4) -> Matrix4x4 { 354 self.impl_sub(&rhs) 355 } 356 } 357 impl ::std::ops::Sub<&Matrix4x4> for Matrix4x4 { 358 type Output = Matrix4x4; sub(self, rhs: &Matrix4x4) -> Matrix4x4359 fn sub(self, rhs: &Matrix4x4) -> Matrix4x4 { 360 self.impl_sub(rhs) 361 } 362 } 363 impl ::std::ops::Sub<Matrix4x4> for &Matrix4x4 { 364 type Output = Matrix4x4; sub(self, rhs: Matrix4x4) -> Matrix4x4365 fn sub(self, rhs: Matrix4x4) -> Matrix4x4 { 366 self.impl_sub(&rhs) 367 } 368 } 369 impl ::std::ops::Sub<&Matrix4x4> for &Matrix4x4 { 370 type Output = Matrix4x4; sub(self, rhs: &Matrix4x4) -> Matrix4x4371 fn sub(self, rhs: &Matrix4x4) -> Matrix4x4 { 372 self.impl_sub(rhs) 373 } 374 } 375 impl ::std::ops::Mul<Matrix4x4> for Matrix4x4 { 376 type Output = Matrix4x4; mul(self, rhs: Matrix4x4) -> Matrix4x4377 fn mul(self, rhs: Matrix4x4) -> Matrix4x4 { 378 self.impl_mul(&rhs) 379 } 380 } 381 impl ::std::ops::Mul<&Matrix4x4> for Matrix4x4 { 382 type Output = Matrix4x4; mul(self, rhs: &Matrix4x4) -> Matrix4x4383 fn mul(self, rhs: &Matrix4x4) -> Matrix4x4 { 384 self.impl_mul(rhs) 385 } 386 } 387 impl ::std::ops::Mul<Matrix4x4> for &Matrix4x4 { 388 type Output = Matrix4x4; mul(self, rhs: Matrix4x4) -> Matrix4x4389 fn mul(self, rhs: Matrix4x4) -> Matrix4x4 { 390 self.impl_mul(&rhs) 391 } 392 } 393 impl ::std::ops::Mul<&Matrix4x4> for &Matrix4x4 { 394 type Output = Matrix4x4; mul(self, rhs: &Matrix4x4) -> Matrix4x4395 fn mul(self, rhs: &Matrix4x4) -> Matrix4x4 { 396 self.impl_mul(rhs) 397 } 398 } 399 impl ::std::ops::Mul<f32> for Matrix4x4 { 400 type Output = Matrix4x4; mul(self, rhs: f32) -> Matrix4x4401 fn mul(self, rhs: f32) -> Matrix4x4 { 402 self.impl_mul_f32(rhs) 403 } 404 } 405 impl ::std::ops::Mul<f32> for &Matrix4x4 { 406 type Output = Matrix4x4; mul(self, rhs: f32) -> Matrix4x4407 fn mul(self, rhs: f32) -> Matrix4x4 { 408 self.impl_mul_f32(rhs) 409 } 410 } 411 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)] 412 #[repr(C)] 413 pub struct Plane { 414 pub Normal: Vector3, 415 pub D: f32, 416 } 417 impl Plane {} 418 impl ::std::default::Default for Plane { default() -> Self419 fn default() -> Self { 420 unsafe { ::std::mem::zeroed() } 421 } 422 } 423 impl ::std::fmt::Debug for Plane { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result424 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 425 fmt.debug_struct("Plane").field("Normal", &self.Normal).field("D", &self.D).finish() 426 } 427 } 428 impl ::std::cmp::PartialEq for Plane { eq(&self, other: &Self) -> bool429 fn eq(&self, other: &Self) -> bool { 430 self.Normal == other.Normal && self.D == other.D 431 } 432 } 433 impl ::std::cmp::Eq for Plane {} 434 unsafe impl ::windows::runtime::Abi for Plane { 435 type Abi = Self; 436 type DefaultType = Self; 437 } 438 unsafe impl ::windows::runtime::RuntimeType for Plane { 439 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Foundation.Numerics.Plane;struct(Windows.Foundation.Numerics.Vector3;f4;f4;f4);f4)"); 440 } 441 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)] 442 #[repr(C)] 443 pub struct Quaternion { 444 pub X: f32, 445 pub Y: f32, 446 pub Z: f32, 447 pub W: f32, 448 } 449 impl Quaternion {} 450 impl ::std::default::Default for Quaternion { default() -> Self451 fn default() -> Self { 452 unsafe { ::std::mem::zeroed() } 453 } 454 } 455 impl ::std::fmt::Debug for Quaternion { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result456 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 457 fmt.debug_struct("Quaternion").field("X", &self.X).field("Y", &self.Y).field("Z", &self.Z).field("W", &self.W).finish() 458 } 459 } 460 impl ::std::cmp::PartialEq for Quaternion { eq(&self, other: &Self) -> bool461 fn eq(&self, other: &Self) -> bool { 462 self.X == other.X && self.Y == other.Y && self.Z == other.Z && self.W == other.W 463 } 464 } 465 impl ::std::cmp::Eq for Quaternion {} 466 unsafe impl ::windows::runtime::Abi for Quaternion { 467 type Abi = Self; 468 type DefaultType = Self; 469 } 470 unsafe impl ::windows::runtime::RuntimeType for Quaternion { 471 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Foundation.Numerics.Quaternion;f4;f4;f4;f4)"); 472 } 473 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)] 474 #[repr(C)] 475 pub struct Rational { 476 pub Numerator: u32, 477 pub Denominator: u32, 478 } 479 impl Rational {} 480 impl ::std::default::Default for Rational { default() -> Self481 fn default() -> Self { 482 unsafe { ::std::mem::zeroed() } 483 } 484 } 485 impl ::std::fmt::Debug for Rational { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result486 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 487 fmt.debug_struct("Rational").field("Numerator", &self.Numerator).field("Denominator", &self.Denominator).finish() 488 } 489 } 490 impl ::std::cmp::PartialEq for Rational { eq(&self, other: &Self) -> bool491 fn eq(&self, other: &Self) -> bool { 492 self.Numerator == other.Numerator && self.Denominator == other.Denominator 493 } 494 } 495 impl ::std::cmp::Eq for Rational {} 496 unsafe impl ::windows::runtime::Abi for Rational { 497 type Abi = Self; 498 type DefaultType = Self; 499 } 500 unsafe impl ::windows::runtime::RuntimeType for Rational { 501 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Foundation.Numerics.Rational;u4;u4)"); 502 } 503 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)] 504 #[repr(C)] 505 pub struct Vector2 { 506 pub X: f32, 507 pub Y: f32, 508 } 509 impl Vector2 {} 510 impl ::std::default::Default for Vector2 { default() -> Self511 fn default() -> Self { 512 unsafe { ::std::mem::zeroed() } 513 } 514 } 515 impl ::std::fmt::Debug for Vector2 { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result516 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 517 fmt.debug_struct("Vector2").field("X", &self.X).field("Y", &self.Y).finish() 518 } 519 } 520 impl ::std::cmp::PartialEq for Vector2 { eq(&self, other: &Self) -> bool521 fn eq(&self, other: &Self) -> bool { 522 self.X == other.X && self.Y == other.Y 523 } 524 } 525 impl ::std::cmp::Eq for Vector2 {} 526 unsafe impl ::windows::runtime::Abi for Vector2 { 527 type Abi = Self; 528 type DefaultType = Self; 529 } 530 unsafe impl ::windows::runtime::RuntimeType for Vector2 { 531 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Foundation.Numerics.Vector2;f4;f4)"); 532 } 533 impl Vector2 { new(X: f32, Y: f32) -> Self534 pub fn new(X: f32, Y: f32) -> Self { 535 Self { X, Y } 536 } zero() -> Self537 pub fn zero() -> Self { 538 Self { X: 0f32, Y: 0f32 } 539 } one() -> Self540 pub fn one() -> Self { 541 Self { X: 1f32, Y: 1f32 } 542 } unit_x() -> Self543 pub fn unit_x() -> Self { 544 Self { X: 1.0, Y: 0.0 } 545 } unit_y() -> Self546 pub fn unit_y() -> Self { 547 Self { X: 0.0, Y: 1.0 } 548 } dot(&self, rhs: &Self) -> f32549 pub fn dot(&self, rhs: &Self) -> f32 { 550 self.X * rhs.X + self.Y * rhs.Y 551 } length_squared(&self) -> f32552 pub fn length_squared(&self) -> f32 { 553 self.dot(self) 554 } length(&self) -> f32555 pub fn length(&self) -> f32 { 556 self.length_squared().sqrt() 557 } distance(&self, value: &Self) -> f32558 pub fn distance(&self, value: &Self) -> f32 { 559 (self - value).length() 560 } distance_squared(&self, value: &Self) -> f32561 pub fn distance_squared(&self, value: &Self) -> f32 { 562 (self - value).length_squared() 563 } normalize(&self) -> Self564 pub fn normalize(&self) -> Self { 565 self / self.length() 566 } impl_add(&self, rhs: &Self) -> Self567 fn impl_add(&self, rhs: &Self) -> Self { 568 Self { X: self.X + rhs.X, Y: self.Y + rhs.Y } 569 } impl_sub(&self, rhs: &Self) -> Self570 fn impl_sub(&self, rhs: &Self) -> Self { 571 Self { X: self.X - rhs.X, Y: self.Y - rhs.Y } 572 } impl_div(&self, rhs: &Self) -> Self573 fn impl_div(&self, rhs: &Self) -> Self { 574 Self { X: self.X / rhs.X, Y: self.Y / rhs.Y } 575 } impl_div_f32(&self, rhs: f32) -> Self576 fn impl_div_f32(&self, rhs: f32) -> Self { 577 Self { X: self.X / rhs, Y: self.Y / rhs } 578 } impl_mul(&self, rhs: &Self) -> Self579 fn impl_mul(&self, rhs: &Self) -> Self { 580 Self { X: self.X * rhs.X, Y: self.Y * rhs.Y } 581 } impl_mul_f32(&self, rhs: f32) -> Self582 fn impl_mul_f32(&self, rhs: f32) -> Self { 583 Self { X: self.X * rhs, Y: self.Y * rhs } 584 } 585 } 586 impl ::std::ops::Add<Vector2> for Vector2 { 587 type Output = Vector2; add(self, rhs: Vector2) -> Vector2588 fn add(self, rhs: Vector2) -> Vector2 { 589 self.impl_add(&rhs) 590 } 591 } 592 impl ::std::ops::Add<&Vector2> for Vector2 { 593 type Output = Vector2; add(self, rhs: &Vector2) -> Vector2594 fn add(self, rhs: &Vector2) -> Vector2 { 595 self.impl_add(rhs) 596 } 597 } 598 impl ::std::ops::Add<Vector2> for &Vector2 { 599 type Output = Vector2; add(self, rhs: Vector2) -> Vector2600 fn add(self, rhs: Vector2) -> Vector2 { 601 self.impl_add(&rhs) 602 } 603 } 604 impl ::std::ops::Add<&Vector2> for &Vector2 { 605 type Output = Vector2; add(self, rhs: &Vector2) -> Vector2606 fn add(self, rhs: &Vector2) -> Vector2 { 607 self.impl_add(rhs) 608 } 609 } 610 impl ::std::ops::Sub<Vector2> for Vector2 { 611 type Output = Vector2; sub(self, rhs: Vector2) -> Vector2612 fn sub(self, rhs: Vector2) -> Vector2 { 613 self.impl_sub(&rhs) 614 } 615 } 616 impl ::std::ops::Sub<&Vector2> for Vector2 { 617 type Output = Vector2; sub(self, rhs: &Vector2) -> Vector2618 fn sub(self, rhs: &Vector2) -> Vector2 { 619 self.impl_sub(rhs) 620 } 621 } 622 impl ::std::ops::Sub<Vector2> for &Vector2 { 623 type Output = Vector2; sub(self, rhs: Vector2) -> Vector2624 fn sub(self, rhs: Vector2) -> Vector2 { 625 self.impl_sub(&rhs) 626 } 627 } 628 impl ::std::ops::Sub<&Vector2> for &Vector2 { 629 type Output = Vector2; sub(self, rhs: &Vector2) -> Vector2630 fn sub(self, rhs: &Vector2) -> Vector2 { 631 self.impl_sub(rhs) 632 } 633 } 634 impl ::std::ops::Div<Vector2> for Vector2 { 635 type Output = Vector2; div(self, rhs: Vector2) -> Vector2636 fn div(self, rhs: Vector2) -> Vector2 { 637 self.impl_div(&rhs) 638 } 639 } 640 impl ::std::ops::Div<&Vector2> for Vector2 { 641 type Output = Vector2; div(self, rhs: &Vector2) -> Vector2642 fn div(self, rhs: &Vector2) -> Vector2 { 643 self.impl_div(rhs) 644 } 645 } 646 impl ::std::ops::Div<Vector2> for &Vector2 { 647 type Output = Vector2; div(self, rhs: Vector2) -> Vector2648 fn div(self, rhs: Vector2) -> Vector2 { 649 self.impl_div(&rhs) 650 } 651 } 652 impl ::std::ops::Div<&Vector2> for &Vector2 { 653 type Output = Vector2; div(self, rhs: &Vector2) -> Vector2654 fn div(self, rhs: &Vector2) -> Vector2 { 655 self.impl_div(rhs) 656 } 657 } 658 impl ::std::ops::Div<f32> for Vector2 { 659 type Output = Vector2; div(self, rhs: f32) -> Vector2660 fn div(self, rhs: f32) -> Vector2 { 661 self.impl_div_f32(rhs) 662 } 663 } 664 impl ::std::ops::Div<f32> for &Vector2 { 665 type Output = Vector2; div(self, rhs: f32) -> Vector2666 fn div(self, rhs: f32) -> Vector2 { 667 self.impl_div_f32(rhs) 668 } 669 } 670 impl ::std::ops::Mul<Vector2> for Vector2 { 671 type Output = Vector2; mul(self, rhs: Vector2) -> Vector2672 fn mul(self, rhs: Vector2) -> Vector2 { 673 self.impl_mul(&rhs) 674 } 675 } 676 impl ::std::ops::Mul<&Vector2> for Vector2 { 677 type Output = Vector2; mul(self, rhs: &Vector2) -> Vector2678 fn mul(self, rhs: &Vector2) -> Vector2 { 679 self.impl_mul(rhs) 680 } 681 } 682 impl ::std::ops::Mul<Vector2> for &Vector2 { 683 type Output = Vector2; mul(self, rhs: Vector2) -> Vector2684 fn mul(self, rhs: Vector2) -> Vector2 { 685 self.impl_mul(&rhs) 686 } 687 } 688 impl ::std::ops::Mul<&Vector2> for &Vector2 { 689 type Output = Vector2; mul(self, rhs: &Vector2) -> Vector2690 fn mul(self, rhs: &Vector2) -> Vector2 { 691 self.impl_mul(rhs) 692 } 693 } 694 impl ::std::ops::Mul<f32> for Vector2 { 695 type Output = Vector2; mul(self, rhs: f32) -> Vector2696 fn mul(self, rhs: f32) -> Vector2 { 697 self.impl_mul_f32(rhs) 698 } 699 } 700 impl ::std::ops::Mul<f32> for &Vector2 { 701 type Output = Vector2; mul(self, rhs: f32) -> Vector2702 fn mul(self, rhs: f32) -> Vector2 { 703 self.impl_mul_f32(rhs) 704 } 705 } 706 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)] 707 #[repr(C)] 708 pub struct Vector3 { 709 pub X: f32, 710 pub Y: f32, 711 pub Z: f32, 712 } 713 impl Vector3 {} 714 impl ::std::default::Default for Vector3 { default() -> Self715 fn default() -> Self { 716 unsafe { ::std::mem::zeroed() } 717 } 718 } 719 impl ::std::fmt::Debug for Vector3 { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result720 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 721 fmt.debug_struct("Vector3").field("X", &self.X).field("Y", &self.Y).field("Z", &self.Z).finish() 722 } 723 } 724 impl ::std::cmp::PartialEq for Vector3 { eq(&self, other: &Self) -> bool725 fn eq(&self, other: &Self) -> bool { 726 self.X == other.X && self.Y == other.Y && self.Z == other.Z 727 } 728 } 729 impl ::std::cmp::Eq for Vector3 {} 730 unsafe impl ::windows::runtime::Abi for Vector3 { 731 type Abi = Self; 732 type DefaultType = Self; 733 } 734 unsafe impl ::windows::runtime::RuntimeType for Vector3 { 735 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Foundation.Numerics.Vector3;f4;f4;f4)"); 736 } 737 impl Vector3 { new(X: f32, Y: f32, Z: f32) -> Self738 pub fn new(X: f32, Y: f32, Z: f32) -> Self { 739 Self { X, Y, Z } 740 } zero() -> Self741 pub fn zero() -> Self { 742 Self { X: 0f32, Y: 0f32, Z: 0f32 } 743 } one() -> Self744 pub fn one() -> Self { 745 Self { X: 1f32, Y: 1f32, Z: 1f32 } 746 } unit_x() -> Self747 pub fn unit_x() -> Self { 748 Self { X: 1.0, Y: 0.0, Z: 0.0 } 749 } unit_y() -> Self750 pub fn unit_y() -> Self { 751 Self { X: 0.0, Y: 1.0, Z: 0.0 } 752 } unit_z() -> Self753 pub fn unit_z() -> Self { 754 Self { X: 0.0, Y: 0.0, Z: 1.0 } 755 } dot(&self, rhs: &Self) -> f32756 pub fn dot(&self, rhs: &Self) -> f32 { 757 self.X * rhs.X + self.Y * rhs.Y + self.Z * rhs.Z 758 } length_squared(&self) -> f32759 pub fn length_squared(&self) -> f32 { 760 self.dot(self) 761 } length(&self) -> f32762 pub fn length(&self) -> f32 { 763 self.length_squared().sqrt() 764 } distance(&self, value: &Self) -> f32765 pub fn distance(&self, value: &Self) -> f32 { 766 (self - value).length() 767 } distance_squared(&self, value: &Self) -> f32768 pub fn distance_squared(&self, value: &Self) -> f32 { 769 (self - value).length_squared() 770 } normalize(&self) -> Self771 pub fn normalize(&self) -> Self { 772 self / self.length() 773 } impl_add(&self, rhs: &Self) -> Self774 fn impl_add(&self, rhs: &Self) -> Self { 775 Self { X: self.X + rhs.X, Y: self.Y + rhs.Y, Z: self.Z + rhs.Z } 776 } impl_sub(&self, rhs: &Self) -> Self777 fn impl_sub(&self, rhs: &Self) -> Self { 778 Self { X: self.X - rhs.X, Y: self.Y - rhs.Y, Z: self.Z - rhs.Z } 779 } impl_div(&self, rhs: &Self) -> Self780 fn impl_div(&self, rhs: &Self) -> Self { 781 Self { X: self.X / rhs.X, Y: self.Y / rhs.Y, Z: self.Z / rhs.Z } 782 } impl_div_f32(&self, rhs: f32) -> Self783 fn impl_div_f32(&self, rhs: f32) -> Self { 784 Self { X: self.X / rhs, Y: self.Y / rhs, Z: self.Z / rhs } 785 } impl_mul(&self, rhs: &Self) -> Self786 fn impl_mul(&self, rhs: &Self) -> Self { 787 Self { X: self.X * rhs.X, Y: self.Y * rhs.Y, Z: self.Z * rhs.Z } 788 } impl_mul_f32(&self, rhs: f32) -> Self789 fn impl_mul_f32(&self, rhs: f32) -> Self { 790 Self { X: self.X * rhs, Y: self.Y * rhs, Z: self.Z * rhs } 791 } 792 } 793 impl ::std::ops::Add<Vector3> for Vector3 { 794 type Output = Vector3; add(self, rhs: Vector3) -> Vector3795 fn add(self, rhs: Vector3) -> Vector3 { 796 self.impl_add(&rhs) 797 } 798 } 799 impl ::std::ops::Add<&Vector3> for Vector3 { 800 type Output = Vector3; add(self, rhs: &Vector3) -> Vector3801 fn add(self, rhs: &Vector3) -> Vector3 { 802 self.impl_add(rhs) 803 } 804 } 805 impl ::std::ops::Add<Vector3> for &Vector3 { 806 type Output = Vector3; add(self, rhs: Vector3) -> Vector3807 fn add(self, rhs: Vector3) -> Vector3 { 808 self.impl_add(&rhs) 809 } 810 } 811 impl ::std::ops::Add<&Vector3> for &Vector3 { 812 type Output = Vector3; add(self, rhs: &Vector3) -> Vector3813 fn add(self, rhs: &Vector3) -> Vector3 { 814 self.impl_add(rhs) 815 } 816 } 817 impl ::std::ops::Sub<Vector3> for Vector3 { 818 type Output = Vector3; sub(self, rhs: Vector3) -> Vector3819 fn sub(self, rhs: Vector3) -> Vector3 { 820 self.impl_sub(&rhs) 821 } 822 } 823 impl ::std::ops::Sub<&Vector3> for Vector3 { 824 type Output = Vector3; sub(self, rhs: &Vector3) -> Vector3825 fn sub(self, rhs: &Vector3) -> Vector3 { 826 self.impl_sub(rhs) 827 } 828 } 829 impl ::std::ops::Sub<Vector3> for &Vector3 { 830 type Output = Vector3; sub(self, rhs: Vector3) -> Vector3831 fn sub(self, rhs: Vector3) -> Vector3 { 832 self.impl_sub(&rhs) 833 } 834 } 835 impl ::std::ops::Sub<&Vector3> for &Vector3 { 836 type Output = Vector3; sub(self, rhs: &Vector3) -> Vector3837 fn sub(self, rhs: &Vector3) -> Vector3 { 838 self.impl_sub(rhs) 839 } 840 } 841 impl ::std::ops::Div<Vector3> for Vector3 { 842 type Output = Vector3; div(self, rhs: Vector3) -> Vector3843 fn div(self, rhs: Vector3) -> Vector3 { 844 self.impl_div(&rhs) 845 } 846 } 847 impl ::std::ops::Div<&Vector3> for Vector3 { 848 type Output = Vector3; div(self, rhs: &Vector3) -> Vector3849 fn div(self, rhs: &Vector3) -> Vector3 { 850 self.impl_div(rhs) 851 } 852 } 853 impl ::std::ops::Div<Vector3> for &Vector3 { 854 type Output = Vector3; div(self, rhs: Vector3) -> Vector3855 fn div(self, rhs: Vector3) -> Vector3 { 856 self.impl_div(&rhs) 857 } 858 } 859 impl ::std::ops::Div<&Vector3> for &Vector3 { 860 type Output = Vector3; div(self, rhs: &Vector3) -> Vector3861 fn div(self, rhs: &Vector3) -> Vector3 { 862 self.impl_div(rhs) 863 } 864 } 865 impl ::std::ops::Div<f32> for Vector3 { 866 type Output = Vector3; div(self, rhs: f32) -> Vector3867 fn div(self, rhs: f32) -> Vector3 { 868 self.impl_div_f32(rhs) 869 } 870 } 871 impl ::std::ops::Div<f32> for &Vector3 { 872 type Output = Vector3; div(self, rhs: f32) -> Vector3873 fn div(self, rhs: f32) -> Vector3 { 874 self.impl_div_f32(rhs) 875 } 876 } 877 impl ::std::ops::Mul<Vector3> for Vector3 { 878 type Output = Vector3; mul(self, rhs: Vector3) -> Vector3879 fn mul(self, rhs: Vector3) -> Vector3 { 880 self.impl_mul(&rhs) 881 } 882 } 883 impl ::std::ops::Mul<&Vector3> for Vector3 { 884 type Output = Vector3; mul(self, rhs: &Vector3) -> Vector3885 fn mul(self, rhs: &Vector3) -> Vector3 { 886 self.impl_mul(rhs) 887 } 888 } 889 impl ::std::ops::Mul<Vector3> for &Vector3 { 890 type Output = Vector3; mul(self, rhs: Vector3) -> Vector3891 fn mul(self, rhs: Vector3) -> Vector3 { 892 self.impl_mul(&rhs) 893 } 894 } 895 impl ::std::ops::Mul<&Vector3> for &Vector3 { 896 type Output = Vector3; mul(self, rhs: &Vector3) -> Vector3897 fn mul(self, rhs: &Vector3) -> Vector3 { 898 self.impl_mul(rhs) 899 } 900 } 901 impl ::std::ops::Mul<f32> for Vector3 { 902 type Output = Vector3; mul(self, rhs: f32) -> Vector3903 fn mul(self, rhs: f32) -> Vector3 { 904 self.impl_mul_f32(rhs) 905 } 906 } 907 impl ::std::ops::Mul<f32> for &Vector3 { 908 type Output = Vector3; mul(self, rhs: f32) -> Vector3909 fn mul(self, rhs: f32) -> Vector3 { 910 self.impl_mul_f32(rhs) 911 } 912 } 913 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)] 914 #[repr(C)] 915 pub struct Vector4 { 916 pub X: f32, 917 pub Y: f32, 918 pub Z: f32, 919 pub W: f32, 920 } 921 impl Vector4 {} 922 impl ::std::default::Default for Vector4 { default() -> Self923 fn default() -> Self { 924 unsafe { ::std::mem::zeroed() } 925 } 926 } 927 impl ::std::fmt::Debug for Vector4 { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result928 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 929 fmt.debug_struct("Vector4").field("X", &self.X).field("Y", &self.Y).field("Z", &self.Z).field("W", &self.W).finish() 930 } 931 } 932 impl ::std::cmp::PartialEq for Vector4 { eq(&self, other: &Self) -> bool933 fn eq(&self, other: &Self) -> bool { 934 self.X == other.X && self.Y == other.Y && self.Z == other.Z && self.W == other.W 935 } 936 } 937 impl ::std::cmp::Eq for Vector4 {} 938 unsafe impl ::windows::runtime::Abi for Vector4 { 939 type Abi = Self; 940 type DefaultType = Self; 941 } 942 unsafe impl ::windows::runtime::RuntimeType for Vector4 { 943 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"struct(Windows.Foundation.Numerics.Vector4;f4;f4;f4;f4)"); 944 } 945 impl Vector4 { new(X: f32, Y: f32, Z: f32, W: f32) -> Self946 pub fn new(X: f32, Y: f32, Z: f32, W: f32) -> Self { 947 Self { X, Y, Z, W } 948 } zero() -> Self949 pub fn zero() -> Self { 950 Self { X: 0f32, Y: 0f32, Z: 0f32, W: 0f32 } 951 } one() -> Self952 pub fn one() -> Self { 953 Self { X: 1f32, Y: 1f32, Z: 1f32, W: 1f32 } 954 } unit_x() -> Self955 pub fn unit_x() -> Self { 956 Self { X: 1.0, Y: 0.0, Z: 0.0, W: 0.0 } 957 } unit_y() -> Self958 pub fn unit_y() -> Self { 959 Self { X: 0.0, Y: 1.0, Z: 0.0, W: 0.0 } 960 } unit_z() -> Self961 pub fn unit_z() -> Self { 962 Self { X: 0.0, Y: 0.0, Z: 1.0, W: 0.0 } 963 } unit_w() -> Self964 pub fn unit_w() -> Self { 965 Self { X: 0.0, Y: 0.0, Z: 0.0, W: 1.0 } 966 } dot(&self, rhs: &Self) -> f32967 pub fn dot(&self, rhs: &Self) -> f32 { 968 self.X * rhs.X + self.Y * rhs.Y + self.Z * rhs.Z + self.W * rhs.W 969 } length_squared(&self) -> f32970 pub fn length_squared(&self) -> f32 { 971 self.dot(self) 972 } length(&self) -> f32973 pub fn length(&self) -> f32 { 974 self.length_squared().sqrt() 975 } distance(&self, value: &Self) -> f32976 pub fn distance(&self, value: &Self) -> f32 { 977 (self - value).length() 978 } distance_squared(&self, value: &Self) -> f32979 pub fn distance_squared(&self, value: &Self) -> f32 { 980 (self - value).length_squared() 981 } normalize(&self) -> Self982 pub fn normalize(&self) -> Self { 983 self / self.length() 984 } impl_add(&self, rhs: &Self) -> Self985 fn impl_add(&self, rhs: &Self) -> Self { 986 Self { X: self.X + rhs.X, Y: self.Y + rhs.Y, Z: self.Z + rhs.Z, W: self.W + rhs.W } 987 } impl_sub(&self, rhs: &Self) -> Self988 fn impl_sub(&self, rhs: &Self) -> Self { 989 Self { X: self.X - rhs.X, Y: self.Y - rhs.Y, Z: self.Z - rhs.Z, W: self.W - rhs.W } 990 } impl_div(&self, rhs: &Self) -> Self991 fn impl_div(&self, rhs: &Self) -> Self { 992 Self { X: self.X / rhs.X, Y: self.Y / rhs.Y, Z: self.Z / rhs.Z, W: self.W / rhs.W } 993 } impl_div_f32(&self, rhs: f32) -> Self994 fn impl_div_f32(&self, rhs: f32) -> Self { 995 Self { X: self.X / rhs, Y: self.Y / rhs, Z: self.Z / rhs, W: self.W / rhs } 996 } impl_mul(&self, rhs: &Self) -> Self997 fn impl_mul(&self, rhs: &Self) -> Self { 998 Self { X: self.X * rhs.X, Y: self.Y * rhs.Y, Z: self.Z * rhs.Z, W: self.W * rhs.W } 999 } impl_mul_f32(&self, rhs: f32) -> Self1000 fn impl_mul_f32(&self, rhs: f32) -> Self { 1001 Self { X: self.X * rhs, Y: self.Y * rhs, Z: self.Z * rhs, W: self.W * rhs } 1002 } 1003 } 1004 impl ::std::ops::Add<Vector4> for Vector4 { 1005 type Output = Vector4; add(self, rhs: Vector4) -> Vector41006 fn add(self, rhs: Vector4) -> Vector4 { 1007 self.impl_add(&rhs) 1008 } 1009 } 1010 impl ::std::ops::Add<&Vector4> for Vector4 { 1011 type Output = Vector4; add(self, rhs: &Vector4) -> Vector41012 fn add(self, rhs: &Vector4) -> Vector4 { 1013 self.impl_add(rhs) 1014 } 1015 } 1016 impl ::std::ops::Add<Vector4> for &Vector4 { 1017 type Output = Vector4; add(self, rhs: Vector4) -> Vector41018 fn add(self, rhs: Vector4) -> Vector4 { 1019 self.impl_add(&rhs) 1020 } 1021 } 1022 impl ::std::ops::Add<&Vector4> for &Vector4 { 1023 type Output = Vector4; add(self, rhs: &Vector4) -> Vector41024 fn add(self, rhs: &Vector4) -> Vector4 { 1025 self.impl_add(rhs) 1026 } 1027 } 1028 impl ::std::ops::Sub<Vector4> for Vector4 { 1029 type Output = Vector4; sub(self, rhs: Vector4) -> Vector41030 fn sub(self, rhs: Vector4) -> Vector4 { 1031 self.impl_sub(&rhs) 1032 } 1033 } 1034 impl ::std::ops::Sub<&Vector4> for Vector4 { 1035 type Output = Vector4; sub(self, rhs: &Vector4) -> Vector41036 fn sub(self, rhs: &Vector4) -> Vector4 { 1037 self.impl_sub(rhs) 1038 } 1039 } 1040 impl ::std::ops::Sub<Vector4> for &Vector4 { 1041 type Output = Vector4; sub(self, rhs: Vector4) -> Vector41042 fn sub(self, rhs: Vector4) -> Vector4 { 1043 self.impl_sub(&rhs) 1044 } 1045 } 1046 impl ::std::ops::Sub<&Vector4> for &Vector4 { 1047 type Output = Vector4; sub(self, rhs: &Vector4) -> Vector41048 fn sub(self, rhs: &Vector4) -> Vector4 { 1049 self.impl_sub(rhs) 1050 } 1051 } 1052 impl ::std::ops::Div<Vector4> for Vector4 { 1053 type Output = Vector4; div(self, rhs: Vector4) -> Vector41054 fn div(self, rhs: Vector4) -> Vector4 { 1055 self.impl_div(&rhs) 1056 } 1057 } 1058 impl ::std::ops::Div<&Vector4> for Vector4 { 1059 type Output = Vector4; div(self, rhs: &Vector4) -> Vector41060 fn div(self, rhs: &Vector4) -> Vector4 { 1061 self.impl_div(rhs) 1062 } 1063 } 1064 impl ::std::ops::Div<Vector4> for &Vector4 { 1065 type Output = Vector4; div(self, rhs: Vector4) -> Vector41066 fn div(self, rhs: Vector4) -> Vector4 { 1067 self.impl_div(&rhs) 1068 } 1069 } 1070 impl ::std::ops::Div<&Vector4> for &Vector4 { 1071 type Output = Vector4; div(self, rhs: &Vector4) -> Vector41072 fn div(self, rhs: &Vector4) -> Vector4 { 1073 self.impl_div(rhs) 1074 } 1075 } 1076 impl ::std::ops::Div<f32> for Vector4 { 1077 type Output = Vector4; div(self, rhs: f32) -> Vector41078 fn div(self, rhs: f32) -> Vector4 { 1079 self.impl_div_f32(rhs) 1080 } 1081 } 1082 impl ::std::ops::Div<f32> for &Vector4 { 1083 type Output = Vector4; div(self, rhs: f32) -> Vector41084 fn div(self, rhs: f32) -> Vector4 { 1085 self.impl_div_f32(rhs) 1086 } 1087 } 1088 impl ::std::ops::Mul<Vector4> for Vector4 { 1089 type Output = Vector4; mul(self, rhs: Vector4) -> Vector41090 fn mul(self, rhs: Vector4) -> Vector4 { 1091 self.impl_mul(&rhs) 1092 } 1093 } 1094 impl ::std::ops::Mul<&Vector4> for Vector4 { 1095 type Output = Vector4; mul(self, rhs: &Vector4) -> Vector41096 fn mul(self, rhs: &Vector4) -> Vector4 { 1097 self.impl_mul(rhs) 1098 } 1099 } 1100 impl ::std::ops::Mul<Vector4> for &Vector4 { 1101 type Output = Vector4; mul(self, rhs: Vector4) -> Vector41102 fn mul(self, rhs: Vector4) -> Vector4 { 1103 self.impl_mul(&rhs) 1104 } 1105 } 1106 impl ::std::ops::Mul<&Vector4> for &Vector4 { 1107 type Output = Vector4; mul(self, rhs: &Vector4) -> Vector41108 fn mul(self, rhs: &Vector4) -> Vector4 { 1109 self.impl_mul(rhs) 1110 } 1111 } 1112 impl ::std::ops::Mul<f32> for Vector4 { 1113 type Output = Vector4; mul(self, rhs: f32) -> Vector41114 fn mul(self, rhs: f32) -> Vector4 { 1115 self.impl_mul_f32(rhs) 1116 } 1117 } 1118 impl ::std::ops::Mul<f32> for &Vector4 { 1119 type Output = Vector4; mul(self, rhs: f32) -> Vector41120 fn mul(self, rhs: f32) -> Vector4 { 1121 self.impl_mul_f32(rhs) 1122 } 1123 } 1124