Back to project page tapdefence.
The source code is released under:
MIT License
If you think the Android project tapdefence listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.kulinich.tapdefence.engine; // w w w . j av a2 s . co m class Line { Point a; Point b; float dx; float dy; float length; Line() {}; Line(Point a, Point b) { this.a = a; this.b = b; calculateParameters(); } void calculateParameters() { length = Utils.metrics(a, b); dx = (b.x - a.x) / length; dy = (b.y - a.y) / length; } }