region: remove scale operation
it's not immediately apparent how scale operates on both of point and extent components. rather than complicate matters we remove them in preference of letting the user construct it directly.
This commit is contained in:
parent
9abfef2769
commit
ec0cb7d2c1
11
region.cpp
11
region.cpp
@ -98,17 +98,6 @@ util::region<S,T>::magnitude (extent_t _e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
template <size_t S, typename T>
|
|
||||||
void
|
|
||||||
util::region<S,T>::scale (T factor)
|
|
||||||
{
|
|
||||||
auto o = (e * factor - e) / T(2);
|
|
||||||
p -= o;
|
|
||||||
e *= factor;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
bool
|
bool
|
||||||
|
@ -59,8 +59,6 @@ namespace util {
|
|||||||
extent_t magnitude (void) const;
|
extent_t magnitude (void) const;
|
||||||
extent_t magnitude (extent_t);
|
extent_t magnitude (extent_t);
|
||||||
|
|
||||||
void scale (T factor);
|
|
||||||
|
|
||||||
bool empty (void) const;
|
bool empty (void) const;
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user