bernedom / SI

A header only C++ library that provides type safety and user defined literals for physical units
https://si.dominikberner.ch/doc/
MIT License
488 stars 40 forks source link

Add a=v^2/s derived type #50

Closed bladan closed 4 years ago

bladan commented 4 years ago

Acceleration derived from squared speed divided by length could be added as often used to calculate braking distances.

include/SI/acceleration.h: BUILD_UNIT_FROM_DIVISON(acceleration_t, velocity_squared_t, length_t)

include/SI/velocity.h:

template <typename _type, typename _ratio>
using velocity_squared_t = detail::unit_t<'v', 2, _type, _ratio>;