Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
David Cazier
CGoGN
Commits
46bdf277
Commit
46bdf277
authored
May 30, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
operator!= on vectors
parent
49e1fa24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
include/Geometry/vector_gen.h
include/Geometry/vector_gen.h
+3
-0
include/Geometry/vector_gen.hpp
include/Geometry/vector_gen.hpp
+9
-2
No files found.
include/Geometry/vector_gen.h
View file @
46bdf277
...
...
@@ -132,6 +132,9 @@ public:
// Equal
bool
operator
==
(
const
Vector
<
DIM
,
T
>&
v
)
const
;
// Different
bool
operator
!=
(
const
Vector
<
DIM
,
T
>&
v
)
const
;
bool
hasNan
()
const
;
/**********************************************/
...
...
include/Geometry/vector_gen.hpp
View file @
46bdf277
...
...
@@ -277,6 +277,15 @@ inline bool Vector<DIM,T>::operator==(const Vector<DIM,T>& v) const
return
true
;
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
bool
Vector
<
DIM
,
T
>::
operator
!=
(
const
Vector
<
DIM
,
T
>&
v
)
const
{
for
(
unsigned
int
i
=
0
;
i
<
DIM
;
++
i
)
if
(
v
[
i
]
!=
m_data
[
i
])
return
true
;
return
false
;
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
bool
Vector
<
DIM
,
T
>::
hasNan
()
const
{
...
...
@@ -314,7 +323,6 @@ inline Vector<DIM,T> operator*(T a, const Vector<DIM,T>& v)
return
v
*
a
;
}
template
<
unsigned
int
DIM
,
typename
T
>
inline
Vector
<
DIM
,
T
>
operator
/
(
T
a
,
const
Vector
<
DIM
,
T
>&
v
)
{
...
...
@@ -346,7 +354,6 @@ inline Vector<DIM,T> slerp(const Vector<DIM,T> &v1, const Vector<DIM,T> &v2, con
return
res
;
}
}
// namespace Geom
}
// namespace CGoGN
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment