- line2d::getMiddle and line3d::getMiddle work now also with integers. But can be slower in debug and for compilers which are not optimizing division by 2 to multiplication by 0.5 for floats also in release (if that still matters we need a template specialization here).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4070 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
d9f49f04f8
commit
d9a6ac315a
|
@ -1,4 +1,5 @@
|
||||||
Changes in 1.8 (??.??.2011)
|
Changes in 1.8 (??.??.2011)
|
||||||
|
- line2d::getMiddle and line3d::getMiddle work now also with integers. But can be slower for compilers which are not optimizing division by 2 to multiplication by 0.5 for floats.
|
||||||
|
|
||||||
- Add IGUIEnvironment::getHovered to get the element most recently known to be under the mouse cursor
|
- Add IGUIEnvironment::getHovered to get the element most recently known to be under the mouse cursor
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ class line2d
|
||||||
/** \return center of the line. */
|
/** \return center of the line. */
|
||||||
vector2d<T> getMiddle() const
|
vector2d<T> getMiddle() const
|
||||||
{
|
{
|
||||||
return (start + end) * (T)0.5;
|
return (start + end)/(T)2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Get the vector of the line.
|
//! Get the vector of the line.
|
||||||
|
|
|
@ -63,7 +63,7 @@ class line3d
|
||||||
/** \return Center of line. */
|
/** \return Center of line. */
|
||||||
vector3d<T> getMiddle() const
|
vector3d<T> getMiddle() const
|
||||||
{
|
{
|
||||||
return (start + end) * (T)0.5;
|
return (start + end)/(T)2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Get vector of line
|
//! Get vector of line
|
||||||
|
|
Loading…
Reference in New Issue