diff options
author | Anshul7sp1 <Anshul7sp1@users.noreply.github.com> | 2021-03-12 19:05:16 +0530 |
---|---|---|
committer | Anshul7sp1 <Anshul7sp1@users.noreply.github.com> | 2021-03-12 19:05:16 +0530 |
commit | 91181c20865d419decd78e022006074c9fd0faba (patch) | |
tree | 29f7cfdc5c544cfd6f3128588dd42f9ce3767c8e /core/math | |
parent | adf233ed0436a0564db7682b4ce0931656d4c392 (diff) |
Fixes small typos and grammar correction
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/basis.cpp | 6 | ||||
-rw-r--r-- | core/math/expression.cpp | 2 | ||||
-rw-r--r-- | core/math/geometry_2d.cpp | 6 | ||||
-rw-r--r-- | core/math/quick_hull.cpp | 2 | ||||
-rw-r--r-- | core/math/triangulate.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/core/math/basis.cpp b/core/math/basis.cpp index cbdd8a8c9f..cc2b7c6611 100644 --- a/core/math/basis.cpp +++ b/core/math/basis.cpp @@ -132,7 +132,7 @@ bool Basis::is_symmetric() const { Basis Basis::diagonalize() { //NOTE: only implemented for symmetric matrices -//with the Jacobi iterative method method +//with the Jacobi iterative method #ifdef MATH_CHECKS ERR_FAIL_COND_V(!is_symmetric(), Basis()); #endif @@ -317,7 +317,7 @@ Vector3 Basis::rotref_posscale_decomposition(Basis &rotref) const { // Multiplies the matrix from left by the rotation matrix: M -> R.M // Note that this does *not* rotate the matrix itself. // -// The main use of Basis is as Transform.basis, which is used a the transformation matrix +// The main use of Basis is as Transform.basis, which is used by the transformation matrix // of 3D object. Rotate here refers to rotation of the object (which is R * (*this)), // not the matrix itself (which is R * (*this) * R.transposed()). Basis Basis::rotated(const Vector3 &p_axis, real_t p_phi) const { @@ -881,7 +881,7 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const { if ((Math::abs(elements[1][0] - elements[0][1]) < epsilon) && (Math::abs(elements[2][0] - elements[0][2]) < epsilon) && (Math::abs(elements[2][1] - elements[1][2]) < epsilon)) { // singularity found // first check for identity matrix which must have +1 for all terms - // in leading diagonaland zero in other terms + // in leading diagonal and zero in other terms if ((Math::abs(elements[1][0] + elements[0][1]) < epsilon2) && (Math::abs(elements[2][0] + elements[0][2]) < epsilon2) && (Math::abs(elements[2][1] + elements[1][2]) < epsilon2) && (Math::abs(elements[0][0] + elements[1][1] + elements[2][2] - 3) < epsilon2)) { // this singularity is identity matrix so angle = 0 r_axis = Vector3(0, 1, 0); diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 636ea601c7..f7ac44d321 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -978,7 +978,7 @@ Expression::ENode *Expression::_parse_expression() { } } - /* Reduce the set set of expressions and place them in an operator tree, respecting precedence */ + /* Reduce the set of expressions and place them in an operator tree, respecting precedence */ while (expression.size() > 1) { int next_op = -1; diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp index d67be14d33..feb1fb2fb8 100644 --- a/core/math/geometry_2d.cpp +++ b/core/math/geometry_2d.cpp @@ -87,9 +87,9 @@ struct _AtlasWorkRectResult { void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size) { // Super simple, almost brute force scanline stacking fitter. // It's pretty basic for now, but it tries to make sure that the aspect ratio of the - // resulting atlas is somehow square. This is necessary because video cards have limits. - // On texture size (usually 2048 or 4096), so the more square a texture, the more chances. - // It will work in every hardware. + // resulting atlas is somehow square. This is necessary because video cards have limits + // on texture size (usually 2048 or 4096), so the squarer a texture, the more the chances + // that it will work in every hardware. // For example, it will prioritize a 1024x1024 atlas (works everywhere) instead of a // 256x8192 atlas (won't work anywhere). diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp index ad28967d7a..fe18cc3d41 100644 --- a/core/math/quick_hull.cpp +++ b/core/math/quick_hull.cpp @@ -268,7 +268,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_ for (Map<Edge, FaceConnect>::Element *E = lit_edges.front(); E; E = E->next()) { FaceConnect &fc = E->get(); if (fc.left && fc.right) { - continue; //edge is uninteresting, not on horizont + continue; //edge is uninteresting, not on horizon } //create new face! diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp index 0047c0705d..fa1588dbc5 100644 --- a/core/math/triangulate.cpp +++ b/core/math/triangulate.cpp @@ -97,7 +97,7 @@ bool Triangulate::snip(const Vector<Vector2> &p_contour, int u, int v, int w, in // It can happen that the triangulation ends up with three aligned vertices to deal with. // In this scenario, making the check below strict may reject the possibility of - // forming a last triangle with these aligned vertices, preventing the triangulatiom + // forming a last triangle with these aligned vertices, preventing the triangulation // from completing. // To avoid that we allow zero-area triangles if all else failed. float threshold = relaxed ? -CMP_EPSILON : CMP_EPSILON; |