Android examples for java.lang:Math Vector
Multiply a vector by a scalar.
//package com.java2s; public class Main { /**/* w w w.java2s .c o m*/ * Multiply a vector by a scalar. <b>Modifies the input vector</b> * @param vector The vector * @param scalar The scalar **/ public static void multiply(int size, float[] vector, int offset, float scalar) { for (int i = 0; i < size; i++) vector[offset + i] *= scalar; } }