Here you can find the source of booleanToInteger(boolean b)
Parameter | Description |
---|---|
b | The boolean to be converted |
public static int booleanToInteger(boolean b)
//package com.java2s; /*/*from w w w . j av a 2 s.c o m*/ * Copyright (c) 2014 mgamelabs * To see our full license terms, please visit https://github.com/mgamelabs/mengine/blob/master/LICENSE.md * All rights reserved. */ public class Main { /** * Converts a boolean into an integer. * This is necessary for some OpenGL interactions * * @param b The boolean to be converted * @return The integer output */ public static int booleanToInteger(boolean b) { if (b) return 1; else return 0; } }