15 Point2_<T>::Point2_(T x, T y)
21 Point2_<T>::Point2_(
const Point2_<T>& p)
27 Point2_<T>& Point2_<T>::operator=(
const Point2_<T>& p) {
34 Point2_<T> Point2_<T>::operator-()
const {
39 Point2_<T>& Point2_<T>::operator+=(
const Point2_<T>& p) {
46 Point2_<T>& Point2_<T>::operator-=(
const Point2_<T>& p) {
53 T Point2_<T>::operator[](
int i)
const {
54 Assertion(i >= 0 && i <= 1,
"Index out of bounds!!");
63 Point2_<T>& Point2_<T>::operator*=(T s) {
70 std::string Point2_<T>::toString()
const {
73 ss << std::setprecision(8);
74 ss <<
"(" << x_ <<
", " << y_ <<
")";
75 return std::move(ss.str());
81 std::ostream& operator<<(std::ostream& os, const spica::Point2_<T>& p) {