aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/Intersection/LineIntersection.h
blob: 33076b68e94f40e8baf10832c854707d3cb7fa2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright 2012 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#ifndef LineIntersection_DEFINE
#define LineIntersection_DEFINE

#include "DataTypes.h"

int horizontalIntersect(const _Line& line, double y, double tRange[2]);
int horizontalLineIntersect(const _Line& line, double left, double right,
        double y, double tRange[2]);
int verticalLineIntersect(const _Line& line, double top, double bottom,
        double x, double tRange[2]);
int intersect(const _Line& a, const _Line& b, double aRange[2], double bRange[2]);
bool testIntersect(const _Line& a, const _Line& b);

#endif