STYLE: Nightly Version update
[cmake.git] / Tests / SwigTest / example.cxx
blob1e8e203dddcddb91ace687fd7e15a25a1f21cd86
1 /* File : example.c */
3 #include "example.h"
4 #define M_PI 3.14159265358979323846
6 /* Move the shape to a new location */
7 void Shape::move(double dx, double dy) {
8 x += dx;
9 y += dy;
12 int Shape::nshapes = 0;
14 double Circle::area(void) {
15 return M_PI*radius*radius;
18 double Circle::perimeter(void) {
19 return 2*M_PI*radius;
22 double Square::area(void) {
23 return width*width;
26 double Square::perimeter(void) {
27 return 4*width;