JavaFX rotate Y Angle - Java JavaFX

Java examples for JavaFX:Shape

Description

JavaFX rotate Y Angle

Demo Code


//package com.java2s;

import javafx.geometry.Point3D;

public class Main {
    public static double rotateYAngle(Point3D p1, Point3D p2) {
        double xDiff = p2.getX() - p1.getX();
        double zDiff = p2.getZ() - p1.getZ();
        return Math.toDegrees(Math.atan2(xDiff, zDiff));
    }/*  w ww .j a  v  a 2 s  .c  o  m*/
}

Related Tutorials