Skip to content

Commit 30f558b

Browse files
committed
Remove prefer-inline for non-trivial Matrix functions
1 parent 0279cb8 commit 30f558b

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

lib/src/vector_math/matrix4.dart

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,7 @@ class Matrix4 {
691691
}
692692

693693
/// Translate this matrix by x, y, z, w.
694-
@pragma('wasm:prefer-inline')
695-
@pragma('vm:prefer-inline')
696-
@pragma('dart2js:prefer-inline')
697-
void translateByDouble(double tx, double ty, double tz, double tw) {
694+
void translateByDouble(double tx, double ty, double tz, [double tw = 1.0]) {
698695
final t1 = _m4storage[0] * tx +
699696
_m4storage[4] * ty +
700697
_m4storage[8] * tz +
@@ -760,9 +757,6 @@ class Matrix4 {
760757
}
761758

762759
/// Multiply this by a translation from the left.
763-
@pragma('wasm:prefer-inline')
764-
@pragma('vm:prefer-inline')
765-
@pragma('dart2js:prefer-inline')
766760
void leftTranslateByDouble(double tx, double ty, double tz, double tw) {
767761
// Column 1
768762
final r1 = _m4storage[3];
@@ -941,9 +935,6 @@ class Matrix4 {
941935
}
942936

943937
/// Scale this matrix.
944-
@pragma('wasm:prefer-inline')
945-
@pragma('vm:prefer-inline')
946-
@pragma('dart2js:prefer-inline')
947938
void scaleByDouble(double sx, double sy, double sz, double sw) {
948939
_m4storage[0] *= sx;
949940
_m4storage[1] *= sx;

lib/src/vector_math_64/matrix4.dart

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,7 @@ class Matrix4 {
691691
}
692692

693693
/// Translate this matrix by x, y, z, w.
694-
@pragma('wasm:prefer-inline')
695-
@pragma('vm:prefer-inline')
696-
@pragma('dart2js:prefer-inline')
697-
void translateByDouble(double tx, double ty, double tz, double tw) {
694+
void translateByDouble(double tx, double ty, double tz, [double tw = 1.0]) {
698695
final t1 = _m4storage[0] * tx +
699696
_m4storage[4] * ty +
700697
_m4storage[8] * tz +
@@ -760,9 +757,6 @@ class Matrix4 {
760757
}
761758

762759
/// Multiply this by a translation from the left.
763-
@pragma('wasm:prefer-inline')
764-
@pragma('vm:prefer-inline')
765-
@pragma('dart2js:prefer-inline')
766760
void leftTranslateByDouble(double tx, double ty, double tz, double tw) {
767761
// Column 1
768762
final r1 = _m4storage[3];
@@ -941,9 +935,6 @@ class Matrix4 {
941935
}
942936

943937
/// Scale this matrix.
944-
@pragma('wasm:prefer-inline')
945-
@pragma('vm:prefer-inline')
946-
@pragma('dart2js:prefer-inline')
947938
void scaleByDouble(double sx, double sy, double sz, double sw) {
948939
_m4storage[0] *= sx;
949940
_m4storage[1] *= sx;

lib/src/vector_math_64/quad.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Quad {
2020
/// The third point of the quad.
2121
Vector3 get point2 => _point2;
2222

23-
/// The third point of the quad.
23+
/// The fourth point of the quad.
2424
Vector3 get point3 => _point3;
2525

2626
/// Create a new, uninitialized quad.

0 commit comments

Comments
 (0)