Fix constant_identifier_names
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 08ec949..9a02cf1 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -28,7 +28,7 @@
- cancel_subscriptions
#- cascade_invocations
- comment_references
- #- constant_identifier_names
+ - constant_identifier_names
- control_flow_in_finally
- directives_ordering
- empty_catches
diff --git a/lib/src/vector_math/ray.dart b/lib/src/vector_math/ray.dart
index c344ed5..d4ee7da 100644
--- a/lib/src/vector_math/ray.dart
+++ b/lib/src/vector_math/ray.dart
@@ -80,7 +80,7 @@
/// Return the distance from the origin of this to the intersection with
/// [other] if this intersects with [other], or null if the don't intersect.
double intersectsWithTriangle(Triangle other) {
- const double EPSILON = 10e-6;
+ const double epsilon = 10e-6;
final Vector3 point0 = other._point0;
final Vector3 point1 = other._point1;
@@ -96,7 +96,7 @@
_direction.crossInto(_e2, _q);
final double a = _e1.dot(_q);
- if (a > -EPSILON && a < EPSILON) {
+ if (a > -epsilon && a < epsilon) {
return null;
}
@@ -113,7 +113,7 @@
_s.crossInto(_e1, _r);
final double v = f * (_direction.dot(_r));
- if (v < -EPSILON || u + v > 1.0 + EPSILON) {
+ if (v < -epsilon || u + v > 1.0 + epsilon) {
return null;
}
@@ -125,7 +125,7 @@
/// Return the distance from the origin of this to the intersection with
/// [other] if this intersects with [other], or null if the don't intersect.
double intersectsWithQuad(Quad other) {
- const double EPSILON = 10e-6;
+ const double epsilon = 10e-6;
// First triangle
Vector3 point0 = other._point0;
@@ -142,7 +142,7 @@
_direction.crossInto(_e2, _q);
final double a0 = _e1.dot(_q);
- if (!(a0 > -EPSILON && a0 < EPSILON)) {
+ if (!(a0 > -epsilon && a0 < epsilon)) {
final double f = 1 / a0;
_s
..setFrom(_origin)
@@ -153,7 +153,7 @@
_s.crossInto(_e1, _r);
final double v = f * (_direction.dot(_r));
- if (!(v < -EPSILON || u + v > 1.0 + EPSILON)) {
+ if (!(v < -epsilon || u + v > 1.0 + epsilon)) {
final double t = f * (_e2.dot(_r));
return t;
@@ -176,7 +176,7 @@
_direction.crossInto(_e2, _q);
final double a1 = _e1.dot(_q);
- if (!(a1 > -EPSILON && a1 < EPSILON)) {
+ if (!(a1 > -epsilon && a1 < epsilon)) {
final double f = 1 / a1;
_s
..setFrom(_origin)
@@ -187,7 +187,7 @@
_s.crossInto(_e1, _r);
final double v = f * (_direction.dot(_r));
- if (!(v < -EPSILON || u + v > 1.0 + EPSILON)) {
+ if (!(v < -epsilon || u + v > 1.0 + epsilon)) {
final double t = f * (_e2.dot(_r));
return t;
diff --git a/lib/src/vector_math/third_party/noise.dart b/lib/src/vector_math/third_party/noise.dart
index 58e6856..dafc469 100644
--- a/lib/src/vector_math/third_party/noise.dart
+++ b/lib/src/vector_math/third_party/noise.dart
@@ -84,8 +84,8 @@
// Skewing and unskewing factors for 2, 3, and 4 dimensions
static final double _F2 = 0.5 * (math.sqrt(3.0) - 1.0);
static final double _G2 = (3.0 - math.sqrt(3.0)) / 6.0;
- static const double _F3 = 1.0 / 3.0;
- static const double _G3 = 1.0 / 6.0;
+ static const double _f3 = 1.0 / 3.0;
+ static const double _g3 = 1.0 / 6.0;
static final double _F4 = (math.sqrt(5.0) - 1.0) / 4.0;
static final double _G4 = (5.0 - math.sqrt(5.0)) / 20.0;
@@ -179,11 +179,11 @@
double n0, n1, n2, n3; // Noise contributions from the four corners
// Skew the input space to determine which simplex cell we're in
final double s =
- (xin + yin + zin) * _F3; // Very nice and simple skew factor for 3D
+ (xin + yin + zin) * _f3; // Very nice and simple skew factor for 3D
final int i = (xin + s).floor();
final int j = (yin + s).floor();
final int k = (zin + s).floor();
- final double t = (i + j + k) * _G3;
+ final double t = (i + j + k) * _g3;
final double X0 = i - t; // Unskew the cell origin back to (x,y,z) space
final double Y0 = j - t;
final double Z0 = k - t;
@@ -251,17 +251,17 @@
// a step of (0,0,1) in (i,j,k) means a step of (-c,-c,1-c) in (x,y,z), where
// c = 1/6.
final double x1 =
- x0 - i1 + _G3; // Offsets for second corner in (x,y,z) coords
- final double y1 = y0 - j1 + _G3;
- final double z1 = z0 - k1 + _G3;
+ x0 - i1 + _g3; // Offsets for second corner in (x,y,z) coords
+ final double y1 = y0 - j1 + _g3;
+ final double z1 = z0 - k1 + _g3;
final double x2 =
- x0 - i2 + 2.0 * _G3; // Offsets for third corner in (x,y,z) coords
- final double y2 = y0 - j2 + 2.0 * _G3;
- final double z2 = z0 - k2 + 2.0 * _G3;
+ x0 - i2 + 2.0 * _g3; // Offsets for third corner in (x,y,z) coords
+ final double y2 = y0 - j2 + 2.0 * _g3;
+ final double z2 = z0 - k2 + 2.0 * _g3;
final double x3 =
- x0 - 1.0 + 3.0 * _G3; // Offsets for last corner in (x,y,z) coords
- final double y3 = y0 - 1.0 + 3.0 * _G3;
- final double z3 = z0 - 1.0 + 3.0 * _G3;
+ x0 - 1.0 + 3.0 * _g3; // Offsets for last corner in (x,y,z) coords
+ final double y3 = y0 - 1.0 + 3.0 * _g3;
+ final double z3 = z0 - 1.0 + 3.0 * _g3;
// Work out the hashed gradient indices of the four simplex corners
final int ii = i & 255;
final int jj = j & 255;
diff --git a/lib/src/vector_math_64/ray.dart b/lib/src/vector_math_64/ray.dart
index 3b8b4dc..7148275 100644
--- a/lib/src/vector_math_64/ray.dart
+++ b/lib/src/vector_math_64/ray.dart
@@ -80,7 +80,7 @@
/// Return the distance from the origin of this to the intersection with
/// [other] if this intersects with [other], or null if the don't intersect.
double intersectsWithTriangle(Triangle other) {
- const double EPSILON = 10e-6;
+ const double epsilon = 10e-6;
final Vector3 point0 = other._point0;
final Vector3 point1 = other._point1;
@@ -96,7 +96,7 @@
_direction.crossInto(_e2, _q);
final double a = _e1.dot(_q);
- if (a > -EPSILON && a < EPSILON) {
+ if (a > -epsilon && a < epsilon) {
return null;
}
@@ -113,7 +113,7 @@
_s.crossInto(_e1, _r);
final double v = f * (_direction.dot(_r));
- if (v < -EPSILON || u + v > 1.0 + EPSILON) {
+ if (v < -epsilon || u + v > 1.0 + epsilon) {
return null;
}
@@ -125,7 +125,7 @@
/// Return the distance from the origin of this to the intersection with
/// [other] if this intersects with [other], or null if the don't intersect.
double intersectsWithQuad(Quad other) {
- const double EPSILON = 10e-6;
+ const double epsilon = 10e-6;
// First triangle
Vector3 point0 = other._point0;
@@ -142,7 +142,7 @@
_direction.crossInto(_e2, _q);
final double a0 = _e1.dot(_q);
- if (!(a0 > -EPSILON && a0 < EPSILON)) {
+ if (!(a0 > -epsilon && a0 < epsilon)) {
final double f = 1 / a0;
_s
..setFrom(_origin)
@@ -153,7 +153,7 @@
_s.crossInto(_e1, _r);
final double v = f * (_direction.dot(_r));
- if (!(v < -EPSILON || u + v > 1.0 + EPSILON)) {
+ if (!(v < -epsilon || u + v > 1.0 + epsilon)) {
final double t = f * (_e2.dot(_r));
return t;
@@ -176,7 +176,7 @@
_direction.crossInto(_e2, _q);
final double a1 = _e1.dot(_q);
- if (!(a1 > -EPSILON && a1 < EPSILON)) {
+ if (!(a1 > -epsilon && a1 < epsilon)) {
final double f = 1 / a1;
_s
..setFrom(_origin)
@@ -187,7 +187,7 @@
_s.crossInto(_e1, _r);
final double v = f * (_direction.dot(_r));
- if (!(v < -EPSILON || u + v > 1.0 + EPSILON)) {
+ if (!(v < -epsilon || u + v > 1.0 + epsilon)) {
final double t = f * (_e2.dot(_r));
return t;
diff --git a/lib/src/vector_math_64/third_party/noise.dart b/lib/src/vector_math_64/third_party/noise.dart
index d6304be..47107c9 100644
--- a/lib/src/vector_math_64/third_party/noise.dart
+++ b/lib/src/vector_math_64/third_party/noise.dart
@@ -84,8 +84,8 @@
// Skewing and unskewing factors for 2, 3, and 4 dimensions
static final double _F2 = 0.5 * (math.sqrt(3.0) - 1.0);
static final double _G2 = (3.0 - math.sqrt(3.0)) / 6.0;
- static const double _F3 = 1.0 / 3.0;
- static const double _G3 = 1.0 / 6.0;
+ static const double _f3 = 1.0 / 3.0;
+ static const double _g3 = 1.0 / 6.0;
static final double _F4 = (math.sqrt(5.0) - 1.0) / 4.0;
static final double _G4 = (5.0 - math.sqrt(5.0)) / 20.0;
@@ -179,11 +179,11 @@
double n0, n1, n2, n3; // Noise contributions from the four corners
// Skew the input space to determine which simplex cell we're in
final double s =
- (xin + yin + zin) * _F3; // Very nice and simple skew factor for 3D
+ (xin + yin + zin) * _f3; // Very nice and simple skew factor for 3D
final int i = (xin + s).floor();
final int j = (yin + s).floor();
final int k = (zin + s).floor();
- final double t = (i + j + k) * _G3;
+ final double t = (i + j + k) * _g3;
final double X0 = i - t; // Unskew the cell origin back to (x,y,z) space
final double Y0 = j - t;
final double Z0 = k - t;
@@ -251,17 +251,17 @@
// a step of (0,0,1) in (i,j,k) means a step of (-c,-c,1-c) in (x,y,z), where
// c = 1/6.
final double x1 =
- x0 - i1 + _G3; // Offsets for second corner in (x,y,z) coords
- final double y1 = y0 - j1 + _G3;
- final double z1 = z0 - k1 + _G3;
+ x0 - i1 + _g3; // Offsets for second corner in (x,y,z) coords
+ final double y1 = y0 - j1 + _g3;
+ final double z1 = z0 - k1 + _g3;
final double x2 =
- x0 - i2 + 2.0 * _G3; // Offsets for third corner in (x,y,z) coords
- final double y2 = y0 - j2 + 2.0 * _G3;
- final double z2 = z0 - k2 + 2.0 * _G3;
+ x0 - i2 + 2.0 * _g3; // Offsets for third corner in (x,y,z) coords
+ final double y2 = y0 - j2 + 2.0 * _g3;
+ final double z2 = z0 - k2 + 2.0 * _g3;
final double x3 =
- x0 - 1.0 + 3.0 * _G3; // Offsets for last corner in (x,y,z) coords
- final double y3 = y0 - 1.0 + 3.0 * _G3;
- final double z3 = z0 - 1.0 + 3.0 * _G3;
+ x0 - 1.0 + 3.0 * _g3; // Offsets for last corner in (x,y,z) coords
+ final double y3 = y0 - 1.0 + 3.0 * _g3;
+ final double z3 = z0 - 1.0 + 3.0 * _g3;
// Work out the hashed gradient indices of the four simplex corners
final int ii = i & 255;
final int jj = j & 255;