summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
Diffstat (limited to 'core/math')
-rw-r--r--core/math/face3.cpp2
-rw-r--r--core/math/geometry.cpp4
-rw-r--r--core/math/geometry.h2
-rw-r--r--core/math/matrix3.cpp2
-rw-r--r--core/math/plane.cpp2
-rw-r--r--core/math/rect3.h2
6 files changed, 7 insertions, 7 deletions
diff --git a/core/math/face3.cpp b/core/math/face3.cpp
index d9d99b0384..6a15feefe1 100644
--- a/core/math/face3.cpp
+++ b/core/math/face3.cpp
@@ -136,7 +136,7 @@ Face3::Side Face3::get_side_of(const Face3 &p_face, ClockDirection p_clock_dir)
const Vector3 &v = p_face.vertex[i];
- if (plane.has_point(v)) //coplanar, dont bother
+ if (plane.has_point(v)) //coplanar, don't bother
continue;
if (plane.is_point_over(v))
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp
index ec4d352a8f..97579e41ef 100644
--- a/core/math/geometry.cpp
+++ b/core/math/geometry.cpp
@@ -990,7 +990,7 @@ void Geometry::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_resu
//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 necesary because video cards have limits
+ //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.
// for example, it will prioritize a 1024x1024 atlas (works everywhere) instead of a
@@ -1057,7 +1057,7 @@ void Geometry::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_resu
if (end_w > max_w)
max_w = end_w;
- if (ofs == 0 || end_h > limit_h) //while h limit not reched, keep stacking
+ if (ofs == 0 || end_h > limit_h) //while h limit not reached, keep stacking
ofs += wrects[j].s.width;
}
diff --git a/core/math/geometry.h b/core/math/geometry.h
index 93ab0be2e0..26f977e6eb 100644
--- a/core/math/geometry.h
+++ b/core/math/geometry.h
@@ -108,7 +108,7 @@ public:
//do the function 'd' as defined by pb. I think is is dot product of some sort
#define d_of(m, n, o, p) ((m.x - n.x) * (o.x - p.x) + (m.y - n.y) * (o.y - p.y) + (m.z - n.z) * (o.z - p.z))
- //caluclate the parpametric position on the 2 curves, mua and mub
+ //calculate the parametric position on the 2 curves, mua and mub
real_t mua = ( d_of(p1,q1,q2,q1) * d_of(q2,q1,p2,p1) - d_of(p1,q1,p2,p1) * d_of(q2,q1,q2,q1) ) / ( d_of(p2,p1,p2,p1) * d_of(q2,q1,q2,q1) - d_of(q2,q1,p2,p1) * d_of(q2,q1,p2,p1) );
real_t mub = ( d_of(p1,q1,q2,q1) + mua * d_of(q2,q1,p2,p1) ) / d_of(q2,q1,q2,q1);
diff --git a/core/math/matrix3.cpp b/core/math/matrix3.cpp
index 5f73d91ef3..98cab39ba3 100644
--- a/core/math/matrix3.cpp
+++ b/core/math/matrix3.cpp
@@ -229,7 +229,7 @@ Vector3 Basis::get_scale() const {
// FIXME: We eventually need a proper polar decomposition.
// As a cheap workaround until then, to ensure that R is a proper rotation matrix with determinant +1
// (such that it can be represented by a Quat or Euler angles), we absorb the sign flip into the scaling matrix.
- // As such, it works in conjuction with get_rotation().
+ // As such, it works in conjunction with get_rotation().
real_t det_sign = determinant() > 0 ? 1 : -1;
return det_sign * Vector3(
Vector3(elements[0][0], elements[1][0], elements[2][0]).length(),
diff --git a/core/math/plane.cpp b/core/math/plane.cpp
index 29e7f2e75c..bef5c3ab06 100644
--- a/core/math/plane.cpp
+++ b/core/math/plane.cpp
@@ -116,7 +116,7 @@ bool Plane::intersects_ray(Vector3 p_from, Vector3 p_dir, Vector3 *p_intersectio
real_t dist = (normal.dot(p_from) - d) / den;
//printf("dist is %i\n",dist);
- if (dist > CMP_EPSILON) { //this is a ray, before the emiting pos (p_from) doesnt exist
+ if (dist > CMP_EPSILON) { //this is a ray, before the emitting pos (p_from) doesn't exist
return false;
}
diff --git a/core/math/rect3.h b/core/math/rect3.h
index 26198537c2..0b11cd7b52 100644
--- a/core/math/rect3.h
+++ b/core/math/rect3.h
@@ -95,7 +95,7 @@ public:
Rect3 expand(const Vector3 &p_vector) const;
_FORCE_INLINE_ void project_range_in_plane(const Plane &p_plane, real_t &r_min, real_t &r_max) const;
- _FORCE_INLINE_ void expand_to(const Vector3 &p_vector); /** expand to contain a point if necesary */
+ _FORCE_INLINE_ void expand_to(const Vector3 &p_vector); /** expand to contain a point if necessary */
operator String() const;