Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
15a2db5e
"libraries/sfmt/vscode:/vscode.git/clone" did not exist on "813275a0827fad4b75de484aa908f18dd3e94dfd"
Commit
15a2db5e
authored
Jun 26, 2010
by
Christopher Bruns
Browse files
Actually return values from Vec3::operator+=, -=, and *=, like they claim to.
parent
802be281
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
openmmapi/include/openmm/Vec3.h
openmmapi/include/openmm/Vec3.h
+6
-3
No files found.
openmmapi/include/openmm/Vec3.h
View file @
15a2db5e
...
...
@@ -80,10 +80,11 @@ public:
return
Vec3
(
lhs
[
0
]
+
rhs
[
0
],
lhs
[
1
]
+
rhs
[
1
],
lhs
[
2
]
+
rhs
[
2
]);
}
Vec3
operator
+=
(
const
Vec3
&
rhs
)
{
Vec3
&
operator
+=
(
const
Vec3
&
rhs
)
{
data
[
0
]
+=
rhs
[
0
];
data
[
1
]
+=
rhs
[
1
];
data
[
2
]
+=
rhs
[
2
];
return
*
this
;
}
// unary minus
...
...
@@ -98,10 +99,11 @@ public:
return
Vec3
(
lhs
[
0
]
-
rhs
[
0
],
lhs
[
1
]
-
rhs
[
1
],
lhs
[
2
]
-
rhs
[
2
]);
}
Vec3
operator
-=
(
const
Vec3
&
rhs
)
{
Vec3
&
operator
-=
(
const
Vec3
&
rhs
)
{
data
[
0
]
-=
rhs
[
0
];
data
[
1
]
-=
rhs
[
1
];
data
[
2
]
-=
rhs
[
2
];
return
*
this
;
}
// scalar product
...
...
@@ -110,10 +112,11 @@ public:
return
Vec3
(
lhs
[
0
]
*
rhs
,
lhs
[
1
]
*
rhs
,
lhs
[
2
]
*
rhs
);
}
Vec3
operator
*=
(
double
rhs
)
{
Vec3
&
operator
*=
(
double
rhs
)
{
data
[
0
]
*=
rhs
;
data
[
1
]
*=
rhs
;
data
[
2
]
*=
rhs
;
return
*
this
;
}
// dot product
...
...
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