source_raw
/
src
/sysml.library
/Domain Libraries
/Quantities and Units
/MeasurementRefCalculations.sysml
standard library package MeasurementRefCalculations { | |
doc | |
/* | |
* This package package defines calculations on MeasurementUnits and CoordinateFrames. | |
*/ | |
private import ScalarValues::String; | |
private import ScalarValues::Real; | |
private import MeasurementReferences::MeasurementUnit; | |
private import MeasurementReferences::ScalarMeasurementReference; | |
private import MeasurementReferences::CoordinateFrame; | |
/* MeasurementUnit operations */ | |
calc def '*' specializes DataFunctions::'*' { in x: MeasurementUnit[1]; in y: MeasurementUnit[1]; return : MeasurementUnit[1]; } | |
calc def '/' specializes DataFunctions::'/' { in x: MeasurementUnit[1]; in y: MeasurementUnit[1]; return : MeasurementUnit[1]; } | |
calc def '**' specializes DataFunctions::'**' { in x: MeasurementUnit[1]; in y: Real[1]; return : MeasurementUnit[1]; } | |
calc def '^' specializes DataFunctions::'^' { in x: MeasurementUnit[1]; in y: Real[1]; return : MeasurementUnit[1]; } | |
/* CoordinateFrame and MeasurementUnit operations */ | |
calc def 'CoordinateFrame*' specializes DataFunctions::'*' { in x: CoordinateFrame[1]; in y: MeasurementUnit[1]; return : CoordinateFrame[1]; } | |
calc def 'CoordinateFrame/' specializes DataFunctions::'/' { in x: CoordinateFrame[1]; in y: MeasurementUnit[1]; return : CoordinateFrame[1]; } | |
calc def ToString specializes BaseFunctions::ToString { | |
doc | |
/* | |
* Returns the Unicode string symbol representing a scalar measurement reference. | |
*/ | |
in x: ScalarMeasurementReference[1]; return : String[1]; | |
} | |
} | |