Skip to content
Snippets Groups Projects
Commit b79afd57 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

clang-format

parent 3f0880b4
No related branches found
No related tags found
1 merge request!913cleanup and simplification in specular scan context
...@@ -16,17 +16,16 @@ ...@@ -16,17 +16,16 @@
#include "Base/Vector/Direction.h" #include "Base/Vector/Direction.h"
#include "Resample/Slice/KzComputation.h" #include "Resample/Slice/KzComputation.h"
SpecularElement SpecularElement::FromQzScan( SpecularElement SpecularElement::FromQzScan(double kz, const PolMatrices& polMatrices,
double kz, const PolMatrices& polMatrices, bool computable) bool computable)
{ {
return SpecularElement(computable, polMatrices, return SpecularElement(computable, polMatrices, [kz](const SliceStack& slices) {
[kz](const SliceStack& slices) { return Compute::Kz::computeKzFromSLDs(slices, kz);
return Compute::Kz::computeKzFromSLDs(slices, kz); });
});
} }
SpecularElement SpecularElement::FromAlphaScan( SpecularElement SpecularElement::FromAlphaScan(double wavelength, double alpha,
double wavelength, double alpha, const PolMatrices& polMatrices, bool computable) const PolMatrices& polMatrices, bool computable)
{ {
return SpecularElement( return SpecularElement(
computable, polMatrices, computable, polMatrices,
......
...@@ -101,9 +101,8 @@ std::vector<SpecularElement> AlphaScan::generateElements() const ...@@ -101,9 +101,8 @@ std::vector<SpecularElement> AlphaScan::generateElements() const
const double inc = incs[i][k]; const double inc = incs[i][k];
for (size_t j = 0, size_wls = wls[i].size(); j < size_wls; ++j) { for (size_t j = 0, size_wls = wls[i].size(); j < size_wls; ++j) {
const double wl = wls[i][j]; const double wl = wls[i][j];
result.emplace_back( result.emplace_back(SpecularElement::FromAlphaScan(
SpecularElement::FromAlphaScan( wl, -inc, polMatrices(), wl >= 0 && inc >= 0 && inc <= M_PI_2));
wl, -inc, polMatrices(), wl >= 0 && inc >= 0 && inc <= M_PI_2));
} }
} }
} }
......
...@@ -66,8 +66,8 @@ std::vector<SpecularElement> QzScan::generateElements() const ...@@ -66,8 +66,8 @@ std::vector<SpecularElement> QzScan::generateElements() const
std::vector<SpecularElement> result; std::vector<SpecularElement> result;
result.reserve(qz.size()); result.reserve(qz.size());
for (size_t i = 0, size = qz.size(); i < size; ++i) for (size_t i = 0, size = qz.size(); i < size; ++i)
result.emplace_back(SpecularElement::FromQzScan( result.emplace_back(
-(qz[i] + m_offset) / 2.0, polMatrices(), qz[i] >= 0)); SpecularElement::FromQzScan(-(qz[i] + m_offset) / 2.0, polMatrices(), qz[i] >= 0));
return result; return result;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment