Here you can find the source of negate(double[] values)
Parameter | Description |
---|---|
values | a parameter |
public static double[] negate(double[] values)
//package com.java2s; //License from project: Apache License public class Main { /**// w ww. j ava 2 s.co m * Return a double array with negated values * @param values * @return */ public static double[] negate(double[] values) { double[] result = new double[values.length]; for (int i = 0; i < values.length; i++) { result[i] = -values[i]; } return result; } }