当前位置: 首页>>代码示例>>C#>>正文


C# Point.GetY方法代码示例

本文整理汇总了C#中System.Point.GetY方法的典型用法代码示例。如果您正苦于以下问题:C# Point.GetY方法的具体用法?C# Point.GetY怎么用?C# Point.GetY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Point的用法示例。


在下文中一共展示了Point.GetY方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RectangleImpl

 public RectangleImpl(Point lowerLeft, Point upperRight)
 {
     this.minX = lowerLeft.GetX();
     this.maxX = upperRight.GetX();
     this.minY = lowerLeft.GetY();
     this.maxY = upperRight.GetY();
 }
开发者ID:ccurrens,项目名称:Spatial4n,代码行数:7,代码来源:RectangleImpl.cs

示例2: GetHashCode

        /// <summary>
        /// All {@link Point} implementations should use this definition of {@link Object#hashCode()}.
        /// </summary>
        /// <param name="thiz"></param>
        /// <returns></returns>
        public static int GetHashCode(Point thiz)
        {
            if (thiz == null)
                throw new ArgumentNullException("thiz");

            long temp = thiz.GetX() != +0.0d ? BitConverter.DoubleToInt64Bits(thiz.GetX()) : 0L;
            int result = (int)(temp ^ ((uint)temp >> 32));
            temp = thiz.GetY() != +0.0d ? BitConverter.DoubleToInt64Bits(thiz.GetY()) : 0L;
            result = 31 * result + (int)(temp ^ ((uint)temp >> 32));
            return result;
        }
开发者ID:ccurrens,项目名称:Spatial4n,代码行数:16,代码来源:PointImpl.cs

示例3: CalcBoxByDistFromPt

 public override Rectangle CalcBoxByDistFromPt(Point from, double distDEG, SpatialContext ctx, Rectangle reuse)
 {
     double minX = from.GetX() - distDEG;
     double maxX = from.GetX() + distDEG;
     double minY = from.GetY() - distDEG;
     double maxY = from.GetY() + distDEG;
     if (reuse == null)
     {
         return ctx.MakeRectangle(minX, maxX, minY, maxY);
     }
     else
     {
         reuse.Reset(minX, maxX, minY, maxY);
         return reuse;
     }
 }
开发者ID:h0st1le,项目名称:Spatial4n,代码行数:16,代码来源:CartesianDistCalc.cs

示例4: Test_A2

      static public void Test_A2(Point point)
      {
         double x = point.GetX();
         double y = point.GetY();
         double z = point.GetZ();
         Debug.Assert(Program.IsApprox(x, 636784.74, 0.01));
         Debug.Assert(Program.IsApprox(y, 849106.66, 0.01));
         Debug.Assert(Program.IsApprox(z, 426.71, 0.01));

         double time = point.GetTime();
         Debug.Assert(Program.IsApprox(time, 245382.13595, 0.00001));

         Debug.Assert(point.GetIntensity() == 118);
         Debug.Assert(point.GetReturnNumber() == 1);
         Debug.Assert(point.GetNumberOfReturns() == 1);

         Classification classif = point.GetClassification();
         Debug.Assert(classif.GetClassName() == "Unclassified");
         Debug.Assert(!classif.IsKeyPoint());
         Debug.Assert(!classif.IsSynthetic());
         Debug.Assert(!classif.IsWithheld());

         Color color = point.GetColor();
         Debug.Assert(color.GetRed() == 112);
         Debug.Assert(color.GetGreen() == 97);
         Debug.Assert(color.GetBlue() == 114);
      }
开发者ID:GeospatialDaryl,项目名称:libLAS,代码行数:27,代码来源:TestPoint.cs

示例5: Equals

        /// <summary>
        /// All {@link Point} implementations should use this definition of {@link Object#equals(Object)}.
        /// </summary>
        /// <param name="thiz"></param>
        /// <param name="o"></param>
        /// <returns></returns>
        public static bool Equals(Point thiz, Object o)
        {
            if (thiz == null)
                throw new ArgumentNullException("thiz");

            if (thiz == o) return true;

            var point = o as Point;
            if (point == null) return false;

            return thiz.GetX().Equals(point.GetX()) && thiz.GetY().Equals(point.GetY());
        }
开发者ID:h0st1le,项目名称:Spatial4n,代码行数:18,代码来源:PointImpl.cs

示例6: CreateIndexableFields

 public Field[] CreateIndexableFields(Point point)
 {
     FieldType doubleFieldType = new FieldType(DoubleField.TYPE_NOT_STORED)
                                     {
                                         NumericPrecisionStep = precisionStep
                                     };
     var f = new Field[]
                 {
                     new DoubleField(fieldNameX, point.GetX(), doubleFieldType),
                     new DoubleField(fieldNameY, point.GetY(), doubleFieldType)
                 };
     return f;
 }
开发者ID:Cefa68000,项目名称:lucenenet,代码行数:13,代码来源:PointVectorStrategy.cs

示例7: Distance

        public override double Distance(Point from, double toX, double toY)
        {
            double result = 0;

            double v = from.GetX() - toX;
            result += (v * v);

            v = from.GetY() - toY;
            result += (v * v);

            if (squared)
                return result;

            return Math.Sqrt(result);
        }
开发者ID:h0st1le,项目名称:Spatial4n,代码行数:15,代码来源:CartesianDistCalc.cs

示例8: CreateIndexableFields

        public AbstractField[] CreateIndexableFields(Point point)
        {
                var f = new AbstractField[2];

                var f0 = new NumericField(fieldNameX, precisionStep, Field.Store.NO, true)
                             {OmitNorms = true, OmitTermFreqAndPositions = true};
                f0.SetDoubleValue(point.GetX());
                f[0] = f0;

                var f1 = new NumericField(fieldNameY, precisionStep, Field.Store.NO, true)
                             {OmitNorms = true, OmitTermFreqAndPositions = true};
                f1.SetDoubleValue(point.GetY());
                f[1] = f1;

                return f;
        }
开发者ID:Nangal,项目名称:lucene.net,代码行数:16,代码来源:PointVectorStrategy.cs

示例9: Relate

 public SpatialRelation Relate(Point point, SpatialContext ctx)
 {
     return Contains(point.GetX(), point.GetY()) ? SpatialRelation.CONTAINS : SpatialRelation.DISJOINT;
 }
开发者ID:ccurrens,项目名称:Spatial4n,代码行数:4,代码来源:CircleImpl.cs

示例10: CalcBoxByDistFromPt_yHorizAxisDEG

 public override double CalcBoxByDistFromPt_yHorizAxisDEG(Point from, double distDEG, SpatialContext ctx)
 {
     return from.GetY();
 }
开发者ID:h0st1le,项目名称:Spatial4n,代码行数:4,代码来源:CartesianDistCalc.cs

示例11: RectangleImpl

 public RectangleImpl(Point lowerLeft, Point upperRight, SpatialContext ctx)
     : this(lowerLeft.GetX(), upperRight.GetX(), lowerLeft.GetY(), upperRight.GetY(), ctx)
 {
 }
开发者ID:h0st1le,项目名称:Spatial4n,代码行数:4,代码来源:RectangleImpl.cs

示例12: PointOnBearing

 public override Point PointOnBearing(Point from, double distDEG, double bearingDEG, SpatialContext ctx, Point reuse)
 {
     if (distDEG == 0)
     {
         if (reuse == null)
             return from;
         reuse.Reset(from.GetX(), from.GetY());
         return reuse;
     }
     double bearingRAD = DistanceUtils.ToRadians(bearingDEG);
     double x = from.GetX() + Math.Sin(bearingRAD)*distDEG;
     double y = from.GetY() + Math.Cos(bearingRAD)*distDEG;
     if (reuse == null)
     {
         return ctx.MakePoint(x, y);
     }
     else
     {
         reuse.Reset(x, y);
         return reuse;
     }
 }
开发者ID:h0st1le,项目名称:Spatial4n,代码行数:22,代码来源:CartesianDistCalc.cs

示例13: Relate

 public SpatialRelation Relate(Point point, SpatialContext ctx)
 {
     if (point.GetY() > GetMaxY() || point.GetY() < GetMinY())
         return SpatialRelation.DISJOINT;
     //  all the below logic is rather unfortunate but some dateline cases demand it
     double minX = this.minX;
     double maxX = this.maxX;
     double pX = point.GetX();
     if (ctx.IsGeo())
     {
         //unwrap dateline and normalize +180 to become -180
         double rawWidth = maxX - minX;
         if (rawWidth < 0)
         {
             maxX = minX + (rawWidth + 360);
         }
         //shift to potentially overlap
         if (pX < minX)
         {
             pX += 360;
         }
         else if (pX > maxX)
         {
             pX -= 360;
         } else {
             return SpatialRelation.CONTAINS; //short-circuit
         }
     }
     if (pX < minX || pX > maxX)
         return SpatialRelation.DISJOINT;
     return SpatialRelation.CONTAINS;
 }
开发者ID:ccurrens,项目名称:Spatial4n,代码行数:32,代码来源:RectangleImpl.cs

示例14: alignGeohash

        /* NGeohash round-trip for given precision. */

        private Point alignGeohash(Point p)
        {
            return GeohashUtils.Decode(GeohashUtils.EncodeLatLon(p.GetY(), p.GetX(), maxLength), ctx);
        }
开发者ID:raol,项目名称:lucene.net,代码行数:6,代码来源:TestRecursivePrefixTreeStrategy.cs

示例15: MakeRectangle

 /// <summary>
 /// Construct a rectangle. The parameters will be normalized.
 /// </summary>
 /// <param name="lowerLeft"></param>
 /// <param name="upperRight"></param>
 /// <returns></returns>
 public Rectangle MakeRectangle(Point lowerLeft, Point upperRight)
 {
     return MakeRectangle(lowerLeft.GetX(), upperRight.GetX(),
                     lowerLeft.GetY(), upperRight.GetY());
 }
开发者ID:h0st1le,项目名称:Spatial4n,代码行数:11,代码来源:SpatialContext.cs


注:本文中的System.Point.GetY方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。