GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Processing
  • Download
  • Reference
  • Environment
  • Libraries
  • Tools
  • Wiki
  • Tutorials
  • Examples
  • Books
  • Forum
  • Overview
  • People
  • Privacy

This view

  • Original page
  • New address

GeezerVison is showing processing.org — angleBetween() / Reference

Reference+
Documentation→Reference→Math→PVector

Name

angleBetween()

Class

PVector

Description

Calculates and returns the angle (in radians) between two vectors.

Examples

  • PVector v1 = new PVector(10, 20);
    PVector v2 = new PVector(60, 80); 
    float a = PVector.angleBetween(v1, v2);
    println(degrees(a));  // Prints "10.304827"
    

Syntax

  • .angleBetween(v1, v2)

Parameters

  • v1(PVector)the x, y, and z components of a PVector
  • v2(PVector)the x, y, and z components of a PVector

Return

  • float
Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.