Java examples for java.lang:Math Calculation
Calculate the sphericity of a particle (Mathilde formula)
/*/*from w w w.j a v a 2s. co m*/ * Corsen development code * * This code may be freely distributed and modified under the * terms of the GNU General Public Licence version 2 or later. This * should be distributed with the code. If you do not have a copy, * see: * * http://www.gnu.org/licenses/gpl-2.0.txt * * Copyright for this code is held jointly by the microarray platform * of the ?cole Normale Sup?rieure and the individual authors. * These should be listed in @author doc comments. * * For more information on the Corsen project and its aims, * or to join the Corsen google group, visit the home page * at: * * http://transcriptome.ens.fr/corsen * */ //package com.java2s; public class Main { /** * Calculate the sphericity of a particle (Mathilde formula) * @param volume Volume of the particle * @param area area of the particle * @return the sphericity of the particle */ public static final double sphericite2(final double volume, final double area) { return (6.0 * Math.sqrt(Math.PI) * volume) / Math.pow(area, 3.0 / 2.0); } }