/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/SiPixelObjects/interface/LinearConversion.h
19 строк
561 B
Cms Build
Clang-Format
11 июн 2019, 11:29
11 июн 2019, 11:29
e9d3fcc
Код
Авторство
О чём код?
#ifndef SiPixelObjects_LinearConversion_H #define SiPixelObjects_LinearConversion_H namespace sipixelobjects { class LinearConversion { public: LinearConversion(int offset = 0, int slope = 1) : theOffset(offset), theSlope(slope) {} int convert(int item) const { return theOffset + theSlope * item; } int inverse(int item) const { return (item - theOffset) / theSlope; } int offset() const { return theOffset; } int slope() const { return theSlope; } private: int theOffset, theSlope; }; } // namespace sipixelobjects #endif