Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -27,55 +27,51 @@
namespace units {
class Pressure {
public:
constexpr Pressure(
) : kpa_ { 0 }
{
}
public:
constexpr Pressure()
: kpa_{0} {
}
constexpr Pressure(
const int kilopascal
) : kpa_ { static_cast<int16_t>(kilopascal) }
{
}
constexpr Pressure(
const int kilopascal)
: kpa_{static_cast<int16_t>(kilopascal)} {
}
int kilopascal() const {
return kpa_;
}
int kilopascal() const {
return kpa_;
}
int psi() const {
return kpa_ * 1000 / 6895;
}
int psi() const {
return kpa_ * 1000 / 6895;
}
private:
int16_t kpa_;
private:
int16_t kpa_;
};
class Temperature {
public:
constexpr Temperature(
) : c_ { 0 }
{
}
public:
constexpr Temperature()
: c_{0} {
}
constexpr Temperature(
const int celsius
) : c_ { static_cast<int16_t>(celsius) }
{
}
constexpr Temperature(
const int celsius)
: c_{static_cast<int16_t>(celsius)} {
}
int celsius() const {
return c_;
}
int celsius() const {
return c_;
}
int fahrenheit() const {
return (c_ * 9 / 5) + 32;
}
int fahrenheit() const {
return (c_ * 9 / 5) + 32;
}
private:
int16_t c_;
private:
int16_t c_;
};
} /* namespace units */
#endif/*__UNITS_H__*/
#endif /*__UNITS_H__*/