Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
85cf9eff
Commit
85cf9eff
authored
Jan 08, 2018
by
Samuel Jackson
Browse files
Refs #20441 Apply clang format patch
parent
308603cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Framework/DataObjects/src/Peak.cpp
View file @
85cf9eff
...
...
@@ -797,7 +797,7 @@ double Peak::getSigmaIntensity() const { return m_sigmaIntensity; }
/** Return the peak intensity divided by the error in the intensity */
double
Peak
::
getIntensityOverSigma
()
const
{
if
(
m_sigmaIntensity
==
0
)
return
0
;
return
0
;
return
m_intensity
/
m_sigmaIntensity
;
}
...
...
Framework/DataObjects/test/PeakTest.h
View file @
85cf9eff
...
...
@@ -559,21 +559,21 @@ public:
void
test_get_intensity_over_sigma
()
{
const
int
detectorId
=
19999
;
const
double
wavelength
=
2
;
const
double
intensity
{
100
};
const
double
sigma
{
10
};
const
double
intensity
{
100
};
const
double
sigma
{
10
};
Peak
p
(
inst
,
detectorId
,
wavelength
);
p
.
setIntensity
(
intensity
);
p
.
setSigmaIntensity
(
sigma
);
TS_ASSERT_EQUALS
(
p
.
getIntensityOverSigma
(),
intensity
/
sigma
);
TS_ASSERT_EQUALS
(
p
.
getIntensityOverSigma
(),
intensity
/
sigma
);
}
void
test_get_intensity_over_sigma_empty_sigma
()
{
const
int
detectorId
=
19999
;
const
double
wavelength
=
2
;
const
double
intensity
{
0
};
const
double
sigma
{
0
};
const
double
intensity
{
0
};
const
double
sigma
{
0
};
Peak
p
(
inst
,
detectorId
,
wavelength
);
p
.
setIntensity
(
intensity
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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