Back to project page android-appwidget-cirrus.
The source code is released under:
MIT License
If you think the Android project android-appwidget-cirrus listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* Copyright 2014 Wayne D Grant (www.waynedgrant.com) Licensed under the MIT License */ /* w w w . j av a 2s . c o m*/ package com.waynedgrant.cirrus.measures; import com.waynedgrant.cirrus.units.CardinalDirection; public class WindDirection { private Integer compassDegrees; private CardinalDirection cardinalDirection; public WindDirection(Integer degrees) { this.compassDegrees = degrees; this.cardinalDirection = CardinalDirection.values()[(int)(((degrees.intValue() + 11) / 22.5) % 16)]; } public Integer getCompassDegrees() { return compassDegrees; } public CardinalDirection getCardinalDirection() { return cardinalDirection; } }