Created
March 8, 2012 12:22
-
-
Save fern4lvarez/2000768 to your computer and use it in GitHub Desktop.
Establecer mínimo y máximo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
min=Double.MAX_VALUE; | |
max=Double.MIN_VALUE; | |
private void setMaxMinUser(){ | |
double artesano=u.getPorcentajeArtesano(); | |
double idealista=u.getPorcentajeIdealista(); | |
double guardian=u.getPorcentajeGuardian(); | |
double racional=u.getPorcentajeRacional(); | |
double aux=0; | |
//Inicializamos genero con Accion (podría ser cualquier otro) | |
Generos genero=Generos.Accion; | |
Generos[] g=Generos.values(); | |
//Recorremos todos los géneros | |
for (int i=0; i<g.length; i++){ | |
aux=0; | |
genero=g[i]; | |
aux=artesano*tabla.getValorTabla(genero, Temperamento.Artesano); | |
aux=aux+idealista*tabla.getValorTabla(genero, Temperamento.Idealista); | |
aux=aux+guardian*tabla.getValorTabla(genero, Temperamento.Guardian); | |
aux=aux+racional*tabla.getValorTabla(genero, Temperamento.Racional); | |
aux=aux*100; | |
if (aux>max)max=aux; | |
if (aux<min)min=aux;; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment