MCPcopy Create free account
hub / github.com/blastrain/vitess-sqlparser / RoundFloat

Function RoundFloat

tidbparser/dependency/types/helper.go:28–34  ·  view source on GitHub ↗

RoundFloat rounds float val to the nearest integer value with float64 format, like MySQL Round function. RoundFloat uses default rounding mode, see https://dev.mysql.com/doc/refman/5.7/en/precision-math-rounding.html so rounding use "round half away from zero". e.g, 1.5 -> 2, -1.5 -> -2.

(f float64)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

ConvertFloatToIntFunction · 0.85
ConvertFloatToUintFunction · 0.85
RoundFunction · 0.85
ToBoolMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…