Here you can find the source of clampUShortNegative(int in)
public static final short clampUShortNegative(int in)
//package com.java2s; /*/*from w ww.j a v a 2s.c o m*/ * $RCSfile: ImageUtil.java,v $ * * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * * Use is subject to license terms. * * $Revision: 1.2 $ * $Date: 2006/07/21 20:53:28 $ * $State: Exp $ */ public class Main { public static final short clampUShortNegative(int in) { return (in < 0 ? (short) 0 : (short) in); } }