xref: /llvm-project/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Rectangle.cpp (revision 70ec8419dd722abeddf09e11f01500ae62334394)
1*70ec8419SPeterChou1 #include "Rectangle.h"
2*70ec8419SPeterChou1 
Rectangle(double width,double height)3*70ec8419SPeterChou1 Rectangle::Rectangle(double width, double height)
4*70ec8419SPeterChou1         : width_(width), height_(height) {}
5*70ec8419SPeterChou1 
area() const6*70ec8419SPeterChou1 double Rectangle::area() const {
7*70ec8419SPeterChou1     return width_ * height_;
8*70ec8419SPeterChou1 }
9*70ec8419SPeterChou1 
perimeter() const10*70ec8419SPeterChou1 double Rectangle::perimeter() const {
11*70ec8419SPeterChou1     return 2 * (width_ + height_);
12*70ec8419SPeterChou1 }