diff options
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_heap.h | 5 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_heap.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/quadric.c | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_heap.h b/source/blender/blenlib/BLI_heap.h index 9d7e6107f19..adbbf266b4e 100644 --- a/source/blender/blenlib/BLI_heap.h +++ b/source/blender/blenlib/BLI_heap.h @@ -54,7 +54,7 @@ HeapNode *BLI_heap_insert(Heap *heap, float value, void *ptr); void BLI_heap_remove(Heap *heap, HeapNode *node); /* Return 0 if the heap is empty, 1 otherwise. */ -int BLI_heap_empty(Heap *heap); +int BLI_heap_is_empty(Heap *heap); /* Return the size of the heap. */ int BLI_heap_size(Heap *heap); @@ -69,5 +69,4 @@ void *BLI_heap_popmin(Heap *heap); float BLI_heap_node_value(HeapNode *heap); void *BLI_heap_node_ptr(HeapNode *heap); -#endif - +#endif /* __BLI_HEAP_H__ */ diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c index 5e0762a5d68..5a33e998561 100644 --- a/source/blender/blenlib/intern/BLI_heap.c +++ b/source/blender/blenlib/intern/BLI_heap.c @@ -165,7 +165,7 @@ HeapNode *BLI_heap_insert(Heap *heap, float value, void *ptr) return node; } -int BLI_heap_empty(Heap *heap) +int BLI_heap_is_empty(Heap *heap) { return (heap->size == 0); } diff --git a/source/blender/blenlib/intern/quadric.c b/source/blender/blenlib/intern/quadric.c index 1c04beacbfb..bb39cb61e78 100644 --- a/source/blender/blenlib/intern/quadric.c +++ b/source/blender/blenlib/intern/quadric.c @@ -117,7 +117,7 @@ int BLI_quadric_optimize(const Quadric *q, float v[3]) m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2]); - if (det != 0.0f) { + if (fabsf(det) > FLT_EPSILON) { invert_m3(m); BLI_quadric_to_vector_v3(q, v); mul_m3_v3(m, v); |