lib/rubyvis/mark/wedge.rb in rubyvis-0.3.0 vs lib/rubyvis/mark/wedge.rb in rubyvis-0.3.1

- old
+ new

@@ -108,16 +108,21 @@ that.upright(a) ? a: (a+Math::PI) }) end - - def upright(angle) + def self.upright(angle) angle=angle % (2*Math::PI) angle=(angle<0) ? (2*Math::PI+angle) : angle - (angle < Math::PI/2.0) or (angle>=3*Math::PI / 2.0) + (angle < Math::PI/2.0) or (angle>=3*Math::PI / 2.0) end + def upright(angle) + angle=angle % (2*Math::PI) + angle=(angle<0) ? (2*Math::PI+angle) : angle + (angle < Math::PI/2.0) or (angle>=3*Math::PI / 2.0) + end + def build_implied(s) if s.angle.nil? s.angle = s.end_angle - s.start_angle elsif s.end_angle.nil?