summaryrefslogtreecommitdiff
path: root/cad/src/utilities/Printing.py
blob: 332be67bcf33684ab9da801d3e698edee3f02030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Copyright 2004-2007 Nanorex, Inc.  See LICENSE file for details. 

"""
Utilities for formatting various data types as strings.

@author:    Eric Messick
@version:   $Id$
@copyright: 2004-2007 Nanorex, Inc.  See LICENSE file for details.
@license:   GPL
"""

def Vector3ToString(v):
    """
    Print a 3-vector surrounded by angle brackets:  '<1, 2, 3>'
    Used for povray colors.
    """
    return "<" + str(v[0]) + "," + str(v[1]) + "," + str(v[2]) + ">"