Skip to content

Commit

Permalink
Merge remote-tracking branch 'luzpaz/misc-typos'
Browse files Browse the repository at this point in the history
  • Loading branch information
caryoscelus committed Dec 15, 2017
2 parents 642e51a + 764e907 commit cf4bfc2
Show file tree
Hide file tree
Showing 40 changed files with 71 additions and 71 deletions.
4 changes: 2 additions & 2 deletions Doxyfile
Expand Up @@ -1096,7 +1096,7 @@ HTML_STYLESHEET =
# cascading style sheets that are included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
# standard style sheet and is therefor more robust against future updates.
# standard style sheet and is therefore more robust against future updates.
# Doxygen will copy the style sheet files to the output directory.
# Note: The order of the extra stylesheet files is of importance (e.g. the last
# stylesheet in the list overrules the setting of the previous ones in the
Expand Down Expand Up @@ -1641,7 +1641,7 @@ EXTRA_PACKAGES = amsmath \
# following commands have a special meaning inside the header: $title,
# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string,
# for the replacement values of the other commands the user is refered to
# for the replacement values of the other commands the user is referred to
# HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.

Expand Down
2 changes: 1 addition & 1 deletion README.win32
Expand Up @@ -12,7 +12,7 @@
- mingw32-make
- copy the resulting *.exe files into the inkscape install directory

If you want to be able to compile the ragel defined svg-parser aswell,
If you want to be able to compile the ragel defined svg-parser as well,
you must download ragel from http://www.cs.queensu.ca/~thurston/ragel/
Unpack the windows binary package into a dir of your own choice.
Check whether ragel's dir is set correctly in mingwenv.bat (RAGEL_BIN).
Expand Down
2 changes: 1 addition & 1 deletion doc/manual2/concepts
Expand Up @@ -19,7 +19,7 @@ This is perhaps the most important concept within lib2geom, as it defines
the interface for the basic, one-dimensional functions. Fragments are
defined on the interval [0,1], which is referred to as the _intended domain_
of the function. Functions may be well defined for all values (many are),
but the 0-to-1 domain has signifigant semantic value. When the functions
but the 0-to-1 domain has significant semantic value. When the functions
are used to represent a *Curve*, 0 is the start and 1 is the end.

h4. @ T::output_type @
Expand Down
4 changes: 2 additions & 2 deletions doc/manual2/piecewise
Expand Up @@ -10,13 +10,13 @@ still be accurate. An example of this is the *inverse* function.

In the world of lib2geom, this is implemented as the *Piecewise*
template class. It manages a sequence of fragment 'segments' and the
cuts between them. These cuts are the various t-values which seperate
cuts between them. These cuts are the various t-values which separate
the different segments.

h2. Cuts

The first and last cuts of a piecewise define it's intended range, and
the intermediary cuts seperate the segments. With indices, segment i
the intermediary cuts separate the segments. With indices, segment i
is always bordered on the left with cut i and on the right with cut i+1.
In general, c = s+1, where c is the number of cuts and s is the number
of segments. These invariants are checked by the
Expand Down
4 changes: 2 additions & 2 deletions doc/s-pb-thoughts.txt
Expand Up @@ -5,7 +5,7 @@
it has a nice haskell connection, btw
rather than representing things as finite polynomials, we can store them as lazy lists and simply take enough terms at the end of the calculations
did you at least look at the examples?
namely, convertion of nurbs to beziers and offset curves?
namely, conversion of nurbs to beziers and offset curves?
the basic idea is that although polynomials (which are really linear combinations of 1, x, x^2, x^3...) are easy to work with
they are crap for two main reasons: a) though they are always correct for 0, any rounding or truncation will make the values at 1 fluctuate
b) converting between bezier and polynomial is mathematically inprecise
Expand All @@ -24,7 +24,7 @@
that article basically shows that anything you can do with polynomials, you can do with s-pbs
(with a little extra work)
so I'll probably remove poly.h
every curve can be written as an inifinite s-pb
every curve can be written as an infinite s-pb
including things like spirals
so we could do spiral offset directly
basically, if you can write an operation mathematically, you can do it symbolically on an s-pb
Expand Down
4 changes: 2 additions & 2 deletions src/2geom/bezier-clipping.cpp
Expand Up @@ -729,7 +729,7 @@ const Interval H2_INTERVAL(nextafter(0.5, 1.0), 1.0);
* in case the clipping doesn't shrink the initial interval more than 20%,
* a subdivision step is performed.
* If during the computation both curves collapse to a single point
* the routine exits indipendently by the precision reached in the computation
* the routine exits independently by the precision reached in the computation
* of the curve intervals.
*/
template <>
Expand Down Expand Up @@ -888,7 +888,7 @@ void iterate<intersection_point_tag> (std::vector<Interval>& domsA,
* in case the clipping doesn't shrink the initial interval more than 20%,
* a subdivision step is performed.
* If during the computation one of the two curve interval length becomes less
* than MAX_PRECISION the routine exits indipendently by the precision reached
* than MAX_PRECISION the routine exits independently by the precision reached
* in the computation of the other curve interval.
*/
template <>
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/bezier-curve.cpp
Expand Up @@ -79,7 +79,7 @@ namespace Geom
* @image html bezier-curve-evaluation.png "Evaluation of the Bezier curve"
*
* An important property of the Bezier curves is that their parameters (control points)
* have an intutive geometric interpretation. Because of this, they are frequently used
* have an intuitive geometric interpretation. Because of this, they are frequently used
* in vector graphics editors.
*
* Every Bezier curve is contained in its control polygon (the convex polygon composed
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/conicsec.cpp
Expand Up @@ -1246,7 +1246,7 @@ xAx xAx::rotate (double angle) const

/*
* Decompose a degenerate conic in two lines the conic section is made by.
* Return true if the decomposition is successfull, else if it fails.
* Return true if the decomposition is successful, else if it fails.
*
* l1, l2: out parameters where the decomposed conic section is returned
*/
Expand Down
4 changes: 2 additions & 2 deletions src/2geom/elliptical-arc-from-sbasis.cpp
Expand Up @@ -52,7 +52,7 @@ namespace detail
* make_elliptical_arc
*
* convert a parametric polynomial curve given in symmetric power basis form
* into an EllipticalArc type; in order to be successfull the input curve
* into an EllipticalArc type; in order to be successful the input curve
* has to look like an actual elliptical arc even if a certain tolerance
* is allowed through an ad-hoc parameter.
* The conversion is performed through an interpolation on a certain amount of
Expand Down Expand Up @@ -109,7 +109,7 @@ class make_elliptical_arc
public:
/*
* perform the actual conversion
* return true if the conversion is successfull, false on the contrary
* return true if the conversion is successful, false on the contrary
*/
bool operator()()
{
Expand Down
4 changes: 2 additions & 2 deletions src/2geom/generic-rect.h
Expand Up @@ -280,15 +280,15 @@ class GenericRect
void unionWith(OptCRect const &b);

/** @brief Expand the rectangle in both directions by the specified amount.
* Note that this is different from scaling. Negative values wil shrink the
* Note that this is different from scaling. Negative values will shrink the
* rectangle. If <code>-amount</code> is larger than
* half of the width, the X interval will contain only the X coordinate
* of the midpoint; same for height. */
void expandBy(C amount) {
expandBy(amount, amount);
}
/** @brief Expand the rectangle in both directions.
* Note that this is different from scaling. Negative values wil shrink the
* Note that this is different from scaling. Negative values will shrink the
* rectangle. If <code>-x</code> is larger than
* half of the width, the X interval will contain only the X coordinate
* of the midpoint; same for height. */
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/intersection-graph.cpp
Expand Up @@ -174,7 +174,7 @@ void PathIntersectionGraph::_assignEdgeWindingParities(Coord precision)
void PathIntersectionGraph::_assignComponentStatusFromDegenerateIntersections()
{
// If a path has only degenerate intersections, assign its status now.
// This protects against later accidentaly picking a point for winding
// This protects against later accidentally picking a point for winding
// determination that is exactly at a removed intersection.
for (unsigned w = 0; w < 2; ++w) {
for (unsigned li = 0; li < _components[w].size(); ++li) {
Expand Down
4 changes: 2 additions & 2 deletions src/2geom/intervaltree/interval_tree.cc
Expand Up @@ -185,7 +185,7 @@ void IntervalTree::RightRotate(IntervalTreeNode* y) {
/**/
/* EFFECTS: Inserts z into the tree as if it were a regular binary tree */
/* using the algorithm described in _Introduction_To_Algorithms_ */
/* by Cormen et al. This funciton is only intended to be called */
/* by Cormen et al. This function is only intended to be called */
/* by the InsertTree function and not by the user */
/***********************************************************************/

Expand Down Expand Up @@ -245,7 +245,7 @@ void IntervalTree::FixUpMaxHigh(IntervalTreeNode * x) {
#endif
}

/* Before calling InsertNode the node x should have its key set */
/* Before calling InsertNode the node x should have its key set */

/***********************************************************************/
/* FUNCTION: InsertNode */
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/line.h
Expand Up @@ -342,7 +342,7 @@ class Line
* This operation is useful in reducing intersection problems to root-finding problems.
* There are many affines which do this transformation. This function returns one that
* preserves angles, areas and distances - a rotation combined with a translation, and
* additionaly moves the initial point of the line to (0,0). This way it works without
* additionally moves the initial point of the line to (0,0). This way it works without
* problems even for lines perpendicular to the target, though may in some cases have
* lower precision than e.g. a shear transform.
* @param d Which coordinate of points on the line should be zero after the transformation */
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/orphan-code/intersection-by-bezier-clipping.cpp
Expand Up @@ -369,7 +369,7 @@ const Interval H2_INTERVAL(0.5 + MAX_PRECISION, 1.0);
* in case the clipping doesn't shrink the initial interval more than 20%,
* a subdivision step is performed.
* If during the computation one of the two curve interval length becomes less
* than MAX_PRECISION the routine exits indipendently by the precision reached
* than MAX_PRECISION the routine exits independently by the precision reached
* in the computation of the other curve interval.
*/
void intersection (std::vector<Interval>& domsA,
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/orphan-code/intersection-by-smashing.cpp
Expand Up @@ -248,7 +248,7 @@ std::vector<SmashIntersection> monotonic_smash_intersect( D2<SBasis> const &a, D
* it would give points in the 2*tol neighborhood of bb (if the slope of aa is never more than 1).
* + faster computation.
* - implies little jumps depending on the subdivision of the input curve into monotonic pieces
* and on the choice of prefered axis. If noticable, these jumps would feel random to the user :-(
* and on the choice of preferred axis. If noticeable, these jumps would feel random to the user :-(
*/
for (unsigned j=0; j<tbs.size(); j++){
result[j].times[Y] = tbs[j];
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/orphan-code/linear-of.h
Expand Up @@ -237,7 +237,7 @@ inline LinearOf<T> operator/=(LinearOf<T> & a, double b) {
return a;
}
/*
//We can in fact rescale in coeff ring T... (but not devide!)
//We can in fact rescale in coeff ring T... (but not divide!)
template <typename T>
inline LinearOf<T> operator*(LinearOf<T> const & a, T b) {
return LinearOf<T>(a[0]*b, a[1]*b);
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/orphan-code/nearestpoint.cpp
Expand Up @@ -249,7 +249,7 @@ static int ControlPolygonFlatEnough(
double a, b, c; /* Coefficients of implicit */
/* eqn for line from V[0]-V[deg]*/

/* Find the perpendicular distance */
/* Find the perpendicular distance */
/* from each interior control point to */
/* line connecting V[0] and V[degree] */
distance = (double *)malloc((unsigned)(degree + 1) * sizeof(double));
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/orphan-code/redblack-toy.cpp
Expand Up @@ -61,7 +61,7 @@ class RedBlackToy: public Toy

Rect rect_chosen; // the rectangle of the search area
Rect dummy_draw; // the "helper" rectangle that is shown during the click and drag (before the mouse release)
int mode; // insert/alter, search, delete modes
int mode; // insert/alter, search, delete modes

// printing of the tree
int help_counter; // the "x" of the label of each node
Expand Down
16 changes: 8 additions & 8 deletions src/2geom/orphan-code/rtree.cpp
Expand Up @@ -287,7 +287,7 @@ double RTree::find_enlargement( const Rect &a, const Rect &b ) const{
return b.area() - a.area();
}

// a partialy cover b
// a partially cover b
_RTREE_PRINT(" find_enlargement (intersect: a partial cover b): " << union_rect.area() - a.area() - b.area() - a_intersection_b->area() );
return union_rect.area()
- ( a.area() - a_intersection_b->area() )
Expand Down Expand Up @@ -322,7 +322,7 @@ QS2) check if done:
QS3) select entry and assign:
Inkvoke pick_next() to choose the next entry to assign.
*[in pick_next] Add it to the group whose covering rectangle will have to be enlrarged least to
accomodate it. Resolve ties by adding the entry to the group with the smaller are, then to the
accommodate it. Resolve ties by adding the entry to the group with the smaller are, then to the
one with fewer entries, then to either of the two.
goto 2.
*/
Expand Down Expand Up @@ -471,7 +471,7 @@ std::pair<RTreeNode*, RTreeNode*> RTree::quadratic_split( RTreeNode *s ) {

/*
PS1) caclulate ineffeciency of grouping entries together:
Foreach pair of entries E1 (i), E2 (j) compose rectangle J (i_union_j) inlcuding E1, E2.
Foreach pair of entries E1 (i), E2 (j) compose rectangle J (i_union_j) including E1, E2.
Calculate d = area(i_union_j) - area(i) - area(j)
PS2) choose the most wastefull pair:
Choose pair with largest d
Expand Down Expand Up @@ -545,9 +545,9 @@ double RTree::find_waste_area( const Rect &a, const Rect &b ) const{
select one remaining entry for classification in a group
PN1) Determine cost of putting each entry in each group:
Foreach entry E not yet in a group, calulate
d1= area increase required in the cover rect of Group 1 to inlcude E
d2= area increase required in the cover rect of Group 2 to inlcude E
Foreach entry E not yet in a group, calculate
d1= area increase required in the cover rect of Group 1 to include E
d2= area increase required in the cover rect of Group 2 to include E
PN2) Find entry with greatest preference for each group:
Choose any entry with the maximum difference between d1 and d2
Expand Down Expand Up @@ -963,7 +963,7 @@ void RTree::sanity_check(RTreeNode* subtree_root, int depth, bool used_during_in
===============================================================================
Given an RTree whose root node is T find all index records whose rects overlap search rect S
S1) Search subtrees:
IF T isnt a leaf, check every entry E to determine whether E I overlaps S
IF T isn't a leaf, check every entry E to determine whether E I overlaps S
FOR all overlapping entries invoke Search on the tree whose root node is pointed by E P
S2) ELSE T is leaf
check all entries E to determine whether E I overlaps S
Expand Down Expand Up @@ -1324,7 +1324,7 @@ int RTree::remove_record_from_parent( RTreeNode* parent, RTreeNode* child ) {
if( it->data == child ){
// delete element: implement step D2)
parent->children_nodes.erase( it );
return 0; // sucess
return 0; // success
}
}
return 1; // failure
Expand Down
2 changes: 1 addition & 1 deletion src/2geom/orphan-code/rtree.h
Expand Up @@ -127,7 +127,7 @@ R-Tree has 2 kinds of nodes
This causes some code duplication in rtree.cpp. There are 2 cases:
- we care whether we touch a leaf/non-leaf node, since we write data in the node, so we want to
write the correct thing (int or RTreeNode*)
- we do NOT care whether we touch a leaf/non-leaf node, because we only read/write the bounding
- we do NOT care whether we touch a leaf/non-leaf node, because we only read/write the bounding
boxes which is the same in both cases.
TODO:
Expand Down
6 changes: 3 additions & 3 deletions src/2geom/orphan-code/sbasisN.h
Expand Up @@ -13,7 +13,7 @@
*
* Caution: degrees are expressed as degrees of s=t*(1-t). The real degree
* (with respect to t) of the polynomial is twice that + 0 or 1 depending
* wether the relevant LinearN<n> coeff is constant or not.
* whether the relevant LinearN<n> coeff is constant or not.
*//*
*
* Authors:
Expand Down Expand Up @@ -367,7 +367,7 @@ class SBasisN : public std::vector<LinearN<n> >{
/**
* Resize an SBasisN<n> to match new sizes.
*
* Caution: if a new size is smaller, the coresponding coefficients are discarded.
* Caution: if a new size is smaller, the corresponding coefficients are discarded.
*/
void multi_resize(unsigned new_sizes[], LinearN<n> def_value = LinearN<n>(0.)){
SBasisN<n> result;
Expand Down Expand Up @@ -530,7 +530,7 @@ class SBasisN : public std::vector<LinearN<n> >{

/**
* \brief Internal recursive function.
* Replace each variable by it's value in the 's=t*(1-t)' factor
* Replace each variable by it's value in the 's=t*(1-t)' factor
* but not in the LinearN<n> coeffs. Then sum up all coefficients.
* \param t[n]: values of the variables.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/2geom/piecewise.h
Expand Up @@ -235,7 +235,7 @@ class Piecewise {
cuts[size()] = dom.max();
}

//Concatenates this Piecewise function with another, offseting time of the other to match the end.
//Concatenates this Piecewise function with another, offsetting time of the other to match the end.
inline void concat(const Piecewise<T> &other) {
if(other.empty()) return;

Expand Down Expand Up @@ -738,7 +738,7 @@ inline Piecewise<T>& operator*=(Piecewise<T> &a, Piecewise<T> const &b) {

Piecewise<SBasis> divide(Piecewise<SBasis> const &a, Piecewise<SBasis> const &b, unsigned k);
//TODO: replace divide(a,b,k) by divide(a,b,tol,k)?
//TODO: atm, relative error is ~(tol/a)%. Find a way to make it independant of a.
//TODO: atm, relative error is ~(tol/a)%. Find a way to make it independent of a.
//Nota: the result is 'truncated' where b is smaller than 'zero': ~ a/max(b,zero).
Piecewise<SBasis>
divide(Piecewise<SBasis> const &a, Piecewise<SBasis> const &b, double tol, unsigned k, double zero=1.e-3);
Expand Down
4 changes: 2 additions & 2 deletions src/2geom/sbasis-geometric.cpp
Expand Up @@ -615,14 +615,14 @@ solve_lambda0(double a0,double a1,double c0,double c1,
* or
* value, speed, and cross(acceleration,speed)
* of the original curve at the both ends.
* (the second is often technically usefull, as it avoids unnecessary division by |v|^2)
* (the second is often technically useful, as it avoids unnecessary division by |v|^2)
* Recall that K=1/R=cross(acceleration,speed)/|speed|^3.
*
* Moreover, a 7-th argument 'insist_on_speed_signs' can be supplied to select solutions:
* If insist_on_speed_signs == 1, only consider solutions where speeds at both ends are positively
* proportional to the given ones.
* If insist_on_speed_signs == 0, allow speeds to point in the opposite direction (both at the same time)
* If insist_on_speed_signs == -1, allow speeds to point in both direction independantly.
* If insist_on_speed_signs == -1, allow speeds to point in both direction independently.
*
* \relates D2
*/
Expand Down
6 changes: 3 additions & 3 deletions src/2geom/sbasis-roots.cpp
Expand Up @@ -46,11 +46,11 @@
* the gsl poly roots finder is faster than bernstein too, but we don't use it for 3 reasons:
a) it requires convertion to poly, which is numerically unstable
a) it requires conversion to poly, which is numerically unstable
b) it requires gsl (which is currently not a dependency, and would bring in a whole slew of unrelated stuff)
c) it finds all roots, even complex ones. We don't want to accidently treat a nearly real root as a real root
c) it finds all roots, even complex ones. We don't want to accidentally treat a nearly real root as a real root
From memory gsl poly roots was about 10 times faster than bernstein in the case where all the roots
are in [0,1] for polys of order 5. I spent some time working out whether eigenvalue root finding
Expand Down Expand Up @@ -231,7 +231,7 @@ static void multi_roots_internal(SBasis const &f,
}
return;
}
////usefull?
////useful?
// if (f.size()==1){
// int idxa=upper_level(levels,fa);
// int idxb=upper_level(levels,fb);
Expand Down

0 comments on commit cf4bfc2

Please sign in to comment.