import { FloatArray } from '../types' ; import { createNumberArray } from '../utilities/createNumberArray' ; export function rotatePoints ( ns , count ) { const len = ns . length ; const rightLen = len - count ; const buffer = createNumberArray ( count ) ; let i ; for ( i = 0 ; i < count ; i ++ ) { buffer [ i ] = ns [ i ] ; } for ( i = count ; i < len ; i ++ ) { ns [ i - count ] = ns [ i ] ; } for ( i = 0 ; i < count ; i ++ ) { ns [ rightLen + i ] = buffer [ i ] ; } }