Last change
on this file since 13825 was
12762,
checked in by aballeit, 10 years ago
|
#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)
|
File size:
713 bytes
|
Line | |
---|
1 | using System;
|
---|
2 |
|
---|
3 | namespace SharpVectors.Polynomials
|
---|
4 | {
|
---|
5 | /// <summary>
|
---|
6 | /// This class overrides Polynomial's evaluate method to return the square root of that value. We need to integrate the square root of a polynomial when finding the arc length of a Bezier curve.
|
---|
7 | /// </summary>
|
---|
8 | /// <developer>kevin@kevlindev.com</developer>
|
---|
9 | /// <completed>100</completed>
|
---|
10 | public class SqrtPolynomial : Polynomial
|
---|
11 | {
|
---|
12 | #region constructors
|
---|
13 | public SqrtPolynomial(params double[] coefficients) : base(coefficients) {}
|
---|
14 | #endregion
|
---|
15 |
|
---|
16 | #region public methods
|
---|
17 | public override double Evaluate(double t)
|
---|
18 | {
|
---|
19 | return Math.Sqrt(base.Evaluate(t));
|
---|
20 | }
|
---|
21 | #endregion
|
---|
22 | }
|
---|
23 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.