コード例 #1
0
ファイル: C.cs プロジェクト: peterliow/SwissEphNet
        public static CPointer <TVal> bsearch <TKey, TVal>(TKey key, CPointer <TVal> array, int n, Func <TKey, TVal, int> compare)
        {
            var list = new List <TVal>(array.ToArray().Take(n));
            var idx  = list.BinarySearch(default(TVal), new bcomparer <TKey, TVal>(key, compare));

            return(idx >= 0 ? array + idx : new CPointer <TVal>());
        }
コード例 #2
0
ファイル: C.cs プロジェクト: peterliow/SwissEphNet
        public static void qsort <T>(CPointer <T> array, int n, Comparison <T> compare)
        {
            var list = new List <T>(array.ToArray().Take(n));

            list.Sort(compare);
            for (int i = 0; i < list.Count; i++)
            {
                array[i] = list[i];
            }
        }
コード例 #3
0
 public void swe_cotrans_sp(CPointer <double> xpo, CPointer <double> xpn, double eps)
 {
     SwephLib.swe_cotrans_sp(xpo, xpn, eps);
 }
コード例 #4
0
 public int swe_houses_ex(double tjd_ut, Int32 iflag, double geolat, double geolon, char hsys, CPointer <double> hcusps, CPointer <double> ascmc)
 {
     return(SweHouse.swe_houses_ex(tjd_ut, iflag, geolat, geolon, hsys, hcusps, ascmc));
 }