Source File
ovg_edge.go
Belonging Package
github.com/pancsta/d2/d2layouts/d2talalayout/internal/routing
package routingimport ()type OVGEdge struct {From *OVGNodeTo *OVGNodeDistance float64}func (, *OVGNode) *OVGEdge {return &OVGEdge{From: ,To: ,}}func ( *OVGEdge) () bool {return .From.X == .To.X}func ( *OVGEdge) () bool {return .From.Y == .To.Y}func ( *OVGEdge) ( OVGEdge) bool {return (nonNilEquals(.From.Point, .From.Point) ||nonNilEquals(.From.Point, .To.Point) ||nonNilEquals(.To.Point, .From.Point) ||nonNilEquals(.To.Point, .To.Point))}// geo.Point.Equals skipping nil check// TODO move to d2 as Equals, rename existing to NilEqualsfunc nonNilEquals(, *geo.Point) bool {return .X == .X && .Y == .Y}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |