Method code for $math.scale_mat()

[Turn on line numbering]
arg scale;

if (scale.length() == 2)
    return [[scale[1], 0.0, 0.0], [0, scale[2], 0.0], [0.0, 0.0, 1.0]];
else
    return [[scale[1], 0.0, 0.0, 0.0], [0.0, scale[2], 0.0, 0.0], [0.0, 0.0, scale[3], 0.0], [0.0, 0.0, 0.0, 1]];

["// Various Contributors, including: Miroslav Silovic, Bruce Mitchner, Nolan, Sean R. Lynch, Technobunny", "// Created 19-Oct-1996 as a part of ColdCore, see: @help Credit"]

the Cold Dark