import Protractor;
import RimPoint;
import Triangle;
class ProtractorContainer extends MovieClip {
	var prot:Protractor;
	var p:RimPoint;
	var t:Triangle;
	function ProtractorContainer(){
		prot = Protractor(attachMovie("Protractor", "prot", 0));		
		p = RimPoint(attachMovie("RimPoint", "p", 2));
		t = Triangle(attachMovie("Triangle", "t", 1));
		prot.p = p;
	}
	static function toDP(t:Number, dps:Number):Number {
		// TODO: fix small rounding errors
		var whole:Number = Math.floor(t);
		var pten:Number = Math.pow(10,dps);
		var frac:Number = (t-whole)*pten;
		return whole + Math.round(frac)/pten;
	}

}
	