vcsl_angle_unit.cxx
Go to the documentation of this file.
1 // This is core/vcsl/vcsl_angle_unit.cxx
2 #include "vcsl_angle_unit.h"
3 #include <vcsl/vcsl_radian.h>
4 
5 //---------------------------------------------------------------------------
6 // Are `this' and `other' compatible units ? (Are they associated to the
7 // same dimension ?)
8 //---------------------------------------------------------------------------
10 {
11  return other->cast_to_angle_unit()!=nullptr;
12 }
13 
14 //---------------------------------------------------------------------------
15 // Return the standard unit associated to the dimension of `this'
16 //---------------------------------------------------------------------------
18 {
19  return vcsl_radian::instance().ptr();
20 }
Standard unit associated to the angle dimension.
vcsl_unit_sptr standard_unit() const override
Return the standard unit associated to the dimension of ‘this’.
static vcsl_radian_sptr instance()
Return the reference to the unique vcsl_radian object.
Definition: vcsl_radian.cxx:7
bool compatible_units(vcsl_unit_sptr const &other) const override
Are ‘this’ and ‘other’ compatible units ?.
Abstract unit associated to the angle dimension.
T * ptr() const