round

Rounds the point coordinates to the specified number of fractional digits.

Parameters

digits Number

Number of fractional digits.

Returns

kendo.geometry.Point The current Point instance.

Example

<script>
var geom = kendo.geometry;
var point = new geom.Point(10.12345, 20.67890);

console.log("Before rounding:", point.toString()); // outputs: "10.12345 20.6789"
point.round(2);
console.log("After rounding to 2 digits:", point.toString()); // outputs: "10.12 20.68"
</script>
In this article
round
Not finding the help you need?
Contact Support