public UnitVector3(Rotation2 phi, double z) { var xy = Math.Sqrt(1 - z * z); if (double.IsNaN(xy)) { if (z > 0) { _vector = new Vector3(0, 0, 1); } else { _vector = new Vector3(0, 0, -1); } } else { _vector = new Vector3(xy * phi.Cos, xy * phi.Sin, z); } }
public static IOpenPolyline ApplyInv(this Rotation2 @this, IOpenPolyline line) { return(new OpenPolyline(line.Vertices.Select(v => @this.ApplyInv(v)))); }
public static IPolygon ApplyInv(this Rotation2 @this, IPolygon polygon) { return(new Polygon(polygon.Contours.Select(c => @this.ApplyInv(c)))); }
public static IClosedPolyline Apply(this Rotation2 @this, IClosedPolyline line) { return(new ClosedPolyline(line.Vertices.Select(v => @this.Apply(v)))); }