Translated omaRound()

This commit is contained in:
Waldir Leoncio 2020-07-14 15:16:10 +02:00
parent 31a61c1661
commit a40b07c69d
2 changed files with 7 additions and 14 deletions

View file

@ -948,20 +948,6 @@ greedyMix <- function(
# %---------------------------------------------------------------
# function dispLine;
# disp('---------------------------------------------------');
# %--------------------------------------------------------------
# function num2 = omaRound(num)
# % Py<50>rist<73><74> luvun num 1 desimaalin tarkkuuteen
# num = num*10;
# num = round(num);
# num2 = num/10;
# %--------------------------------------------------------------------
# function dist2 = laskeOsaDist(inds2, dist, ninds)
# % Muodostaa dist vektorista osavektorin, joka sis<69>lt<6C><74> yksil<69>iden inds2
# % v<>liset et<65>isyydet. ninds=kaikkien yksil<69>iden lukum<75><6D>r?

7
R/omaRound.R Normal file
View file

@ -0,0 +1,7 @@
omaRound <- function(num) {
# Py<50>rist<73><74> luvun num 1 desimaalin tarkkuuteen
num <- num * 10
num <- round(num)
num2 <- num / 10
return(num2)
}