Loading TOC...

MarkLogic 12 EA 1 Product Documentation
vec.magnitude

vec.magnitude(
   vector1 as vec.vector
) as Number

Summary

Returns the magnitude of the vector.

Parameters
vector1 The vector to find the magnitude of.

Example

  const vec1 = vec.vector([3.14,1.59,2.65])
  vec.magnitude(vec1)

  => 4.40570116043091

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.