physics.fromMKS()

Type Function
Library physics.*
Return value Number
Revision Release 2022.3683
Keywords MKS conversion
See also physics.toMKS()

Overview

Convenience function for converting from MKS units to Corona units.

Syntax

physics.fromMKS( unitName, value ) 
unitName (required)

String. Can be one of the following values:

  • "length"
  • "velocity"
  • "angularVelocity"
value (required)

Number. The value to convert from MKS to Corona units.

Example

local corona_unit = physics.fromMKS( "velocity", 30 )