Java examples for 2D Graphics:Angle
is Ordinal angle
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { float angle = 2.45678f; System.out.println(isOrdinal(angle)); }/*from w w w . ja v a 2s . c om*/ public static boolean isOrdinal(float angle) { // Round the angle int ordinalAngle = (int) angle; if ((ordinalAngle % 90) == 0) return true; else return false; } }