Skip to main content

TensorMath.maxDistanceBetweenPoints

Function

From the input points, finds the two points with the maximum distance between them and returns this distance.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

maxDistanceBetweenPoints(points, pointsShape): number

From the input points, finds the two points with the maximum distance between them and returns this distance. Works with points of any dimension count.

points - Float32Array of size (point dimension count * point count). Points to find the max distance between.

pointsShape - Should be {point dimension count, point count, 1}

Parameters

ParameterType
pointsFloat32Array
pointsShapevec3

Returns

number