Update of /cvsroot/csdopenglnet/csdOpenGL/math
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19854
Added Files:
AssemblyInfo.cs Bezier.cs
Log Message:
additional math tools
--- NEW FILE: Bezier.cs ---
using System;
using System.Globalization;
namespace csDragons {
namespace OpenGL {
namespace Math {
public class Bezier {
public static float Bernstein( int n, int i, float x ) {
return (float)(BinKoef( n, i ) * System.Math.Pow( x, i ) * System.Math.Pow( 1-x, n-i ));
}
public static int Fakultaet( int n ) {
return Fakultaet( n, 1);
}
public static int Fakultaet( int n, int res ) {
if (n<=0) {
return res;
} else {
return Fakultaet( n-1, n*res );
}
}
public static int BinKoef( int n, int i ) {
if (n>=i) {
return Fakultaet(n) / ( Fakultaet(i) * Fakultaet( n-i ) );
} else return 1;
}
}
} // csDragons end of namespace
} // OpenGL end of namespace
} // Math end of namespace
--- NEW FILE: AssemblyInfo.cs ---
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("csDragons.OpenGL - Math")]
[assembly: AssemblyDescription("mathemtaical Utility classes")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("csDragons")]
[assembly: AssemblyProduct("csDragons OpenGL Tools")]
[assembly: AssemblyCopyright("(C)Copyright 2004 by Tim Rädisch & Kai Reichert")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("0.1.*")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("PublicKeyFile.snk")]
|