Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
5914502b
Commit
5914502b
authored
Dec 12, 2018
by
Sullivan, Brendan T
Browse files
Re #24314 clang format
parent
8bc1ae7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Framework/DataObjects/src/Peak.cpp
View file @
5914502b
...
...
@@ -812,28 +812,25 @@ void Peak::setHKL(const Mantid::Kernel::V3D &HKL) {
}
/** Set sample position
*
* @ doubles x,y,z-> samplePos(x), samplePos(y), samplePos(z)
*/
*
* @ doubles x,y,z-> samplePos(x), samplePos(y), samplePos(z)
*/
void
Peak
::
setSamplePos
(
double
samX
,
double
samY
,
double
samZ
)
{
this
->
samplePos
[
0
]
=
samX
;
this
->
samplePos
[
1
]
=
samY
;
this
->
samplePos
[
2
]
=
samZ
;
}
/** Set sample position
*
* @param XYZ :: vector x,y,z-> samplePos(x), samplePos(y), samplePos(z)
*/
void
Peak
::
setSamplePos
(
const
Mantid
::
Kernel
::
V3D
&
XYZ
)
{
*
* @param XYZ :: vector x,y,z-> samplePos(x), samplePos(y), samplePos(z)
*/
void
Peak
::
setSamplePos
(
const
Mantid
::
Kernel
::
V3D
&
XYZ
)
{
this
->
samplePos
[
0
]
=
XYZ
[
0
];
this
->
samplePos
[
1
]
=
XYZ
[
1
];
this
->
samplePos
[
2
]
=
XYZ
[
2
];
}
//----------------------------------------------------------------------------------------------
/** Return the # of counts in the bin at its peak*/
...
...
Framework/DataObjects/test/PeakTest.h
View file @
5914502b
...
...
@@ -238,9 +238,9 @@ public:
void
test_samplePos
()
{
Peak
p
(
inst
,
10000
,
2.0
);
p
.
setSamplePos
(
1.0
,
1.0
,
1.0
);
p
.
setSamplePos
(
1.0
,
1.0
,
1.0
);
TS_ASSERT_EQUALS
(
p
.
getSamplePos
(),
V3D
(
1.0
,
1.0
,
1.0
));
p
.
setSamplePos
(
V3D
(
2.0
,
2.0
,
2.0
));
p
.
setSamplePos
(
V3D
(
2.0
,
2.0
,
2.0
));
TS_ASSERT_EQUALS
(
p
.
getSamplePos
(),
V3D
(
2.0
,
2.0
,
2.0
));
}
...
...
Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp
View file @
5914502b
...
...
@@ -92,9 +92,11 @@ void export_IPeak() {
.
def
(
"setHKL"
,
(
void
(
IPeak
::*
)(
double
,
double
,
double
))
&
IPeak
::
setHKL
,
(
arg
(
"self"
),
arg
(
"h"
),
arg
(
"k"
),
arg
(
"l"
)),
"Set the HKL values of this peak"
)
.
def
(
"setSamplePos"
,
(
void
(
IPeak
::*
)(
double
,
double
,
double
))
&
IPeak
::
setSamplePos
,
.
def
(
"setSamplePos"
,
(
void
(
IPeak
::*
)(
double
,
double
,
double
))
&
IPeak
::
setSamplePos
,
(
arg
(
"self"
),
arg
(
"samX"
),
arg
(
"samY"
),
arg
(
"samZ"
)),
"Set the samplePos value of this peak. It does not set the instrument sample position."
)
"Set the samplePos value of this peak. It does not set the "
"instrument sample position."
)
.
def
(
"setH"
,
&
IPeak
::
setH
,
(
arg
(
"self"
),
arg
(
"h"
)),
"Get the H index of the peak"
)
.
def
(
"setK"
,
&
IPeak
::
setK
,
(
arg
(
"self"
),
arg
(
"k"
)),
...
...
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