001/* A operation taking one operand of type float, and producing a value of
002 type float.
003
004 This file was automatically generated with a preprocessor, so that
005 similar operations are supported on ints, longs, floats, and floats.
006
007 Copyright (c) 1998-2014 The Regents of the University of California.
008 All rights reserved.
009
010 Permission is hereby granted, without written agreement and without
011 license or royalty fees, to use, copy, modify, and distribute this
012 software and its documentation for any purpose, provided that the above
013 copyright notice and the following two paragraphs appear in all copies
014 of this software.
015
016 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
017 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
018 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
019 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
020 SUCH DAMAGE.
021
022 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
023 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
024 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
025 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
026 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
027 ENHANCEMENTS, OR MODIFICATIONS.
028
029 PT_COPYRIGHT_VERSION_2
030 COPYRIGHTENDKEY
031
032 */
033package ptolemy.math.test;
034
035import ptolemy.math.FloatUnaryOperation;
036
037/** A operation taking one argument of type float, and producing a value of
038 type float. This interface attempts to mimic a first-class function of
039 a single variable.
040
041 @author Jeff Tsay
042 @version $Id$
043 @since Ptolemy II 2.0
044 @Pt.ProposedRating Red (ctsay)
045 @Pt.AcceptedRating Red (ctsay)
046 */
047public class TestFloatUnaryOperation implements FloatUnaryOperation {
048    /** Operate on the operand, returning a value of the same type. */
049    @Override
050    public float operate(float operand) {
051        return -operand;
052    }
053}