June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -1,26 +1,20 @@
function scltrip{T<:Number}(a::AbstractArray{T,1},
b::AbstractArray{T,1},
c::AbstractArray{T,1})
dot(a, cross(b, c))
function scalarproduct(a::AbstractVector{T}, b::AbstractVector{T}, c::AbstractVector{T}) where {T<:Number}
return dot(a, cross(b, c))
end
function vectrip{T<:Number}(a::AbstractArray{T,1},
b::AbstractArray{T,1},
c::AbstractArray{T,1})
cross(a, cross(b, c))
function vectorproduct(a::AbstractVector{T}, b::AbstractVector{T}, c::AbstractVector{T}) where {T<:Number}
return cross(a, cross(b, c))
end
a = [3, 4, 5]
b = [4, 3, 5]
c = [-5, -12, -13]
const a = [3, 4, 5]
const b = [4, 3, 5]
const c = [-5, -12, -13]
println("Test Vectors:")
println(" a = ", a)
println(" b = ", a)
println(" c = ", a)
@show a b c
println("\nVector Products:")
println(" a dot b = ", dot(a, b))
println(" a cross b = ", cross(a, b))
println(" a dot b cross c = ", scltrip(a, b, c))
println(" a cross b cross c = ", vectrip(a, b, c))
@show dot(a, b)
@show cross(a, b)
@show scalarproduct(a, b, c)
@show vectorproduct(a, b, c)