ph91.de
  • Home
  • About me
  • Categories
    • Software Development
    • New Zealand
    • Music
    • Tech & IT
    • Sports
    • Dublin
    • Junk
  • Contact
  • Disclaimer
ph91.de
ph91.de
  • Home
  • About me
  • Categories
    • Software Development
    • New Zealand
    • Music
    • Tech & IT
    • Sports
    • Dublin
    • Junk
  • Contact
  • Disclaimer
  • Allgemein
  • Software Development

Convert to degree to direction (the beautiful way)

  • 15. August 2020

Recently I encountered the issue of converting a degree in ° (0-360) to a direction (compass directions). On my internet research I only found “ugly” solutions where the minAngle and maxAngle were explicitly listed for each direciont (N, NNE, NE, NEE…).

There was no chance that I would copy such ugly code into my codebase, therefore it made the effort to think about a more beautful way to solve this task. In the end, I came up with this:

Related Topics
  • direction
  • enum
  • java
Philipp

Previous Article
  • Allgemein

I’m running in Docker

  • 17. February 2020
  • Philipp
View Post
Next Article
action adventure beach clouds
  • Software Development

Creating “Windwarner”

  • 2. January 2021
  • Philipp
View Post
366 comments

Comments navigation

Older comments
  1. AlbertDioke says:
    3. November 2025 at 07:58

    https://t.me/s/UD_pIn_uP

  2. AlbertDioke says:
    3. November 2025 at 09:07

    https://t.me/s/UD_vULKAn

  3. JamesBlade says:
    3. November 2025 at 19:25

    https://t.me/s/kef_beef

  4. JamesBlade says:
    3. November 2025 at 20:36

    https://t.me/s/ke_Pin_Up

  5. JamesBlade says:
    3. November 2025 at 21:46

    https://t.me/s/ke_PlayFortuna

  6. DealerShadow says:
    3. November 2025 at 21:52

    https://t.me/s/official_1win_aviator/130

  7. JamesBlade says:
    3. November 2025 at 22:57

    https://t.me/s/ke_JoyCasino

  8. JamesBlade says:
    4. November 2025 at 00:06

    https://t.me/s/ke_Irwin

  9. JamesBlade says:
    4. November 2025 at 01:14

    https://t.me/s/ke_Casino_X

  10. JamesBlade says:
    4. November 2025 at 02:23

    https://t.me/s/ke_Drip

  11. JamesBlade says:
    4. November 2025 at 04:36

    https://t.me/s/ke_1xSlots

  12. JamesBlade says:
    4. November 2025 at 06:47

    https://t.me/s/ke_GGBet

  13. JamesBlade says:
    4. November 2025 at 07:51

    https://t.me/s/ke_Riobet

  14. hepato burn says:
    4. November 2025 at 08:53

    **hepato burn**

    hepato burn is a potent, plant-based formula created to promote optimal liver performance and naturally stimulate fat-burning mechanisms.

  15. JamesBlade says:
    4. November 2025 at 09:58

    https://t.me/s/ke_1Win

  16. JamesBlade says:
    4. November 2025 at 11:05

    https://t.me/s/ke_Gizbo

Comments navigation

Older comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Dev profiles
  • BitBucket
  • Github
  • Stackoverflow
Side Projects
  • NMF
  • Speed-kini.de
  • Sudoku Solver
  • Windwarner
Archive
ph91.de
Blog by Philipp Schreitmüller

Input your search keywords and press Enter.