
vec.trunc( vector as vec.vector, [n as Number?] ) as vec.vector
Returns a new vector which is a copy of the input vector with each element truncated to a specific number of digits.
const vec1 = vec.vector([1.234,2.654]) vec.trunc(vec1, 2) => "[ 1.23, 2.65 ]"
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.