99 * License, v. 2.0. If a copy of the MPL was not distributed with this
1010 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
1111 */
12- // ----------------------------------------------------------------------------
13-
1412#pragma once
1513#include " vector1.hpp"
1614
3028modm::Vector<T, 1 >::set(const T& value)
3129{ this ->x = value; }
3230
33- // ----------------------------------------------------------------------------
3431template <typename T>
3532void
3633modm::Vector<T, 1 >::setX(const T& value)
3734{ this ->x = value; }
3835
39- // ----------------------------------------------------------------------------
4036template <typename T>
4137const T&
4238modm::Vector<T, 1 >::getX() const
43- {
44- return this ->x ;
45- }
39+ { return this ->x ; }
4640
4741// ----------------------------------------------------------------------------
4842template <typename T>
@@ -61,39 +55,34 @@ modm::Vector<T, 1>::operator == (const modm::Vector<T, 1> &rhs) const
6155 return (rhs.x == x);
6256}
6357
64- // ----------------------------------------------------------------------------
6558template <typename T>
6659bool
6760modm::Vector<T, 1 >::operator != (const modm::Vector<T, 1 > &rhs) const
6861{
6962 return (rhs.x != x);
7063}
7164
72- // ----------------------------------------------------------------------------
7365template <typename T>
7466bool
7567modm::Vector<T, 1 >::operator < (const modm::Vector<T, 1 > &rhs) const
7668{
7769 return (x < rhs.x );
7870}
7971
80- // ----------------------------------------------------------------------------
8172template <typename T>
8273bool
8374modm::Vector<T, 1 >::operator <= (const modm::Vector<T, 1 > &rhs) const
8475{
8576 return (x <= rhs.x );
8677}
8778
88- // ----------------------------------------------------------------------------
8979template <typename T>
9080bool
9181modm::Vector<T, 1 >::operator > (const modm::Vector<T, 1 > &rhs) const
9282{
9383 return (x > rhs.x );
9484}
9585
96- // ----------------------------------------------------------------------------
9786template <typename T>
9887bool
9988modm::Vector<T, 1 >::operator >= (const modm::Vector<T, 1 > &rhs) const
@@ -139,31 +128,27 @@ modm::Vector<T, 1>::operator + (const modm::Vector<T, 1> &rhs) const
139128 return modm::Vector<T, 1 >(x+rhs.x );
140129}
141130
142- // ----------------------------------------------------------------------------
143131template <typename T>
144132modm::Vector<T, 1 >
145133modm::Vector<T, 1 >::operator - (const modm::Vector<T, 1 > &rhs) const
146134{
147135 return modm::Vector<T, 1 >(x-rhs.x );
148136}
149137
150- // ----------------------------------------------------------------------------
151138template <typename T>
152139T
153140modm::Vector<T, 1 >::operator * (const modm::Vector<T, 1 > &rhs) const
154141{
155142 return x*rhs.x ;
156143}
157144
158- // ----------------------------------------------------------------------------
159145template <typename T>
160146modm::Vector<T, 1 >
161147modm::Vector<T, 1 >::operator * (const T &rhs) const
162148{
163149 return modm::Vector<T, 1 >(x*rhs);
164150}
165151
166- // ----------------------------------------------------------------------------
167152template <typename T>
168153modm::Vector<T, 1 >
169154modm::Vector<T, 1 >::operator / (const T &rhs) const
@@ -180,7 +165,6 @@ modm::Vector<T, 1>::operator += (const modm::Vector<T, 1> &rhs)
180165 return *this ;
181166}
182167
183- // ----------------------------------------------------------------------------
184168template <typename T>
185169modm::Vector<T, 1 >&
186170modm::Vector<T, 1 >::operator -= (const modm::Vector<T, 1 > &rhs)
@@ -189,7 +173,6 @@ modm::Vector<T, 1>::operator -= (const modm::Vector<T, 1> &rhs)
189173 return *this ;
190174}
191175
192- // ----------------------------------------------------------------------------
193176template <typename T>
194177modm::Vector<T, 1 >&
195178modm::Vector<T, 1 >::operator *= (const T &rhs)
@@ -198,7 +181,6 @@ modm::Vector<T, 1>::operator *= (const T &rhs)
198181 return *this ;
199182}
200183
201- // ----------------------------------------------------------------------------
202184template <typename T>
203185modm::Vector<T, 1 >&
204186modm::Vector<T, 1 >::operator /= (const T &rhs)
@@ -223,7 +205,6 @@ modm::Vector<T, 1>::getLength() const
223205 return std::abs (x);
224206}
225207
226- // ----------------------------------------------------------------------------
227208template <typename T>
228209T
229210modm::Vector<T, 1 >::getLengthSquared() const
@@ -239,7 +220,6 @@ modm::Vector<T, 1>::asMatrix()
239220 return *(modm::Matrix<T, 1 , 1 >*) this ;
240221}
241222
242- // ----------------------------------------------------------------------------
243223template <typename T>
244224const modm::Matrix<T, 1 , 1 >&
245225modm::Vector<T, 1 >::asMatrix() const
@@ -255,7 +235,6 @@ modm::Vector<T, 1>::hasNan() const
255235 return std::isnan (x);
256236}
257237
258- // ----------------------------------------------------------------------------
259238template <typename T>
260239bool
261240modm::Vector<T, 1 >::hasInf() const
0 commit comments