dot-Distance: Calculate Distance from a Point to a Plane

.DistanceR Documentation

Calculate Distance from a Point to a Plane

Description

This function is used to calculate the distance from a point to a plane. It could also be used in high dimension spaces. The formula comes from https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_plane For two dimension point, the distance to the line w1\*x+w2\*y+b = 0 For three dimension point, the distance to the plan w1\*x+w2\*y+w3\*z+b = 0

Usage

.Distance(w, b, point)

Arguments

w

A numeric vector. It contains the parameters for all the coordinates in the spaces to define the "plan".

b

A numeric value. It is the constant values in the formula which defines the "plane".

point

A numeric vector. It contains the coordinates in the spaces to define the "point".

Value

A numeric value. It is the distance from point defined by x0 to the "plane" defined by w and b

Author(s)


shuyuzheng/synergyfinder documentation built on Feb. 20, 2023, 11:33 p.m.