This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
amazon_sender.py | |
~~~~~~~~ | |
Python helper class that can send emails using Amazon SES and boto. | |
The biggest feature of this class is that encodings are handled properly. | |
It can send both text and html emails. | |
This implementation is using Python's standard library (which opens up for a lot more options). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ported from http://alienryderflex.com/intersect/ | |
public static function LineIntersection(a:Point, b:Point, c:Point, d:Point):Point | |
{ | |
var distAB:Number, cos:Number, sin:Number, newX:Number, ABpos:Number; | |
if ((a.x == b.x && a.y == b.y) || (c.x == d.x && c.y == d.y)) return null; | |
if ( a == c || a == d || b == c || b == d ) return null; | |
b = b.clone(); |