distance_2_point: Distance to Point C++

Description Usage Arguments Examples

Description

Takes an x and y screen coordinate and returns the physical distance from the observer to that point on the screen.

Usage

1
2
distance_2_point(x, y, rx, ry, sw, sh, ez, ex = as.numeric(c(0)),
  ey = as.numeric(c(0)))

Arguments

x

the horizontal coordinate of a point on a screen (pixels)

y

the vertical coordinate of a point on a screen (pixels)

rx

the horizontal resolution of the screen (pixels)

ry

the vertical resolution of the screen (pixels)

sw

the physical screen width (mm)

sh

the physical screen height (mm)

ez

the perpendicular distance from the viewer to the screen (mm)

ex

the horizontal offset of the viewer from screen center (mm)

ey

the vertical offset of the viewer from screen center (mm)

Examples

1
distance_2_point(840, 525, 1680, 1050, 473.76, 296.1, 750)

RyanHope/gazetools documentation built on May 9, 2019, 10:38 a.m.