Skip to content

GeometryUtils

katanakit-js / GeometryUtils

const GeometryUtils: {
area: GeometryAreaService;
perimeter: GeometryPerimeterService;
volume: GeometryVolumeService;
};

Defined in: core/services/geometry.service.ts:551

Consolidated pure geometry utilities namespace. Groups area, perimeter and volume calculations (no shared mutable state).

Applies the Facade pattern: exposes the three Singleton services (GeometryAreaService, GeometryPerimeterService, GeometryVolumeService) under area, perimeter and volume.

area: GeometryAreaService;
perimeter: GeometryPerimeterService;
volume: GeometryVolumeService;
import { GeometryUtils } from "katanakit-js";
GeometryUtils.area.useCircle(5); // "78.54"
GeometryUtils.perimeter.useCircle(5); // "31.42"
GeometryUtils.volume.useSphere(3); // "113.10"