Home /Examples/lib/examples/autocad/CLASSIC-geometry-primitives.sleela

CLASSIC-geometry-primitives.sleela

lib/examples/autocad/CLASSIC-geometry-primitives.sleela · 12 line(s) · sleela

#sleela 1.7
// Teaching example: geometry calculations only; this does not call AutoCAD APIs.
class ClassicGeometryPrimitives {
    void main() {
        double width = 120.0;
        double height = 45.0;
        print("rectangle area = " + (width * height));
        print("rectangle perimeter = " + (2.0 * (width + height)));
        print("CAD integration: map these values to the selected drawing API.");
    }
}