Page MenuHome

BLI: Add "is_parallel" function for float3
AbandonedPublic

Authored by Hans Goudey (HooglyBoogly) on Jul 1 2021, 6:27 AM.

Details

Summary

Low priority patch, I was just wondering if this made sense to have
in this file.

Diff Detail

Repository
rB Blender
Branch
float3-parallel (branched from master)
Build Status
Buildable 15533
Build 15533: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jul 1 2021, 6:27 AM
Hans Goudey (HooglyBoogly) created this revision.
Jacques Lucke (JacquesLucke) requested changes to this revision.Jul 1 2021, 10:20 AM
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/blenlib/BLI_float3.hh
283

Not sure why this function gets to lines instead of just two directions.

A cheaper way to compute this is probably to check if dir1.x / dir2.x == dir1.y / dir2.y == dir1.z / dir2.z. You'd only want to do a single division and use multiplication for the other axis.

Also this should use some epsilon.

This revision now requires changes to proceed.Jul 1 2021, 10:20 AM