tapspace
Version:
A zoomable user interface lib for web apps
19 lines (17 loc) • 490 B
JavaScript
const scalar3 = require('affineplane').scalar3
module.exports = function (newBasis) {
// @Volume:transitRaw(newBasis)
//
// Represent the volume in another basis.
// Unlike changeBasis, returns a plain number without basis data.
//
// Parameters:
// newBasis
// a Component
//
// Return
// a scalar3, a number. The volume represented in the new basis.
//
const tran = this.basis.getTransitionTo(newBasis)
return scalar3.transitFrom(this.volume, tran)
}