Skip to content
DavisDevelopment edited this page Jan 2, 2015 · 1 revision

class tannus.geom.Point

class to represent a three-dimensional point in Cartesian space


Instance Fields


var x : Float

The x coordinate of this Point

var y : Float

The y coordinate of this Point

var z : Float

The z coordinate of this Point


Instance Methods


function new(?x:Float = 0, ?y:Float = 0, ?z:Float = 0):Void

Constructor function; All arguments are nullable and default to 0

function equals(other : Point):Bool

Tests whether this Point equals other Point
In other words, whether their x, y, and z coordinates are all the same

function relativeTo(other : Point):Point

Create and returns a new Point instance with it's x, y, and z indices all the difference between those indices of this and other

function sum(other : Point):Point

Creates and returns a new Point instance which is the "sum" of this and other