calc_dist_to_centre: Calculate euclidean distance between two points.

View source: R/cluster_events.R

calc_dist_to_centreR Documentation

Calculate euclidean distance between two points.

Description

Calculate euclidean distance between two points.

Usage

calc_dist_to_centre(.x, .c)

Arguments

.x

A numerical vector with coordinates to a point.

.c

A numerical vector with the coordinates to the center.

Value

A numerical vector with the euclidean distance between the two points.

Note

This function does mot make use of the base function dist, as that dist-function is about twice as slow as the implementation here.

Examples

beadplexr:::calc_dist_to_centre(.x = c(10, 15), .c = c(1, 2))


beadplexr documentation built on July 9, 2023, 5:59 p.m.