@jscad/modeling
Version:
Constructive Solid Geometry (CSG) Library for JSCAD
15 lines (13 loc) • 496 B
JavaScript
/**
* Return a string representing the given line.
*
* @param {line3} line - line of reference
* @returns {String} string representation
* @alias module:modeling/maths/line3.toString
*/
const toString = (line) => {
const point = line[0]
const direction = line[1]
return `line3: point: (${point[0].toFixed(7)}, ${point[1].toFixed(7)}, ${point[2].toFixed(7)}) direction: (${direction[0].toFixed(7)}, ${direction[1].toFixed(7)}, ${direction[2].toFixed(7)})`
}
module.exports = toString