]> git.basschouten.com Git - openhab-addons.git/blob
bf70fc73e23736e2d03fd525fa581189bf2113ff
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.hue.internal.api.dto.clip2;
14
15 /**
16  * DTO that contains an x and y pair of doubles.
17  *
18  * @author Andrew Fiddian-Green - Initial contribution
19  */
20 public class PairXy {
21     private double x;
22     private double y;
23
24     public double[] getXY() {
25         return new double[] { x, y };
26     }
27
28     public PairXy setXY(double[] xy) {
29         x = xy.length > 0 ? xy[0] : 0f;
30         y = xy.length > 1 ? xy[1] : 0f;
31         return this;
32     }
33 }