scalar

get quantity value in the appropriate numeric type


Parameters

scalar value :quantity

Returns

  • :integer
  • :floating
  • :rational

Examples

copy
scalar 3`m ; => 3 scalar 4.0`m2 ; => 4 scalar 10:2`m3 ; => 5

copy
scalar 3.1`m ; => 3.1 scalar 5:2`m ; => 2.5

copy
scalar 13:3`m ; => 13/3

Related