Skip to content

Commit

Permalink
Update to pom-scijava 29.2.1
Browse files Browse the repository at this point in the history
Includes imglib2 minor bump, requiring pow added to numeric types.
  • Loading branch information
hinerm committed Jan 14, 2021
1 parent b41a719 commit b154491
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>27.0.1</version>
<version>29.2.1</version>
<relativePath />
</parent>

<groupId>net.imglib2</groupId>
<artifactId>imglib2-unsafe</artifactId>
<version>0.3.2-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>

<name>ImgLib2 Unsafe</name>
<description>ImgLib2 data structures using Unsafe.</description>
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/net/imglib2/type/numeric/ARGBLongAccessType.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,21 @@ public void sub( final ARGBLongAccessType c )
set( rgba( red( value1 ) - red( value2 ), green( value1 ) - green( value2 ), blue( value1 ) - blue( value2 ), alpha( value1 ) - alpha( value2 ) ) );
}

@Override
public void pow( final ARGBLongAccessType c ) {
final int value1 = get();
final int value2 = c.get();

rgba( Math.pow( red( value1 ), red( value2 ) ), Math.pow( green( value1 ), green( value2 ) ), Math.pow( blue( value1 ), blue( value2 ) ), Math.pow( alpha( value1 ), alpha( value2 ) ) );
}

@Override
public void pow( final double power ) {
final int value1 = get();

rgba( Math.pow( red( value1 ), power ), Math.pow( green( value1 ), power ), Math.pow( blue( value1 ), power ), Math.pow( alpha( value1 ), power ) );
}

@Override
public void set( final ARGBLongAccessType c )
{
Expand Down

0 comments on commit b154491

Please sign in to comment.