Skip to content

Commit a6e5025

Browse files
committed
Remove Transform2D::from_rotation_translation_scale()
The constructor is unintuitive, has no GDScript equivalent and will need to be reworked. The plan is to bring back a more "idiomatic" way of constructing Transform2D, similar to glam::Affine2D::from_scale_angle_translation(): https://docs.rs/glam/0.21.3/glam/f32/struct.Affine2.html#method.from_scale_angle_translation
1 parent b34a858 commit a6e5025

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Changed supported Godot version to 3.5.1 ([#910](https://github.com/godot-rust/godot-rust/pull/910))
1313
- MSRV is now 1.63 ([#910](https://github.com/godot-rust/godot-rust/pull/910))
1414

15+
### Removed
16+
17+
- `Transform2D::from_rotation_translation_scale()` constructor needs more intuitive API ([#910](https://github.com/godot-rust/godot-rust/pull/910))
18+
19+
1520
## [0.10.2] - unreleased
1621

1722
Last maintenance release for Godot 3.4.

gdnative-core/src/core_types/geom/transform2d.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ impl Transform2D {
7575
}
7676
}
7777

78-
/// Constructs the transform from a given angle (in radians), translation, and scale.
79-
#[inline]
80-
pub fn from_rotation_translation_scale(
81-
translation: Vector2,
82-
rotation: f32,
83-
scale: Vector2,
84-
) -> Self {
85-
Self::IDENTITY
86-
.translated(translation)
87-
.rotated(rotation)
88-
.scaled(scale)
89-
}
90-
9178
/// Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
9279
#[inline]
9380
pub fn affine_inverse(&self) -> Self {

0 commit comments

Comments
 (0)