/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.commons.math.analysis.function;

import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.util.FastMath;

/**
 * Sinc function, defined by <pre><code>
 *
 * sinc(x) = 1 if abs(x) < 1e-9;
 *           sin(x) / x; otherwise
 * </code></pre>
 *
 * @version $Id$
 * @since 3.0
 */
public class Sinc implements UnivariateRealFunction {
    /** {@inheritDoc} */
    public double value(double x) {
        return FastMath.abs(x) < 1e-9 ? 1 : FastMath.sin(x) / x;
    }
}

@@ -967,17 +967,21 @@
 %0A/**%0A * 
-S
+The s
 inc func
@@ -990,118 +990,66 @@
 on, 
-defined by %3Cpre%3E%3Ccode%3E%0A *%0A *
+%7Bcode
  sin
-c
 (x)
- = 1 if abs(x) %3C 1e-9;%0A *           sin(x) / x; otherwise%0A * %3C/code%3E%3C/pre%3E
+/x%7D.%0A * Returns %7Bcode 1%7D if %7Bcode %7Cx%7C %3C 1e-9%7D.
 %0A *%0A

Simplified javadoc.