Copy a vector from from into to - Android java.lang

Android examples for java.lang:Math Vector

Description

Copy a vector from from into to

Demo Code


//package com.java2s;

public class Main {
    /**//from  w w  w .  ja  v a  2 s  .  co m
     * Copy a vector from <code>from</code> into <code>to</code>
     * @param from The source
     * @param to The destination
     **/
    public static void copy(int size, float[] from, int offsetFrom,
            float[] to, int offsetTo) {
        for (int i = 0; i < from.length; i++) {
            to[i] = from[i];
        }
    }
}

Related Tutorials