module RayTracer::Tuple

Extended Modules

Direct including types

Defined in:

ray_tracer/tuple.cr

Constant Summary

ORIGIN = point(0, 0, 0)

Instance Method Summary

Instance Method Detail

def add(a1 : TUPLE, a2 : TUPLE) #

[View source]
def cross(a1 : TUPLE, a2 : TUPLE) #

[View source]
def divide(a : TUPLE, s : Float64) #

[View source]
def dot(a1 : TUPLE, a2 : TUPLE) #

[View source]
def magnitude(a : TUPLE) #

[View source]
def multiply(a : TUPLE, s : Float64) #

[View source]
def negate(a : TUPLE) #

[View source]
def normalize(a : TUPLE) #

[View source]
def point(x : Float64, y : Float64, z : Float64) #

[View source]
def point?(tuple : TUPLE) #

[View source]
def reflect(v : TUPLE, n : TUPLE) #

[View source]
def subtract(a1 : TUPLE, a2 : TUPLE) #

[View source]
def tuple(x : Float64, y : Float64, z : Float64, w : Float64) #

[View source]
def tuple(vals : Array(Float64)) #

[View source]
def vector(x : Float64, y : Float64, z : Float64) #

[View source]
def vector?(tuple : TUPLE) #

[View source]