View Javadoc
1   package org.opentrafficsim.core.value.vfloat;
2   
3   import cern.colt.function.tfloat.FloatFunction;
4   
5   /**
6    * FloatFunction implementations of the standard Math functions.
7    * <p>
8    * This file was generated by the OpenTrafficSim value classes generator, 09 mrt, 2015
9    * <p>
10   * Copyright (c) 2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
11   * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
12   * <p>
13   * @version 09 mrt, 2015 <br>
14   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
15   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
16   */
17  public final class FloatMathFunctionsImpl
18  {
19      /**
20       * This class shall never be instantiated.
21       */
22      private FloatMathFunctionsImpl()
23      {
24          // Prevent instantiation of this class
25      }
26  
27      /**
28       * Function that returns <tt>Math.cbrt(a)</tt>.
29       */
30      public static final FloatFunction cbrt = new FloatFunction()
31      {
32          @Override
33          public float apply(final float a)
34          {
35              return (float) Math.cbrt(a);
36          }
37      };
38  
39      /**
40       * Function that returns <tt>Math.cosh(a)</tt>.
41       */
42      public static final FloatFunction cosh = new FloatFunction()
43      {
44          @Override
45          public float apply(final float a)
46          {
47              return (float) Math.cosh(a);
48          }
49      };
50  
51      /**
52       * Function that returns <tt>Math.expm1(a)</tt>.
53       */
54      public static final FloatFunction expm1 = new FloatFunction()
55      {
56          @Override
57          public float apply(final float a)
58          {
59              return (float) Math.expm1(a);
60          }
61      };
62  
63      /**
64       * Function that returns <tt>Math.log10(a)</tt>.
65       */
66      public static final FloatFunction log10 = new FloatFunction()
67      {
68          @Override
69          public float apply(final float a)
70          {
71              return (float) Math.log10(a);
72          }
73      };
74  
75      /**
76       * Function that returns <tt>Math.log1p(a)</tt>.
77       */
78      public static final FloatFunction log1p = new FloatFunction()
79      {
80          @Override
81          public float apply(final float a)
82          {
83              return (float) Math.log1p(a);
84          }
85      };
86  
87      /**
88       * Function that returns <tt>Math.round(a)</tt>.
89       */
90      public static final FloatFunction round = new FloatFunction()
91      {
92          @Override
93          public float apply(final float a)
94          {
95              return Math.round(a);
96          }
97      };
98  
99      /**
100      * Function that returns <tt>Math.signum(a)</tt>.
101      */
102     public static final FloatFunction signum = new FloatFunction()
103     {
104         @Override
105         public float apply(final float a)
106         {
107             return Math.signum(a);
108         }
109     };
110 
111     /**
112      * Function that returns <tt>Math.sinh(a)</tt>.
113      */
114     public static final FloatFunction sinh = new FloatFunction()
115     {
116         @Override
117         public float apply(final float a)
118         {
119             return (float) Math.sinh(a);
120         }
121     };
122 
123     /**
124      * Function that returns <tt>Math.tanh(a)</tt>.
125      */
126     public static final FloatFunction tanh = new FloatFunction()
127     {
128         @Override
129         public float apply(final float a)
130         {
131             return (float) Math.tanh(a);
132         }
133     };
134 
135     /**
136      * Function that returns <tt>Math.toDegrees(a)</tt>.
137      */
138     public static final FloatFunction toDegrees = new FloatFunction()
139     {
140         @Override
141         public float apply(final float a)
142         {
143             return (float) Math.toDegrees(a);
144         }
145     };
146 
147     /**
148      * Function that returns <tt>Math.toRadians(a)</tt>.
149      */
150     public static final FloatFunction toRadians = new FloatFunction()
151     {
152         @Override
153         public float apply(final float a)
154         {
155             return (float) Math.toRadians(a);
156         }
157     };
158 
159 }