Translated fix from base MATLAB

This commit is contained in:
Waldir Leoncio 2020-07-14 14:09:57 +02:00
parent 1dee767e6e
commit 107d07bcf2
2 changed files with 22 additions and 0 deletions

5
R/fix.R Normal file
View file

@ -0,0 +1,5 @@
#' @title Round toward zero
#' @description Rounds each element of input to the nearest integer towards zero. Basically the same as trunc()
#' @param X input element
#' @author Waldir Leoncio
fix <- function(X) trunc(X)