# Class P4

java.lang.Object
javajs.util.T3
javajs.util.T4
javajs.util.P4

All Implemented Interfaces:
  `Serializable, JSONEncodable`

public class P4 extends T4
A 4 element point that is represented by single precision floating point x,y,z,w coordinates.

Version:
  specification 1.1, implementation $Revision: 1.9 $, $Date: 2006/07/28 17:01:32 $
Author:
  Kenji hiranabe additions by Bob Hanson hansonr@stolaf.edu 9/30/2012 for unique constructor and method names for the optimization of compiled JavaScript using Java2Script
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class T4

`w`

### Fields inherited from class T3

`x, y, z`

## Constructor Summary

Constructors
Constructor
Description
`P4()`

## Method Summary

Modifier and Type
Method
Description
`final float`
`distance4(P4 p1)`
Returns the distance between this point and point p1.
`static P4`
`new4(float x, float y, float z, float w)`
`static P4`
`newPt(P4 value)`

### Methods inherited from class T4

`equals, hashCode, scale4, set4, toJSON, toString`

### Methods inherited from class T3

`add, add2, add3, ave, cross, distance, distanceSquared, dot, floatToIntBits, length, lengthSquared, normalize, putP, scale, scaleAdd2, scaleT, set, setA, setP, setT, sub, sub2`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### P4

public P4()

## Method Details

### new4

public static P4 new4(float x, float y, float z, float w)

### newPt

public static P4 newPt(P4 value)

### distance4

public final float distance4(P4 p1)
Returns the distance between this point and point p1.

Parameters:
  `p1` - the other point
Returns:
  the distance between these two points