00001 // This is core/vcsl/vcsl_angle.cxx 00002 #include "vcsl_angle.h" 00003 #include <vcsl/vcsl_radian.h> 00004 00005 //--------------------------------------------------------------------------- 00006 // Is `new_unit' a compatible unit for the dimension ? 00007 //--------------------------------------------------------------------------- 00008 bool vcsl_angle::compatible_unit(vcsl_unit_sptr const& new_unit) const 00009 { 00010 return new_unit->cast_to_angle_unit()!=0; 00011 } 00012 00013 vcsl_unit_sptr vcsl_angle::standard_unit() const 00014 { 00015 return vcsl_radian::instance().ptr(); 00016 } 00017 00018 //--------------------------------------------------------------------------- 00019 // Return the reference to the unique vcsl_angle object 00020 //--------------------------------------------------------------------------- 00021 vcsl_angle_sptr vcsl_angle::instance() 00022 { 00023 static vcsl_angle_sptr instance_=new vcsl_angle; 00024 return instance_; 00025 }