hkl-unit-private

hkl-unit-private

Functions

Types and Values

enum HklUnitType
struct HklUnit

Description

Functions

hkl_unit_dup ()

HklUnit *
hkl_unit_dup (const HklUnit *self);

copy an Hklunit

Returns

the copied HklUnit (memory must be release with hkl_unit_free)


hkl_unit_free ()

void
hkl_unit_free (HklUnit *self);

release the memory of an HklUnit


hkl_unit_compatible ()

int
hkl_unit_compatible (const HklUnit *self,
                     const HklUnit *unit);

check if two units are compatible.

Parameters

self

the first HklUnit

 

unit

the second HklUnit to check

 

Returns

TRUE or FALSE


hkl_unit_factor ()

double
hkl_unit_factor (const HklUnit *self,
                 const HklUnit *unit);

compute the factor to convert from one Hklunit to another one. self * factor = unit

Returns

the factor of the conversion.

Types and Values

enum HklUnitType

Members

HKL_UNIT_ANGLE_DEG

   

HKL_UNIT_ANGLE_RAD

   

HKL_UNIT_LENGTH_NM

   

struct HklUnit

struct HklUnit {
	HklUnitType type;
	char const *name;
	char const *repr;
};