Click here to Skip to main content
15,881,089 members
Articles / Multimedia / GDI+

Interpolation of BezierSplines and Cubic Splines

Rate me:
Please Sign up or sign in to vote.
4.83/5 (16 votes)
5 Jan 2008CPOL2 min read 98.3K   3.1K   63  
Algorithms to compute the Y - Value at an X - Position of a curve, constructed by some support-points
Imports System.Runtime.CompilerServices

Public Module IComparableX

   ''' <summary>converts a Comparison to an IComparer</summary>
   Public Function ToComparer(Of T)(ByVal Subj As Comparison(Of T)) As ComparisonComparer(Of T)
      Return New ComparisonComparer(Of T)(Subj)
   End Function

   ''' <summary>
   ''' IComparer-implementierender Wrapper um eine Comparison 
   ''' </summary>
   Public Class ComparisonComparer(Of T) : Inherits Comparer(Of T)
      Private _Comparison As Comparison(Of T)
      Public Sub New(ByVal Comparison As Comparison(Of T))
         _Comparison = Comparison
      End Sub
      Public Overrides Function Compare(ByVal x As T, ByVal y As T) As Integer
         Return _Comparison(x, y)
      End Function
   End Class

End Module

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions