Here you can find the source of div(final int[] result, final int[] vector, final int[] scale)
Parameter | Description |
---|---|
result | vector for the result, may be vector (in-place) |
vector | input vector |
scale | 3 component scale constant for each vector component |
public static int[] div(final int[] result, final int[] vector, final int[] scale)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w . ja v a 2s .c o m * Divides a vector by param using given result int[], result = vector / * scale * * @param result vector for the result, may be vector (in-place) * @param vector input vector * @param scale 3 component scale constant for each vector component * @return result vector for chaining */ public static int[] div(final int[] result, final int[] vector, final int[] scale) { for (int i = 0; i < result.length; i++) { result[i] = vector[i] / scale[i]; } return result; } }