libparted 3.6
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
natmath.h File Reference

Go to the source code of this file.

Data Structures

struct  _PedAlignment
 

Macros

#define PED_MAX(a, b)   ( ((a)>(b)) ? (a) : (b) )
 
#define PED_MIN(a, b)   ( ((a)<(b)) ? (a) : (b) )
 

Typedefs

typedef struct _PedAlignment PedAlignment
 

Functions

PedSector ped_alignment_align_down (const PedAlignment *align, const PedGeometry *geom, PedSector sector)
 This function returns the closest sector to sector that lies inside geom that satisfies the given alignment constraint align.
 
PedSector ped_alignment_align_nearest (const PedAlignment *align, const PedGeometry *geom, PedSector sector)
 This function returns the sector that is closest to sector, satisfies the align constraint and lies inside geom.
 
PedSector ped_alignment_align_up (const PedAlignment *align, const PedGeometry *geom, PedSector sector)
 This function returns the closest sector to sector that lies inside geom that satisfies the given alignment constraint align.
 
void ped_alignment_destroy (PedAlignment *align)
 Free up memory associated with align.
 
PedAlignmentped_alignment_duplicate (const PedAlignment *align)
 Return a duplicate of align.
 
int ped_alignment_init (PedAlignment *align, PedSector offset, PedSector grain_size)
 Initialize a preallocated piece of memory for an alignment object (used by PedConstraint).
 
PedAlignmentped_alignment_intersect (const PedAlignment *a, const PedAlignment *b)
 This function computes a PedAlignment object that describes the intersection of two alignments.
 
int ped_alignment_is_aligned (const PedAlignment *align, const PedGeometry *geom, PedSector sector)
 This function returns 1 if sector satisfies the alignment constraint align and lies inside geom.
 
PedAlignmentped_alignment_new (PedSector offset, PedSector grain_size)
 Return an alignment object (used by PedConstraint), representing all PedSector's that are of the form offset + X * grain_size.
 
PedSector ped_greatest_common_divisor (PedSector a, PedSector b)
 
PedSector ped_round_down_to (PedSector sector, PedSector grain_size)
 
PedSector ped_round_to_nearest (PedSector sector, PedSector grain_size)
 
PedSector ped_round_up_to (PedSector sector, PedSector grain_size)
 

Variables

const PedAlignmentped_alignment_any
 
const PedAlignmentped_alignment_none