Skip to content

brandonkorf/pointPlane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pointPlane

Determines if given point is above, on or below plane made by 3 other given points.

Install

	npm install point-plane

Example

var pointPlane = require("pointPlane")

console.log(pointPlane(
	[-1,-1,0],
	[-1,1,0],
	[1,-1,0],
	[0,0,1]))

API

require("pointPlane")(a,b,c,d)

Determines if given point d is above, on or below plane made by 3 other given points (a, b, and c).

  • a, b, c, and d are 3-D points encoded as arrays of length 3.

Returns 1 if above plane, 0 if on plane, and -1 if below plane.

Credits

(c) 2013 Brandon Korf. MIT License

About

Module to tell if point is above, below, or on plane

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published