MCPcopy Create free account
hub / github.com/alanross/AlvaAR / Size

Class Size

src/libs/opencv/modules/core/misc/java/src/java/core+Size.java:4–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3//javadoc:Size_
4public class Size {
5
6 public double width, height;
7
8 public Size(double width, double height) {
9 this.width = width;
10 this.height = height;
11 }
12
13 public Size() {
14 this(0, 0);
15 }
16
17 public Size(Point p) {
18 width = p.x;
19 height = p.y;
20 }
21
22 public Size(double[] vals) {
23 set(vals);
24 }
25
26 public void set(double[] vals) {
27 if (vals != null) {
28 width = vals.length > 0 ? vals[0] : 0;
29 height = vals.length > 1 ? vals[1] : 0;
30 } else {
31 width = 0;
32 height = 0;
33 }
34 }
35
36 public double area() {
37 return width * height;
38 }
39
40 public boolean empty() {
41 return width <= 0 || height <= 0;
42 }
43
44 public Size clone() {
45 return new Size(width, height);
46 }
47
48 @Override
49 public int hashCode() {
50 final int prime = 31;
51 int result = 1;
52 long temp;
53 temp = Double.doubleToLongBits(height);
54 result = prime * result + (int) (temp ^ (temp >>> 32));
55 temp = Double.doubleToLongBits(width);
56 result = prime * result + (int) (temp ^ (temp >>> 32));
57 return result;
58 }
59
60 @Override
61 public boolean equals(Object obj) {

Callers 15

runMethod · 0.50
runCaseMethod · 0.50
TESTFunction · 0.50
ChessBoardGeneratorClass · 0.50
cornersSizeMethod · 0.50
run_batchMethod · 0.50
checkByGeneratorMethod · 0.50
TESTFunction · 0.50
TESTFunction · 0.50
runMethod · 0.50
runMethod · 0.50

Calls

no outgoing calls

Tested by 15

runMethod · 0.40
runCaseMethod · 0.40
TESTFunction · 0.40
cornersSizeMethod · 0.40
run_batchMethod · 0.40
checkByGeneratorMethod · 0.40
TESTFunction · 0.40
TESTFunction · 0.40
runMethod · 0.40
runMethod · 0.40
runMethod · 0.40