interpolateTimes: Interpolate a vector of times

View source: R/quaternions_splines_shared.R

interpolateTimesR Documentation

Interpolate a vector of times

Description

Linearly interpolate an increasing vector of times. This is useful to deal with the quaternions splines.

Usage

interpolateTimes(times, n, last = TRUE)

Arguments

times

increasing vector of times

n

integer, controls the number of interpolations: there will be n-1 time values between two consecutive original times

last

Boolean, whether to include or exclude the last element

Value

A vector, a refinement of the times vector.

Examples

library(qsplines)
interpolateTimes(1:4, n = 3)
interpolateTimes(c(1, 2, 4), n = 3)

qsplines documentation built on March 7, 2023, 7:41 p.m.