⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 segment.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
字号:
package com.sun.electric.tool.generator.flag.router;/** A line segment that makes up part of a route */public class Segment implements Comparable {	public final Track track;	public final int trackNdx;	public double min, max;	public Segment(double xy1, double xy2, Track track, int trackNdx) {		this.min = Math.min(xy1, xy2);		this.max = Math.max(xy1, xy2);		this.track = track;		this.trackNdx = trackNdx;	}	public int compareTo(Object o) {		double delta = min - ((Segment)o).min;		return (int) Math.signum(delta);	}		public boolean isHorizontal() {return track.isHorizontal();}	public double getTrackCenter() {return track.getCenter();}	public double getSegmentMin() {return min;}	public double getSegmentMax() {return max;}	public void trim(double xy1, double xy2) {		double xyMin = Math.min(xy1, xy2);		double xyMax = Math.max(xy1, xy2);		//LayoutLib.error(xyMin<min || xyMax>max, "trim may not extend segment");		min = Math.max(min, xyMin);		max = Math.min(max, xyMax);		track.resort(this);	}	public String toString() {		return "center="+getTrackCenter()+" ["+min+", "+max+"]";	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -