File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -447,6 +447,7 @@ impl Projection {
447
447
/// added to the first and second values of the final column respectively.
448
448
///
449
449
/// _Godot equivalent: `Projection.jitter_offseted()`_
450
+ #[ doc( alias = "jitter_offseted" ) ]
450
451
#[ must_use]
451
452
pub fn jitter_offset ( & self , offset : Vector2 ) -> Self {
452
453
Self :: from_cols (
@@ -502,6 +503,19 @@ impl Mul<Vector4> for Projection {
502
503
}
503
504
}
504
505
506
+ impl std:: ops:: Index < Vector4Axis > for Projection {
507
+ type Output = Vector4 ;
508
+
509
+ fn index ( & self , index : Vector4Axis ) -> & Self :: Output {
510
+ match index {
511
+ Vector4Axis :: X => & self . cols [ 0 ] ,
512
+ Vector4Axis :: Y => & self . cols [ 1 ] ,
513
+ Vector4Axis :: Z => & self . cols [ 2 ] ,
514
+ Vector4Axis :: W => & self . cols [ 3 ] ,
515
+ }
516
+ }
517
+ }
518
+
505
519
impl ApproxEq for Projection {
506
520
fn approx_eq ( & self , other : & Self ) -> bool {
507
521
for i in 0 ..4 {
You can’t perform that action at this time.
0 commit comments