Here you can find the source of clamp1f(float f)
public final static float clamp1f(float f)
//package com.java2s; /**/*from w w w. j ava2 s .c o m*/ * This class is part of JCodec ( www.jcodec.org ) This software is distributed * under FreeBSD License * * Downmixes PCM audio data into 16 bit stereo track * * @author The JCodec project * */ public class Main { public final static float clamp1f(float f) { if (f > 1f) return 1f; if (f < -1f) return -1f; return f; } }