calc_theta: Calculate Sample-to-sample Angle

Description Usage Arguments Value

View source: R/preprocessing_helper_functions.R

Description

Calculates the relative angle between subsequent gaze samples. Uses the backward difference to compute the absolute angle between two samples and the forward difference for the change in angle at each sample.

Usage

1
calc_theta(x, y)

Arguments

x

Numeric vector of x coordinates for each gaze sample.

y

Numeric vector of y coordinates for each gaze sample.

Value

A vector containing the sample-to-sample angle (in radians) for each gaze sample.


maltelueken/gazeHMM documentation built on Oct. 6, 2020, 11:10 a.m.