Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • common
  • mathutil.cpp
Find file
BlameHistoryPermalink
  • Carl Woffenden's avatar
    Fix to build with VS2019 · 679d1187
    Carl Woffenden authored Jan 12, 2021
    When building with VS2019 (using is_clang=false) multiples of the
    following error are given:
    
        ../../src/common/mathutil.cpp(75): error C4244: '=':
        conversion from 'double' to 'float', possible loss of data
    
    (This is due to pow(), when passed an int for the second param, widens
    the first param to a double then returns a double).
    
    Since the code was being changed the opportunity was taken to:
    
        - add missing unit tests for the two 999E5 conversions
        - optimise out the common pow() functions
    
    The unit tests were written against the original implementation, then
    the optimisations added and verified against the original results.
    
    Bug: angleproject:5521, dawn:602
    Change-Id: Ic9e5eaedbe3fc7ceeed697898823b76dffcd989a
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2624888
    Commit-Queue: Jamie Madill <jmadill@chromium.org>
    Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    679d1187
mathutil.cpp 2.66 KB
EditWeb IDE
×

Replace mathutil.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.