extent: fix double negative for contraction
This commit is contained in:
parent
a83aa188e4
commit
b58dd7a880
@ -99,7 +99,7 @@ template <size_t S, typename T>
|
||||
extent<S,T>
|
||||
extent<S,T>::contracted (T t) const
|
||||
{
|
||||
return *this - vector<S,T> {-t};
|
||||
return *this - vector<S,T> {t};
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,7 +5,12 @@ int
|
||||
main (void)
|
||||
{
|
||||
util::TAP::logger tap;
|
||||
util::extent2f instance;
|
||||
(void) instance;
|
||||
tap.todo ("instancing test");
|
||||
|
||||
{
|
||||
util::extent2u hi { 8, 4 };
|
||||
util::extent2u lo { 6, 2 };
|
||||
tap.expect_eq (lo, hi.contracted (2), "extent scalar contraction by value");
|
||||
}
|
||||
|
||||
return tap.status ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user