nvec2f

Undocumented in source.
version(unittest)
alias nvec2f = Vector!(float, 2, true)

Examples

assert(vec2f(2, 3)[] == [2, 3].s);
assert(vec2f(2, 3)[0] == 2);
assert(vec2f(2) == 2);
assert(vec2f(true) == true);
assert(vec2b(true) == true);
assert(all!"a"(vec2b(true)[]));
assert(any!"a"(vec2b(false, true)[]));
assert(any!"a"(vec2b(true, false)[]));
assert(!any!"a"(vec2b(false, false)[]));
assert((vec2f(1, 3)*2.5f)[] == [2.5f, 7.5f].s);
nvec2f v = vec2f(3, 4);
assert(v[] == nvec2f(0.6, 0.8)[]);
import std.conv : to;
auto x = vec2f(2, 3);
assert(to!string(vec2f(2, 3)) == `ColumnVector(2,3)`);
assert(to!string(transpose(vec2f(11, 22))) == `RowVector(11,22)`);
assert(vec2f(11, 22).toLaTeX == `\begin{pmatrix} 11 \\ 22 \end{pmatrix}`);
assert(vec2f(11, 22).T.toLaTeX == `\begin{pmatrix} 11 & 22 \end{pmatrix}`);

Meta