Make isBetweenPoints-check include the begin and end points.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1483 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
aca761b6d6
commit
9f390fe59c
|
@ -1,5 +1,7 @@
|
|||
Changes in version 1.5 (... 2008)
|
||||
|
||||
- isBetweenPoints return true now even for the begin and end points, i.e. line segments are now including their start and end.
|
||||
|
||||
- Fix XML reader creation for non-existing files and invalid callbacks.
|
||||
|
||||
- Avoid loading textures which are not used by the mesh in b3d loader.
|
||||
|
|
|
@ -218,8 +218,8 @@ public:
|
|||
bool isBetweenPoints(const vector2d<T>& begin, const vector2d<T>& end) const
|
||||
{
|
||||
const T f = (end - begin).getLengthSQ();
|
||||
return getDistanceFromSQ(begin) < f &&
|
||||
getDistanceFromSQ(end) < f;
|
||||
return getDistanceFromSQ(begin) <= f &&
|
||||
getDistanceFromSQ(end) <= f;
|
||||
}
|
||||
|
||||
//! Get the interpolated vector
|
||||
|
|
|
@ -117,8 +117,8 @@ namespace core
|
|||
bool isBetweenPoints(const vector3d<T>& begin, const vector3d<T>& end) const
|
||||
{
|
||||
const T f = (end - begin).getLengthSQ();
|
||||
return getDistanceFromSQ(begin) < f &&
|
||||
getDistanceFromSQ(end) < f;
|
||||
return getDistanceFromSQ(begin) <= f &&
|
||||
getDistanceFromSQ(end) <= f;
|
||||
}
|
||||
|
||||
//! Normalizes the vector.
|
||||
|
|
Loading…
Reference in New Issue