MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / roundTo

Function roundTo

src/components/CropPlanningSection.tsx:1070–1073  ·  view source on GitHub ↗
(value: number, digits = 1)

Source from the content-addressed store, hash-verified

1068function clamp(value: number, min: number, max: number) {
1069 return Math.min(max, Math.max(min, value));
1070}
1071
1072function roundTo(value: number, digits = 1) {
1073 const factor = 10 ** digits;
1074 return Math.round(value * factor) / factor;
1075}
1076

Callers 4

formatYieldFunction · 0.85
getZoneReasonFunction · 0.85
buildLocalCropPlanFunction · 0.85
getZonePlacementMetricsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected